diff mbox series

[2/4] btrfs-progs: tests/misc/030: do not require v1 cache for the test case

Message ID c56a81542acc3319265ed1041640253d2b4b8276.1691533896.git.wqu@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: tests false alerts fixes | expand

Commit Message

Qu Wenruo Aug. 8, 2023, 10:40 p.m. UTC
[PROBLEM]
Since we have migrated to default v2 cache, the test case
misc/030-missing-device-image is no longer executed:

    [TEST/misc]   030-missing-device-image
    [NOTRUN] unable to create v1 space cache

[CAUSE]
The test case itself is trying its best to cover all paths, including
the data extent read path.

Thus the test case is requiring v1 cache, as that's the only way to
cover the data read path.

[FIX]
Just remove the v1 space cache requirement, it's still better to run the
test even it only exercises the metadata read path.

The good news is, after commit 3ff9d352576b ("btrfs-progs: use
read_data_from_disk() to replace read_extent_from_disk() and replace
read_extent_data()"), all data/metadata read paths are unified.
They only differ in the verification part.

Thus even if we didn't fully exercise the data read path, we didn't lose
much coverage anyway.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 tests/misc-tests/030-missing-device-image/test.sh | 8 --------
 1 file changed, 8 deletions(-)
diff mbox series

Patch

diff --git a/tests/misc-tests/030-missing-device-image/test.sh b/tests/misc-tests/030-missing-device-image/test.sh
index be022c4bb9eb..1438f8a45229 100755
--- a/tests/misc-tests/030-missing-device-image/test.sh
+++ b/tests/misc-tests/030-missing-device-image/test.sh
@@ -37,14 +37,6 @@  test_missing()
 	run_check $SUDO_HELPER dd if=/dev/zero of="$TEST_MNT/b" bs=4k count=1000 conv=sync
 	run_check $SUDO_HELPER umount "$TEST_MNT"
 
-	# make sure we have space cache
-	if ! run_check_stdout "$TOP/btrfs" inspect dump-tree -t root "$dev1" |
-		grep -q "EXTENT_DATA"; then
-		# Normally the above operation should create the space cache.
-		# If not, it may mean we have migrated to v2 cache by default
-		_not_run "unable to create v1 space cache"
-	fi
-
 	# now wipe the device
 	run_check wipefs -fa "$bad_dev"