3 # Specially created e2image dump to test backup superblock migration for
5 # These images will cause the following problems if convert doesn't handle
6 # backup superblock migration well:
7 # 1) Assert while building free space tree
8 # 2) Error copying inodes
9 # 3) Discontinuous file extents after convert
10 # 4) Overlap file extents
11 # 5) Unable to rollback
13 source $TOP/tests/common
15 check_prereq btrfs-convert
17 check_prereq btrfs-show-super
18 check_global_prereq e2fsck
19 check_global_prereq xzcat
24 # override common function
25 function check_image() {
27 run_check e2fsck -n -f $TEST_DEV
28 run_check $TOP/btrfs-convert $TEST_DEV
29 run_check $TOP/btrfs check $TEST_DEV
30 run_check $TOP/btrfs-show-super $TEST_DEV
32 run_check_mount_test_dev
33 run_check $SUDO_HELPER e2fsck -n -f $TEST_MNT/ext2_saved/image
34 run_check $SUDO_HELPER umount $TEST_MNT
36 run_check $TOP/btrfs check $TEST_DEV
37 run_check $TOP/btrfs-convert -r $TEST_DEV
38 run_check e2fsck -n -f $TEST_DEV