btrfs/172,206: call _log_writes_cleanup in _cleanup
PATCH v2 1/1 btrfs/172,206: call _log_writes_cleanup in _cleanup
From: Su Yue <[email protected]>
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.
---
changelog:
v2:
Remove unneeded comments for _cleanup.
Add rvbs.
--- tests/btrfs/172 | 5 +++++ tests/btrfs/206 | 5 +++++ 2 files changed, 10 insertions(+)
tests/btrfs/172 +5 -0
@@ -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
tests/btrfs/206 +5 -0
@@ -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
Signature · 1 line
2.43.0
Quoted 29 lines · Su Yue
From: Su Yue <[email protected]>
Because block group tree requires require no-holes feature,
_log_writes_mkfs"-O ^no-holes" fails when "-O block-group-tree" is given inMKFS_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
_cleanupto call_log_writes_cleanup.Signed-off-by Su Yue <[email protected]>Reviewed-by Filipe Manana <[email protected]>Reviewed-by Qu Wenruo <[email protected]>---
changelog:
v2:
Remove unneeded comments for_cleanup.
Add rvbs.--- tests/btrfs/172 | 5 +++++ tests/btrfs/206 | 5 +++++ 2 files changed, 10 insertions(+)tests/btrfs/172 +0
-0
tests/btrfs/172 line 18
Quoted 6 lines
tests/btrfs/172 +3
-0@@ -13,6 +13,11 @@ . ./common/preamble _begin_fstest auto quick log replay recoveryloop +_cleanup() +{ + _log_writes_cleanup &> /dev/null
Currently we need to copy the code in default _cleanup into new _cleanup() function, if you need a override, e.g.
cd /
_log_writes_cleanup
rm -f $tmp.*Quoted 25 lines
tests/btrfs/172 +2
-0+} + # Import common functions. . ./common/filter . ./common/dmlogwritestests/btrfs/206 +5
-0@@ -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/dmlogwritesSignature · 1 line
2.43.0
Quoted 33 lines · Zorro Lang
Quoted 32 lines · Su Yue
From: Su Yue <[email protected]>
Because block group tree requires require no-holes feature,
_log_writes_mkfs"-O ^no-holes" fails when "-O block-group-tree" is given inMKFS_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
_cleanupto call_log_writes_cleanup.Signed-off-by Su Yue <[email protected]>Reviewed-by Filipe Manana <[email protected]>Reviewed-by Qu Wenruo <[email protected]>---
changelog:
v2:
Remove unneeded comments for_cleanup.
Add rvbs.--- tests/btrfs/172 | 5 +++++ tests/btrfs/206 | 5 +++++ 2 files changed, 10 insertions(+)tests/btrfs/172 +0
-0@@ -13,6 +13,11 @@ . ./common/preamble _begin_fstest auto quick log replay recoveryloop
Quoted 7 lines
tests/btrfs/172 line 18
Quoted 3 lines
tests/btrfs/172 +3
-0+_cleanup() +{ + _log_writes_cleanup &> /dev/nullCurrently we need to copy the code in default
_cleanupinto new_cleanup()function, if you need a override, e.g.
Sorry for the late reply, I was working on other things with headache. I saw the cleanup thing you mentioned in v1 thread. v3 was sent. Thanks.
--
Su
Quoted 30 lines
cd / _log_writes_cleanup rm -f $tmp.*Quoted 26 lines
tests/btrfs/172 +2
-0+} + # Import common functions. . ./common/filter . ./common/dmlogwritestests/btrfs/206 +5
-0@@ -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