mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-24 23:22:27 +00:00
btrfs-progs: tests: convert: add a test case to check the csum for the image file
The new test case would create an empty ext4 with 64K block size, which can lead to a new data chunk which is no longer 1:1 mapped. Then convert the fs and verify it with --check-data-csum to make sure the image file is fine. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
416507904c
commit
1ea7292354
16
tests/convert-tests/023-64k-blocksize-migrated/test.sh
Executable file
16
tests/convert-tests/023-64k-blocksize-migrated/test.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# Make sure the migrated range doesn't cause csum errors
|
||||
|
||||
source "$TEST_TOP/common" || exit
|
||||
source "$TEST_TOP/common.convert" || exit
|
||||
|
||||
setup_root_helper
|
||||
prepare_test_dev 10G
|
||||
|
||||
check_global_prereq mkfs.ext4
|
||||
check_prereq btrfs-convert
|
||||
check_prereq btrfs
|
||||
|
||||
run_check mkfs.ext4 -b 64K -F "$TEST_DEV"
|
||||
run_check $SUDO_HELPER "$TOP/btrfs-convert" --nodesize 64K "$TEST_DEV"
|
||||
run_check $SUDO_HELPER "$TOP/btrfs" check --check-data-csum "$TEST_DEV"
|
Loading…
Reference in New Issue
Block a user