]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
btrfs/172,206: call _log_writes_cleanup in _cleanup
authorSu Yue <glass.su@suse.com>
Thu, 7 Mar 2024 04:04:08 +0000 (12:04 +0800)
committerZorro Lang <zlang@kernel.org>
Tue, 12 Mar 2024 03:39:52 +0000 (11:39 +0800)
Because block group tree requires require no-holes feature,
_log_writes_mkfs "-O ^no-holes" fails when "-O block-group-tree" is
given in MKFS_OPTION.
Without explicit _log_writes_cleanup, the two tests fail with
logwrites-test device left. And all next tests will fail due to
SCRATCH DEVICE EBUSY.

Fix it by overriding _cleanup to call _log_writes_cleanup.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Su Yue <glass.su@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/172
tests/btrfs/206

index f5acc6982cd719d2d1bcc9f9b27227199727ad30..f2997c047effb027bcefc213b9803f3b04ad416a 100755 (executable)
 . ./common/preamble
 _begin_fstest auto quick log replay recoveryloop
 
+_cleanup()
+{
+       cd /
+       _log_writes_cleanup &> /dev/null
+       rm -f $tmp.*
+}
+
 # Import common functions.
 . ./common/filter
 . ./common/dmlogwrites
index f6571649076f1f0d0fd216cba71e80e5e26cf0b2..6ac3d27bbde3752543dad832457eb6e0bc5de077 100755 (executable)
 . ./common/preamble
 _begin_fstest auto quick log replay recoveryloop punch prealloc
 
+_cleanup()
+{
+       cd /
+       _log_writes_cleanup &> /dev/null
+       rm -f $tmp.*
+}
+
 # Import common functions.
 . ./common/filter
 . ./common/dmlogwrites