btrfs-progs: tests: fix path of btrfs-corrupt-block

There are two utilities that are required for the testsuite but not
installed on systems. The path in tests must be INTERNAL_BIN.

Fix this issue for below tests:
 * fsck-tests/013-extent-tree-rebuild
 * fsck-tests/037-freespacetree-repair
 * misc-tests/038-backup-root-corruption

Issue: #198
Signed-off-by: Long An <lan@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Long An 2020-01-13 22:49:14 +01:00 committed by David Sterba
parent 82ec6dbd4d
commit bb64c02b90
3 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ test_extent_tree_rebuild()
fi
# corrupt extent root node block
run_check $SUDO_HELPER "$TOP/btrfs-corrupt-block" -l "$extent_root_bytenr" \
run_check $SUDO_HELPER "$INTERNAL_BIN/btrfs-corrupt-block" -l "$extent_root_bytenr" \
-b 4096 "$TEST_DEV"
$SUDO_HELPER "$TOP/btrfs" check "$TEST_DEV" >& /dev/null && \

View File

@ -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"
}

View File

@ -27,7 +27,7 @@ main_root_ptr=$(dump_super | awk '/^root\t/{print $2}')
[ "$backup2_root_ptr" -eq "$main_root_ptr" ] || _fail "Backup slot 2 is 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" \