aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSu Yue <glass.su@suse.com>2024-03-07 12:04:08 +0800
committerZorro Lang <zlang@kernel.org>2024-03-12 11:39:52 +0800
commitb3ff58fa319a103e54bdc70b78fa225ac5683945 (patch)
treea00a895e6f1a36b3d378c8939cb354514d731ea8
parent8000febb32af1cdc5ebf158861455b1688d7e8ef (diff)
downloadxfstests-dev-b3ff58fa319a103e54bdc70b78fa225ac5683945.tar.gz
btrfs/172,206: call _log_writes_cleanup in _cleanup
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>
-rwxr-xr-xtests/btrfs/1727
-rwxr-xr-xtests/btrfs/2067
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/btrfs/172 b/tests/btrfs/172
index f5acc6982c..f2997c047e 100755
--- a/tests/btrfs/172
+++ b/tests/btrfs/172
@@ -13,6 +13,13 @@
. ./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
diff --git a/tests/btrfs/206 b/tests/btrfs/206
index f657164907..6ac3d27bbd 100755
--- a/tests/btrfs/206
+++ b/tests/btrfs/206
@@ -14,6 +14,13 @@
. ./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