btrfs-progs: fix path for btrfs-corrupt-block
As wenruo said, file generation function might be better. But I think that even so, it still needs to be fixed.
Quoted 50 lines · Long An
btrfs-corrupt-block path is wrong on exported testsutie. Fix this issue
for below tests:
fsck-tests/037-freespacetree-repair misc-tests/038-backup-root-corruptionSigned-off-by An Long <[email protected]>--- tests/fsck-tests/037-freespacetree-repair/test.sh | 2 +- tests/misc-tests/038-backup-root-corruption/test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tests/fsck-tests/037-freespacetree-repair/test.sh +1
-1@@ -46,7 +46,7 @@ corrupt_fst_item() _fail "Unknown item type for corruption" fi - run_check "$TOP/btrfs-corrupt-block" -r 10 -K "$objectid,$type,$offset" \ + run_check "$INTERNAL_BIN/btrfs-corrupt-block" -r 10 -K "$objectid,$type,$offset" \ -f offset "$TEST_DEV"}
tests/misc-tests/038-backup-root-corruption/test.sh +0
-0@@ -27,7 +27,7 @@ main_root_ptr=$(dump_super | grep root | head -n1 | awk '{print $2}') [ "$backup2_root_ptr" -eq "$main_root_ptr" ] || _fail "Backup slot 2is not in use"
-run_check "$TOP/btrfs-corrupt-block" -m $main_root_ptr -f generation "$TEST_DEV"
+run_check "$INTERNAL_BIN/btrfs-corrupt-block" -m $main_root_ptr -f generation "$TEST_DEV"# Should fail because the root is corrupted
run_mustfail"Unexpected successful mount" \
--
2.16.4
Signature · 2 lines
An Long <[email protected]> SUSE SLE-QA , APAC-2 Beijing