From patchwork Thu Jun 20 05:49:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1949933 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=s8qVS+AK; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=rFgzryvc; dkim=fail reason="signature verification failed" (1024-bit key) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=s8qVS+AK; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=rFgzryvc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W4V2b1pMsz20KL for ; Thu, 20 Jun 2024 15:50:31 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id B27403D0E0F for ; Thu, 20 Jun 2024 07:50:27 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 713E73CF2D7 for ; Thu, 20 Jun 2024 07:50:08 +0200 (CEST) Authentication-Results: in-2.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=suse.cz (client-ip=2a07:de40:b251:101:10:150:64:2; helo=smtp-out2.suse.de; envelope-from=pvorel@suse.cz; receiver=lists.linux.it) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 7629C601E20 for ; Thu, 20 Jun 2024 07:50:06 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C1BCB1F795; Thu, 20 Jun 2024 05:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1718862605; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fFOCEpXkBkRrLvZAtDgMfLB3dF674qEgl7tjLtdFdY4=; b=s8qVS+AKAsLsQQMCxsxWjbkwm0KR3VL6vdYLpq2fao24AP693SL8qYD20lGF06bSP+RZJq FJiGC8btGh5i44O5oCcG18fTeUNBSTGRSBctcG3SH0RcFKolqsfWJRsKT36XyoUuE7ZFrQ 5+Sazji5S/T7yusjzSl74CQEDD62Pvo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1718862605; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fFOCEpXkBkRrLvZAtDgMfLB3dF674qEgl7tjLtdFdY4=; b=rFgzryvctydiYjHMAMADylJIVqtzMFUTKS+l1mTL8dOqy6TKtCQ5d7rfMXdnR7vJymmwyI q0OLPKanxCh+lfBA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1718862605; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fFOCEpXkBkRrLvZAtDgMfLB3dF674qEgl7tjLtdFdY4=; b=s8qVS+AKAsLsQQMCxsxWjbkwm0KR3VL6vdYLpq2fao24AP693SL8qYD20lGF06bSP+RZJq FJiGC8btGh5i44O5oCcG18fTeUNBSTGRSBctcG3SH0RcFKolqsfWJRsKT36XyoUuE7ZFrQ 5+Sazji5S/T7yusjzSl74CQEDD62Pvo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1718862605; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fFOCEpXkBkRrLvZAtDgMfLB3dF674qEgl7tjLtdFdY4=; b=rFgzryvctydiYjHMAMADylJIVqtzMFUTKS+l1mTL8dOqy6TKtCQ5d7rfMXdnR7vJymmwyI q0OLPKanxCh+lfBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 98C1113ABC; Thu, 20 Jun 2024 05:50:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ydUyJA3Dc2aZMQAAD6G6ig (envelope-from ); Thu, 20 Jun 2024 05:50:05 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Thu, 20 Jun 2024 07:49:57 +0200 Message-ID: <20240620054958.554319-1-pvorel@suse.cz> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.999]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-2.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-2.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH 1/2] tst_tmpdir: Remove NULL from static X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Not needed, reported by checkpatch.pl. Signed-off-by: Petr Vorel --- lib/tst_tmpdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c index b73b5c66f..bcc788390 100644 --- a/lib/tst_tmpdir.c +++ b/lib/tst_tmpdir.c @@ -92,7 +92,7 @@ * Define global variables. */ extern char *TCID; /* defined/initialized in main() */ -static char *TESTDIR = NULL; /* the directory created */ +static char *TESTDIR; /* the directory created */ static char test_start_work_dir[PATH_MAX]; From patchwork Thu Jun 20 05:49:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1949932 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=H5UDgLN0; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Ahiv7BnN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W4V2F6fkjz20KL for ; Thu, 20 Jun 2024 15:50:13 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id EB5083D0DED for ; Thu, 20 Jun 2024 07:50:10 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 32E963CF2D7 for ; Thu, 20 Jun 2024 07:50:07 +0200 (CEST) Authentication-Results: in-3.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=suse.cz (client-ip=2a07:de40:b251:101:10:150:64:1; helo=smtp-out1.suse.de; envelope-from=pvorel@suse.cz; receiver=lists.linux.it) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 618061A0123C for ; Thu, 20 Jun 2024 07:50:06 +0200 (CEST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D577721AA1; Thu, 20 Jun 2024 05:50:05 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1718862605; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u2eFbK5v5dqaorftDJqPpBH2Hyya0If51NLsYmQpSbU=; b=H5UDgLN0xOAOFKovfBKgCPeG3LFlPx+N6LaIrJ5rnbInPdiQPfi2tS2mxXoyoa1tsF1MRu E5j6RErzvdxMAFp+1Ny+pryRIg+aTS90RwH1d5+176oZNnsPbFCZzL19nIIz0vKalBUpgd zsCxjSTzSpQirbRHGj4QDxx/1yaiqHY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1718862605; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u2eFbK5v5dqaorftDJqPpBH2Hyya0If51NLsYmQpSbU=; b=Ahiv7BnN+PTIxc26IdZ3miOWuF5nfNZtHch2lZ43BG77MrCfis/9VSDhGbLkdmkyRLS8P2 j+sWrUHYAVyYuYDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id BAC4B13AC1; Thu, 20 Jun 2024 05:50:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id EMq8LA3Dc2aZMQAAD6G6ig (envelope-from ); Thu, 20 Jun 2024 05:50:05 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Thu, 20 Jun 2024 07:49:58 +0200 Message-ID: <20240620054958.554319-2-pvorel@suse.cz> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240620054958.554319-1-pvorel@suse.cz> References: <20240620054958.554319-1-pvorel@suse.cz> MIME-Version: 1.0 X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: D577721AA1 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Spam-Score: -4.00 X-Spam-Level: X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-3.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-3.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH 2/2] lib: Create tst_tmpdir.h X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Suggested-by: Cyril Hrubis Signed-off-by: Petr Vorel Reviewed-by: Cyril Hrubis --- include/tst_device.h | 6 +----- include/tst_tmpdir.h | 15 +++++++++++++++ lib/tst_tmpdir.c | 1 + 3 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 include/tst_tmpdir.h diff --git a/include/tst_device.h b/include/tst_device.h index 36258f436..391fb4e56 100644 --- a/include/tst_device.h +++ b/include/tst_device.h @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2016-2019 Cyril Hrubis + * Copyright (c) Linux Test Project, 2019-2024 */ #ifndef TST_DEVICE_H__ @@ -101,11 +102,6 @@ int tst_dev_sync(int fd); */ unsigned long tst_dev_bytes_written(const char *dev); -/* - * Wipe the contents of given directory but keep the directory itself - */ -void tst_purge_dir(const char *path); - /* * Find the file or path belongs to which block dev * @path Path to find the backing dev diff --git a/include/tst_tmpdir.h b/include/tst_tmpdir.h new file mode 100644 index 000000000..b4f95b666 --- /dev/null +++ b/include/tst_tmpdir.h @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) 2017 Cyril Hrubis + * Copyright (c) 2020 Martin Doucha + */ + +#ifndef TST_TMPDIR_H__ +#define TST_TMPDIR_H__ + +/* + * Wipe the contents of given directory but keep the directory itself + */ +void tst_purge_dir(const char *path); + +#endif /* TST_TMPDIR_H__ */ diff --git a/lib/tst_tmpdir.c b/lib/tst_tmpdir.c index bcc788390..0f1b15ca4 100644 --- a/lib/tst_tmpdir.c +++ b/lib/tst_tmpdir.c @@ -72,6 +72,7 @@ #include "test.h" #include "safe_macros.h" +#include "tst_tmpdir.h" #include "ltp_priv.h" #include "lapi/futex.h"