From bb64c02b904e5dc0da9993bc531516b25692b49f Mon Sep 17 00:00:00 2001 From: Long An Date: Mon, 13 Jan 2020 22:49:14 +0100 Subject: [PATCH] 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 Signed-off-by: David Sterba --- tests/fsck-tests/013-extent-tree-rebuild/test.sh | 2 +- tests/fsck-tests/037-freespacetree-repair/test.sh | 2 +- tests/misc-tests/038-backup-root-corruption/test.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fsck-tests/013-extent-tree-rebuild/test.sh b/tests/fsck-tests/013-extent-tree-rebuild/test.sh index 6b4efc3a..33beb8bf 100755 --- a/tests/fsck-tests/013-extent-tree-rebuild/test.sh +++ b/tests/fsck-tests/013-extent-tree-rebuild/test.sh @@ -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 && \ diff --git a/tests/fsck-tests/037-freespacetree-repair/test.sh b/tests/fsck-tests/037-freespacetree-repair/test.sh index d7ee0f21..49165fcd 100755 --- a/tests/fsck-tests/037-freespacetree-repair/test.sh +++ b/tests/fsck-tests/037-freespacetree-repair/test.sh @@ -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" } diff --git a/tests/misc-tests/038-backup-root-corruption/test.sh b/tests/misc-tests/038-backup-root-corruption/test.sh index 1b370416..5cab4c9a 100755 --- a/tests/misc-tests/038-backup-root-corruption/test.sh +++ b/tests/misc-tests/038-backup-root-corruption/test.sh @@ -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" \