diff mbox series

btrfs-progs: fix path for btrfs-corrupt-block

Message ID 1578649752.3609.6.camel@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: fix path for btrfs-corrupt-block | expand

Commit Message

An Long Jan. 10, 2020, 9:49 a.m. UTC
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-corruption

Signed-off-by: An Long <lan@suse.com>
---
 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(-)

generation "$TEST_DEV"

 # Should fail because the root is corrupted
 run_mustfail "Unexpected successful mount" \
--
2.16.4

Comments

David Sterba Jan. 13, 2020, 9:52 p.m. UTC | #1
On Fri, Jan 10, 2020 at 09:49:13AM +0000, Long An wrote:
> 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-corruption

Thanks, btrfs-corrupt-block and fssum need to be handled specially for
the testsuite. I found one more test
(fsck-tests/013-extent-tree-rebuild) with wrong path so fixed it as
well.
diff mbox series

Patch

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 f15d0bba..a970691b 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 | grep root | head -n1 |
awk '{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