]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
fstests: mkfs the scratch device if we have missing profiles
authorJosef Bacik <josef@toxicpanda.com>
Tue, 7 May 2024 20:08:53 +0000 (16:08 -0400)
committerAnand Jain <anand.jain@oracle.com>
Fri, 24 May 2024 04:06:43 +0000 (12:06 +0800)
commita42f8a6be29e0857ad3ba3a2b6952913f56db877
tree521e52fc6dfd6e309209650adde1e4e0e37a85f8
parentfa81eef946b9fd5ebacf877f9cab2790a11a30c8
fstests: mkfs the scratch device if we have missing profiles

I have a btrfs config where I specifically exclude raid56 testing, and
this resulted in btrfs/011 failing with an inconsistent file system.
This happens because the last test we run does a btrfs device replace of
the $SCRATCH_DEV, leaving it with no valid file system.  We then skip
the remaining profiles and exit, but then we go to check the device on
$SCRATCH_DEV and it fails because there is no file system.

Fix this to re-make the scratch device if we skip any of the raid
profiles.  This only happens in the case of some idiot user configuring
their testing in a special way, in normal runs of this test we'll never
re-make the fs.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
tests/btrfs/011