Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] fstests: btrfs/185 update for single device pseudo device-scan
@ 2023-09-06 16:24 Anand Jain
  2023-09-11 18:32 ` Boris Burkov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Anand Jain @ 2023-09-06 16:24 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs

As we are obliterating the need for the device scan for the single device,
which will return success if the basic superblock verification passes,
even for the duplicate device of the mounted filesystem, drop the check
for the return code in this testcase and continue to verify if the device
path of the mounted filesystem remains unaltered after the scan.

Also, if the test fails, it leaves the local non-standard mount point
remained mounted, leading to further test cases failing. Call unmount
in _cleanup().

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 tests/btrfs/185 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/btrfs/185 b/tests/btrfs/185
index ba0200617e69..c7b8d2d46951 100755
--- a/tests/btrfs/185
+++ b/tests/btrfs/185
@@ -15,6 +15,7 @@ mnt=$TEST_DIR/$seq.mnt
 # Override the default cleanup function.
 _cleanup()
 {
+	$UMOUNT_PROG $mnt > /dev/null 2>&1
 	rm -rf $mnt > /dev/null 2>&1
 	cd /
 	rm -f $tmp.*
@@ -51,9 +52,9 @@ for sb_bytenr in 65536 67108864; do
 	echo ..:$? >> $seqres.full
 done
 
-# Original device is mounted, scan of its clone should fail
+# Original device is mounted, scan of its clone must not alter the
+# filesystem device path
 $BTRFS_UTIL_PROG device scan $device_2 >> $seqres.full 2>&1
-[[ $? != 1 ]] && _fail "cloned device scan should fail"
 
 [[ $(findmnt $mnt | grep -v TARGET | $AWK_PROG '{print $2}') != $device_1 ]] && \
 						_fail "mounted device changed"
-- 
2.39.3


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

end of thread, other threads:[~2023-09-12 16:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-06 16:24 [PATCH] fstests: btrfs/185 update for single device pseudo device-scan Anand Jain
2023-09-11 18:32 ` Boris Burkov
2023-09-12  9:07   ` Anand Jain
2023-09-12 16:21     ` Boris Burkov
2023-09-11 18:35 ` Boris Burkov
2023-09-12  9:00   ` Anand Jain
2023-09-12 12:34 ` Zorro Lang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox