]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common/rc: Enable _test_mkfs to force a mkfs on a xfs filesystem v2023.06.18
authorCarlos Maiolino <cmaiolino@redhat.com>
Wed, 24 May 2023 13:42:07 +0000 (15:42 +0200)
committerZorro Lang <zlang@kernel.org>
Sun, 18 Jun 2023 13:08:32 +0000 (21:08 +0800)
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>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc

index d9df7b7a3376b779b8ab7f0985a987b2172d8f12..741579af82d25a14a95dd017f1c814342bf6d0f0 100644 (file)
--- 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
        ;;