From patchwork Wed Aug 17 20:40:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1667472 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=QNeGUc73; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=8D+4a8ZZ; 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 4M7Kf64lRjz1ygf for ; Thu, 18 Aug 2022 06:40:28 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 3F7B43C9FD5 for ; Wed, 17 Aug 2022 22:40:25 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) (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 C4F7B3C9AEA for ; Wed, 17 Aug 2022 22:40:23 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (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-7.smtp.seeweb.it (Postfix) with ESMTPS id 9F23F200217 for ; Wed, 17 Aug 2022 22:40:21 +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 3ABC133BE1; Wed, 17 Aug 2022 20:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1660768821; 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=6P22HJgbmvI/P6+1CJnXSSgfgTPsbSb0qtF2HE+5mTw=; b=QNeGUc73g3ejBqQRu8HZWs9PskwTHgfve5sapAoVjLhR01Phx6e2N8v9d1/AvsxDoflNnw sFY1Rgi2IZ5wSSxcHivMuUJhpWsIRIGS6Fgkjpk3jqtg+u0uUmSEPAtCnX50JiJrZv79IS 7YE0gssxSDUChLTX1I5qcLmgP3FAVB4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1660768821; 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=6P22HJgbmvI/P6+1CJnXSSgfgTPsbSb0qtF2HE+5mTw=; b=8D+4a8ZZSeoFMrav84oX3Nz+rN3aXh8OLoXlfC2zA1sOWfhmNfipdOk6XYzqMSzGA4V0jM +hJijH+NjSJ5qVAw== 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 ADBB513A8E; Wed, 17 Aug 2022 20:40:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Q7mxJzRS/WIpfgAAMHmgww (envelope-from ); Wed, 17 Aug 2022 20:40:20 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 17 Aug 2022 22:40:15 +0200 Message-Id: <20220817204015.31420-1-pvorel@suse.cz> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-7.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_SOFTFAIL, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-7.smtp.seeweb.it Subject: [LTP] [RFC PATCH 1/1] API: Allow to use xfs filesystems < 300 MB 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: linux-xfs@vger.kernel.org, "Darrick J . Wong" , automated-testing@yoctoproject.org, automated-testing@lists.yoctoproject.org Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" mkfs.xfs since v5.19.0-rc1 [1] refuses to create filesystems < 300 MB. Reuse workaround intended for fstests: set 3 environment variables: export TEST_DIR=1 TEST_DEV=1 QA_CHECK_FS=1 Workaround added to both C API (for .needs_device) and shell API (for TST_NEEDS_DEVICE=1). Fix includes any use of filesystem (C API: .all_filesystems, .format_device, shell API: TST_MOUNT_DEVICE=1, TST_FORMAT_DEVICE=1). Fixes various C and shell API failures, e.g.: ./mkfs01.sh -f xfs mkfs01 1 TINFO: timeout per run is 0h 5m 0s tst_device.c:89: TINFO: Found free device 0 '/dev/loop0' mkfs01 1 TFAIL: 'mkfs -t xfs -f /dev/loop0 ' failed. Filesystem must be larger than 300MB. ./creat09 ... tst_test.c:1599: TINFO: Testing on xfs tst_test.c:1064: TINFO: Formatting /dev/loop0 with xfs opts='' extra opts='' Filesystem must be larger than 300MB. Link: https://lore.kernel.org/all/164738662491.3191861.15611882856331908607.stgit@magnolia/ Reported-by: Martin Doucha Signed-off-by: Petr Vorel --- Dave, please next time remember there are other testsuites testing XFS, not just fstests :). How long do you plan to keep this workaround? LTP community: do we want to depend on this behavior or we just increase from 256MB to 301 MB (either for XFS or for all). It might not be a good idea to test size users are required to use. Kind regards, Petr lib/tst_test.c | 7 +++++++ testcases/lib/tst_test.sh | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/tst_test.c b/lib/tst_test.c index 4b4dd125d..657348732 100644 --- a/lib/tst_test.c +++ b/lib/tst_test.c @@ -1160,6 +1160,13 @@ static void do_setup(int argc, char *argv[]) if (tst_test->all_filesystems) tst_test->needs_device = 1; + /* allow to use XFS filesystem < 300 MB */ + if (tst_test->needs_device) { + putenv("TEST_DIR=1"); + putenv("TEST_DEV=1"); + putenv("QA_CHECK_FS=1"); + } + if (tst_test->min_cpus > (unsigned long)tst_ncpus()) tst_brk(TCONF, "Test needs at least %lu CPUs online", tst_test->min_cpus); diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh index 24a3d29d8..b42e54ca1 100644 --- a/testcases/lib/tst_test.sh +++ b/testcases/lib/tst_test.sh @@ -671,7 +671,11 @@ tst_run() [ "$TST_MOUNT_DEVICE" = 1 ] && TST_FORMAT_DEVICE=1 [ "$TST_FORMAT_DEVICE" = 1 ] && TST_NEEDS_DEVICE=1 - [ "$TST_NEEDS_DEVICE" = 1 ] && TST_NEEDS_TMPDIR=1 + if [ "$TST_NEEDS_DEVICE" = 1 ]; then + TST_NEEDS_TMPDIR=1 + # allow to use XFS filesystem < 300 MB + export TEST_DIR=1 TEST_DEV=1 QA_CHECK_FS=1 + fi if [ "$TST_NEEDS_TMPDIR" = 1 ]; then if [ -z "$TMPDIR" ]; then