mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-30 06:57:55 +00:00
btrfs-progs: tests: extend fsck/028 to test fix-device-size and mount
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
5a78f577a3
commit
f49e2bc3dc
26
tests/fsck-tests/028-unaligned-super-dev-sizes/test.sh
Executable file
26
tests/fsck-tests/028-unaligned-super-dev-sizes/test.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# An image with mis-aligned superblock total_bytes, that will be found and
|
||||||
|
# fixed by 'check' or fixed by 'rescue fix-device-size'
|
||||||
|
|
||||||
|
source "$TOP/tests/common"
|
||||||
|
|
||||||
|
check_prereq btrfs
|
||||||
|
prepare_test_dev
|
||||||
|
setup_root_helper
|
||||||
|
|
||||||
|
check_all_images
|
||||||
|
|
||||||
|
image=$(extract_image "./dev_and_super_mismatch_unaligned.raw.xz")
|
||||||
|
|
||||||
|
# detect and fix
|
||||||
|
run_check "$TOP/btrfs" rescue fix-device-size "$image"
|
||||||
|
# no problem found
|
||||||
|
run_check "$TOP/btrfs" rescue fix-device-size "$image"
|
||||||
|
# check if fix-device-size worked
|
||||||
|
run_check "$TOP/btrfs" check "$image"
|
||||||
|
# mount test
|
||||||
|
run_check_mount_test_dev
|
||||||
|
run_check_umount_test_dev
|
||||||
|
|
||||||
|
rm -f "$image"
|
Loading…
Reference in New Issue
Block a user