All of lore.kernel.org
 help / color / mirror / Atom feed
From: Su Yue <glass.su@suse.com>
To: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org, l@damenly.org,
	Su Yue <glass.su@suse.com>, Filipe Manana <fdmanana@suse.com>,
	Qu Wenruo <wqu@suse.com>
Subject: [PATCH v2] btrfs/172,206: call _log_writes_cleanup in _cleanup
Date: Fri, 16 Feb 2024 18:25:50 +0800	[thread overview]
Message-ID: <20240216102550.46210-1-l@damenly.org> (raw)

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>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
---
changelog:
v2:
    Remove unneeded comments for _cleanup.
    Add rvbs.
---
 tests/btrfs/172 | 5 +++++
 tests/btrfs/206 | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/tests/btrfs/172 b/tests/btrfs/172
index f5acc6982cd7..e5e16681ec21 100755
--- a/tests/btrfs/172
+++ b/tests/btrfs/172
@@ -13,6 +13,11 @@
 . ./common/preamble
 _begin_fstest auto quick log replay recoveryloop
 
+_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..d9ce33b659e7 100755
--- a/tests/btrfs/206
+++ b/tests/btrfs/206
@@ -14,6 +14,11 @@
 . ./common/preamble
 _begin_fstest auto quick log replay recoveryloop punch prealloc
 
+_cleanup()
+{
+	_log_writes_cleanup &> /dev/null
+}
+
 # Import common functions.
 . ./common/filter
 . ./common/dmlogwrites
-- 
2.43.0


             reply	other threads:[~2024-02-16 10:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16 10:25 Su Yue [this message]
2024-02-25 16:22 ` [PATCH v2] btrfs/172,206: call _log_writes_cleanup in _cleanup Zorro Lang
2024-03-07  4:03   ` Su Yue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240216102550.46210-1-l@damenly.org \
    --to=glass.su@suse.com \
    --cc=fdmanana@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=l@damenly.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.