FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH] xfstests: Enable _test_mkfs to force a mkfs on a xfs filesystem
@ 2023-05-24 13:42 cem
  2023-05-24 15:16 ` Darrick J. Wong
  0 siblings, 1 reply; 8+ messages in thread
From: cem @ 2023-05-24 13:42 UTC (permalink / raw)
  To: fstests

From: Carlos Maiolino <cmaiolino@redhat.com>

Calling _test_mkfs on an already initialized xfs FS will fail as the
initialization is not enforced by '-f' argument, unless it's included in
MKFS_OPTIONS.
So, adding 'RECREATE_TEST_DEV=true' to the config file end up being useless
for xfs filesystems.

So, adding the a specific xfs optiong in _test_mkfs using -f argument
makes RECREATE_TEST_DEV actually useful.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
 common/rc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/rc b/common/rc
index 37074371..dd5d7bc1 100644
--- a/common/rc
+++ b/common/rc
@@ -605,6 +605,9 @@ _test_mkfs()
     ext2|ext3|ext4)
 	$MKFS_PROG -t $FSTYP -- -F $MKFS_OPTIONS $* $TEST_DEV
 	;;
+    xfs)
+	$MKFS_PROG -t $FSTYP -- -f $MKFS_OPTIONS $* $TEST_DEV
+	;;
     *)
 	yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $* $TEST_DEV
 	;;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-06-02 10:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-24 13:42 [PATCH] xfstests: Enable _test_mkfs to force a mkfs on a xfs filesystem cem
2023-05-24 15:16 ` Darrick J. Wong
2023-05-25  4:36   ` Zorro Lang
2023-05-25 19:13     ` Darrick J. Wong
2023-05-26 19:52       ` Zorro Lang
2023-05-29  7:58         ` Carlos Maiolino
2023-06-02  1:15           ` Darrick J. Wong
2023-06-02 10:44             ` Zorro Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox