From patchwork Wed Jun 28 13:07:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1801071 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) 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=wtZ+IFlf; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=haietHJg; dkim-atps=neutral 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 (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qrhj71mMdz20bH for ; Wed, 28 Jun 2023 23:08:27 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id C280B3CF14C for ; Wed, 28 Jun 2023 15:08:24 +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 (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 7ADE03CC734 for ; Wed, 28 Jun 2023 15:07:47 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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 49DD8600909 for ; Wed, 28 Jun 2023 15:07:46 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BFFDB218A8; Wed, 28 Jun 2023 13:07:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1687957665; 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=DELYlmIZS3dx1c/tyrSxiVcRCsFfqdr5OtFxqJsft08=; b=wtZ+IFlfvrhJhD8/DNaTTR5y0DD84StH/iTui9YGzQVjfFs3DDYgu/jF8eLpQog/ZYCnOq EzjNLAkrcNXWVbALCsBZnQbRSflKXd1k2BX5g+5a3ZPq5eS2p9FMjwPUjzuoxRJtS8XLKQ XqFCpYleRuXpQ9puGdhvhtwp+xgTeaU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1687957665; 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=DELYlmIZS3dx1c/tyrSxiVcRCsFfqdr5OtFxqJsft08=; b=haietHJgJZ3+wf6w2IZlWdXFQyACrh/gzQItEJbzzqlEw9oGa2vRdQGx1tk4fYpzVctSml wd2eRq4Scwv+6eDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 954AB138E8; Wed, 28 Jun 2023 13:07:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WHNDI6EwnGT/cgAAMHmgww (envelope-from ); Wed, 28 Jun 2023 13:07:45 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 28 Jun 2023 15:07:40 +0200 Message-Id: <20230628130742.155724-2-pvorel@suse.cz> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230628130742.155724-1-pvorel@suse.cz> References: <20230628130742.155724-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-2.smtp.seeweb.it X-Virus-Status: Clean 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-2.smtp.seeweb.it Subject: [LTP] [PATCH v2 1/3] lapi/fcntl.h: Remove O_DIRECT definition 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: , Cc: NeilBrown Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" O_DIRECT definitions differ a lot depending on architecture. Because this can lead to problems (e.g. the generic value O_DIRECT 040000 is O_DIRECTORY on powerpc. Therefore it's better just to remove the definition in lapi and define _GNU_SOURCE in the tests which need it (so far it's not needed for the library code). Add this hint to the lapi header. Reported-by: NeilBrown Suggested-by: NeilBrown Suggested-by: Cyril Hrubis Signed-off-by: Petr Vorel --- include/lapi/fcntl.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/lapi/fcntl.h b/include/lapi/fcntl.h index 848ac7865..cb216e2dc 100644 --- a/include/lapi/fcntl.h +++ b/include/lapi/fcntl.h @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2014 Cyril Hrubis + * Copyright (c) Linux Test Project, 2014-2023 */ #ifndef LAPI_FCNTL_H__ @@ -10,9 +11,7 @@ #include #include -#ifndef O_DIRECT -# define O_DIRECT 040000 -#endif +/* NOTE: #define _GNU_SOURCE if you need O_DIRECT in tests */ #ifndef O_CLOEXEC # define O_CLOEXEC 02000000 From patchwork Wed Jun 28 13:07:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1801070 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) 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=IF52C/Ua; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=aU6mRzpU; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qrhht5hdkz20bH for ; Wed, 28 Jun 2023 23:08:14 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id C42653CF597 for ; Wed, 28 Jun 2023 15:08:12 +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 [IPv6:2001:4b78:1:20::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 5EAE63CB175 for ; Wed, 28 Jun 2023 15:07:47 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 85B7E1A00A33 for ; Wed, 28 Jun 2023 15:07:46 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0E2D01F8CD; Wed, 28 Jun 2023 13:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1687957666; 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=1FviAcrsqHpWS1Q3P4pqxv4ZLcM1SyoPVJJVxWOk4ks=; b=IF52C/UatTSqjz9aEislHCZWkXBLMUxeMgYTB6Fklw2wZjNTLg6XSSg8X5m20oPJbBLF6j PqFlt5n8oGRrzdXzoOS/tTmwAbxCl9zaz1NlrJJJod8bwF9tRH1RqQZDaxSZyTAfj5bCO7 EyrGBLJqZZPSqS16Pb6AMVM2t0ws3uE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1687957666; 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=1FviAcrsqHpWS1Q3P4pqxv4ZLcM1SyoPVJJVxWOk4ks=; b=aU6mRzpUdSGzfVeAk8KNoUP7MavfHZhuSz0exw25soISn0/8/2M49oyqPKjifXLjo6L7c5 CIW7tOzQlduraPAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id CA13C138E8; Wed, 28 Jun 2023 13:07:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oJ/CL6EwnGT/cgAAMHmgww (envelope-from ); Wed, 28 Jun 2023 13:07:45 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 28 Jun 2023 15:07:41 +0200 Message-Id: <20230628130742.155724-3-pvorel@suse.cz> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230628130742.155724-1-pvorel@suse.cz> References: <20230628130742.155724-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-3.smtp.seeweb.it X-Virus-Status: Clean 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 Subject: [LTP] [PATCH v2 2/3] fsstress/global.h: Use _GNU_SOURCE 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: , Cc: NeilBrown Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" O_DIRECT definitions differ a lot depending on architecture, therefore _GNU_SOURCE (which loads it) instead of fallback O_DIRECT definition. Signed-off-by: Petr Vorel Reviewed-by: Cyril Hrubis --- testcases/kernel/fs/fsstress/global.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/testcases/kernel/fs/fsstress/global.h b/testcases/kernel/fs/fsstress/global.h index 4ec382426..584af025d 100644 --- a/testcases/kernel/fs/fsstress/global.h +++ b/testcases/kernel/fs/fsstress/global.h @@ -33,7 +33,7 @@ #ifndef GLOBAL_H #define GLOBAL_H -/* xfs-specific includes */ +#define _GNU_SOURCE #if defined(NO_XFS) # include "xfscompat.h" @@ -42,8 +42,6 @@ # include #endif -/* libc includes */ - #include #include #include @@ -59,8 +57,4 @@ #include #include -#ifndef O_DIRECT -#define O_DIRECT 040000 -#endif - #endif From patchwork Wed Jun 28 13:07:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1801069 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) 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=EgMzBD1K; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=5hvDZRMH; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qrhhg2px0z20bH for ; Wed, 28 Jun 2023 23:08:03 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id ABE9F3CF132 for ; Wed, 28 Jun 2023 15:08:00 +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 [IPv6:2001:4b78:1:20::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 42C193CC734 for ; Wed, 28 Jun 2023 15:07:47 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 A1EEB1A00A34 for ; Wed, 28 Jun 2023 15:07:46 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 5FDB71F8D5; Wed, 28 Jun 2023 13:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1687957666; 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=3i1PkT8JD2OJGFphOMrUu65Qtg1I5AkPSS9asZTgmyA=; b=EgMzBD1KaTy1QdMbZDMIUYYA8mJQWgMg9dSaegUlxeMGjqcTeHchYkJDzKO9nvF4bXNlmL h7kl0B7nFdsf6JYQbKYudUqUflXnARQNkYPDts/XHeIGeoCsad0JnPnE566LJ4hJbrS432 FdVWHvLTptopBBJbPlv8Lrv6RyJmTR8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1687957666; 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=3i1PkT8JD2OJGFphOMrUu65Qtg1I5AkPSS9asZTgmyA=; b=5hvDZRMHgB168Uxppxq3c6A0m9bHRVhidb9NXuI4tlqCWEVbOOCZnu9DTA4QPajeUzn9Rq G0mGymzvurEEJyBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1A2D0138E8; Wed, 28 Jun 2023 13:07:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OH/uBKIwnGT/cgAAMHmgww (envelope-from ); Wed, 28 Jun 2023 13:07:46 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 28 Jun 2023 15:07:42 +0200 Message-Id: <20230628130742.155724-4-pvorel@suse.cz> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230628130742.155724-1-pvorel@suse.cz> References: <20230628130742.155724-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-3.smtp.seeweb.it X-Virus-Status: Clean 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 Subject: [LTP] [PATCH v2 3/3] ltpscsi/scsimain.c: Remove O_DIRECT fallback definition 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: , Cc: NeilBrown Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" To avoid potential problems with different O_DIRECT values across archs, just replace the fallback definition with _GNU_SOURCE definition. Signed-off-by: Petr Vorel --- testcases/kernel/fs/scsi/ltpscsi/scsimain.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/testcases/kernel/fs/scsi/ltpscsi/scsimain.c b/testcases/kernel/fs/scsi/ltpscsi/scsimain.c index ae484e0f1..ce23ae1e7 100644 --- a/testcases/kernel/fs/scsi/ltpscsi/scsimain.c +++ b/testcases/kernel/fs/scsi/ltpscsi/scsimain.c @@ -28,6 +28,7 @@ [0x12][ |lu][pg cde][res ][al len][cntrl ] */ +#define _GNU_SOURCE #include #include #include @@ -53,10 +54,6 @@ #define ME "scsimain: " -#ifndef O_DIRECT -#define O_DIRECT 040000 -#endif - #define NUMERIC_SCAN_DEF 1 /* change to 0 to make alpha scan default */ //static char * version_str = "0.21 20030513";