Skip to contentSkip to conversation

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

PATCH Long An 1 participant 1 message Jan 10, 2020 2 messages not in the archive Btrfs file system

lore
Share & tools
lore

Long An

author
#2 lore raw
In reply to a message not in the archive

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-corruption

---
 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
index d7ee0f21..49165fcd 100755
@@ -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
index f15d0bba..a970691b 100755
@@ -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 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