All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs/172,206: call _log_writes_cleanup in _cleanup
@ 2024-02-15 14:02 Su Yue
  2024-02-15 15:58 ` Filipe Manana
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Su Yue @ 2024-02-15 14:02 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs, l, Su Yue

From: Su Yue <glass.su@suse.com>

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.

Signed-off-by: Su Yue <glass.su@suse.com>
---
 tests/btrfs/172 | 6 ++++++
 tests/btrfs/206 | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/tests/btrfs/172 b/tests/btrfs/172
index f5acc6982cd7..fceff56c9d37 100755
--- a/tests/btrfs/172
+++ b/tests/btrfs/172
@@ -13,6 +13,12 @@
 . ./common/preamble
 _begin_fstest auto quick log replay recoveryloop
 
+# Override the default cleanup function.
+_cleanup()
+{
+	_log_writes_cleanup &> /dev/null
+}
+
 # Import common functions.
 . ./common/filter
 . ./common/dmlogwrites
diff --git a/tests/btrfs/206 b/tests/btrfs/206
index f6571649076f..e05adf75b67e 100755
--- a/tests/btrfs/206
+++ b/tests/btrfs/206
@@ -14,6 +14,12 @@
 . ./common/preamble
 _begin_fstest auto quick log replay recoveryloop punch prealloc
 
+# Override the default cleanup function.
+_cleanup()
+{
+	_log_writes_cleanup &> /dev/null
+}
+
 # Import common functions.
 . ./common/filter
 . ./common/dmlogwrites
-- 
2.43.0


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

end of thread, other threads:[~2024-03-02  7:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 14:02 [PATCH] btrfs/172,206: call _log_writes_cleanup in _cleanup Su Yue
2024-02-15 15:58 ` Filipe Manana
2024-02-15 23:10 ` Qu Wenruo
2024-03-01 13:49 ` Zorro Lang
2024-03-01 14:55   ` Filipe Manana
2024-03-02  7:03     ` Zorro Lang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.