mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-25 23:52:17 +00:00
btrfs-progs: tests: misc/030: do not require v1 cache for the test case
[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 3ff9d35257
("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 difference is the verification part.
Thus even if we didn't fully exercise the data read path, we didn't lose
much coverage anyway.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
005d2cc047
commit
885fe371c8
@ -2,7 +2,7 @@
|
||||
# Test that btrfs-image can dump image correctly for a missing device (RAID1)
|
||||
#
|
||||
# At least for RAID1, btrfs-image should be able to handle one missing device
|
||||
# without any problem
|
||||
# without any problem. Only space cache v2 supported.
|
||||
|
||||
source "$TEST_TOP/common" || exit
|
||||
|
||||
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user