From patchwork Tue Jul 9 10:33:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1958307 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=JlA1Aab3; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=u6sYzR3G; 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=JlA1Aab3; dkim=neutral header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=u6sYzR3G; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WJHQx5hmrz1xpd for ; Tue, 9 Jul 2024 20:34:01 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 9453A3D392F for ; Tue, 9 Jul 2024 12:33:59 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [IPv6:2001:4b78:1:20::6]) (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 3108F3D0CD5 for ; Tue, 9 Jul 2024 12:33:56 +0200 (CEST) Authentication-Results: in-6.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=suse.cz (client-ip=195.135.223.131; helo=smtp-out2.suse.de; envelope-from=pvorel@suse.cz; receiver=lists.linux.it) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (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-6.smtp.seeweb.it (Postfix) with ESMTPS id A233C1400058 for ; Tue, 9 Jul 2024 12:33:55 +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 BC3C31F7AF; Tue, 9 Jul 2024 10:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1720521234; 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=49XnoDQ00DYL3IkmCeqFTru81KQhJkbsAEwwG8v+j6Q=; b=JlA1Aab3vkqGm61E0Q2ybJubsdLTATEI4NP0HxMqKSJ8p2ds2Re8SHCQOzMCPlCD1cBK+A WOZE4zj/PajCcpCVmia+X1ysxRLt/ymTZLYDxCJ5rwwx29OdCuUyMhCZ7qt0JWPFFRcgMl 3cqQyzNv/TxHPPZTTvfRsLyd13fVMlg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1720521234; 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=49XnoDQ00DYL3IkmCeqFTru81KQhJkbsAEwwG8v+j6Q=; b=u6sYzR3GYkOznjTXWyfaWXB6KI4UcrGGM0+sJ9kn5xRjVrVpkJjQVQswG6exFJsmKh1Stt qdKk8X6pOBG13HDA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1720521234; 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=49XnoDQ00DYL3IkmCeqFTru81KQhJkbsAEwwG8v+j6Q=; b=JlA1Aab3vkqGm61E0Q2ybJubsdLTATEI4NP0HxMqKSJ8p2ds2Re8SHCQOzMCPlCD1cBK+A WOZE4zj/PajCcpCVmia+X1ysxRLt/ymTZLYDxCJ5rwwx29OdCuUyMhCZ7qt0JWPFFRcgMl 3cqQyzNv/TxHPPZTTvfRsLyd13fVMlg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1720521234; 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=49XnoDQ00DYL3IkmCeqFTru81KQhJkbsAEwwG8v+j6Q=; b=u6sYzR3GYkOznjTXWyfaWXB6KI4UcrGGM0+sJ9kn5xRjVrVpkJjQVQswG6exFJsmKh1Stt qdKk8X6pOBG13HDA== 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 0CE371369A; Tue, 9 Jul 2024 10:33:53 +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 UvxcNxESjWZmUAAAD6G6ig (envelope-from ); Tue, 09 Jul 2024 10:33:53 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 9 Jul 2024 12:33:24 +0200 Message-ID: <20240709103324.183993-1-pvorel@suse.cz> X-Mailer: git-send-email 2.45.2 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)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_SEVEN(0.00)[9]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:email,suse.com:email,imap1.dmz-prg2.suse.org:helo]; 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,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-6.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-6.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH 1/1] tst_test: Fix tests using device without .filesystems 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" cce618891 introduced a regression for tests which use the test loop device (e.g. .mount_device = 1 or .format_device = 1) without .filesystems array (execveat03, ioctl04, inotify0[378], fanotify10, mount02, umount0[1-3], umount2_02). Call in that case prepare_device() with the default filesystem type. Fixes: cce618891 ("lib: tst_test: Add per filesystem mkfs and mount opts") Reported-by: Petr Cervinka Suggested-by: Andrea Cervesato Signed-off-by: Petr Vorel Reviewed-by: Petr Vorel Tested-by: Petr Vorel --- Hi, is there a more elegant way to fix this? Kind regards, Petr lib/tst_test.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/tst_test.c b/lib/tst_test.c index b49c248ae..6d258cd28 100644 --- a/lib/tst_test.c +++ b/lib/tst_test.c @@ -1355,8 +1355,11 @@ static void do_setup(int argc, char *argv[]) tdev.fs_type = default_fs_type(); - if (!tst_test->all_filesystems && count_fs_descs() == 1) - prepare_device(&tst_test->filesystems[0]); + if (!tst_test->all_filesystems && count_fs_descs() <= 1) { + prepare_device(tst_test->filesystems ? + &tst_test->filesystems[0] : + &(struct tst_fs){.type = tdev.fs_type}); + } } if (tst_test->needs_overlay && !tst_test->mount_device)