"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/misc-tests/038-backup-root-corruption/test.sh" between
btrfs-progs-v5.4.tar.xz and btrfs-progs-v5.4.1.tar.xz

About: btrfs-progs are the userspace utilities for the Linux Btrfs filesystem.

test.sh  (btrfs-progs-v5.4.tar.xz):test.sh  (btrfs-progs-v5.4.1.tar.xz)
skipping to change at line 26 skipping to change at line 26
run_check $SUDO_HELPER touch "$TEST_MNT/file" run_check $SUDO_HELPER touch "$TEST_MNT/file"
run_check_umount_test_dev run_check_umount_test_dev
dump_super() { dump_super() {
run_check_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal dump-super -f "$TEST_DEV" run_check_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal dump-super -f "$TEST_DEV"
} }
# Ensure currently active backup slot is the expected one (slot 3) # Ensure currently active backup slot is the expected one (slot 3)
backup2_root_ptr=$(dump_super | grep -A1 "backup 2" | grep backup_tree_root | aw k '{print $2}') backup2_root_ptr=$(dump_super | grep -A1 "backup 2" | grep backup_tree_root | aw k '{print $2}')
main_root_ptr=$(dump_super | grep root | head -n1 | awk '{print $2}') main_root_ptr=$(dump_super | awk '/^root\t/{print $2}')
[ "$backup2_root_ptr" -eq "$main_root_ptr" ] || _fail "Backup slot 2 is not in u se" [ "$backup2_root_ptr" -eq "$main_root_ptr" ] || _fail "Backup slot 2 is not in u se"
run_check "$TOP/btrfs-corrupt-block" -m $main_root_ptr -f generation "$TEST_DEV" run_check "$TOP/btrfs-corrupt-block" -m $main_root_ptr -f generation "$TEST_DEV"
# Should fail because the root is corrupted # Should fail because the root is corrupted
run_mustfail "Unexpected successful mount" \ run_mustfail "Unexpected successful mount" \
$SUDO_HELPER mount "$TEST_DEV" "$TEST_MNT" $SUDO_HELPER mount "$TEST_DEV" "$TEST_MNT"
# Cycle mount with the backup to force rewrite of slot 3 # Cycle mount with the backup to force rewrite of slot 3
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)