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_global_prereq e2fsck
18 check_global_prereq xzcat
23 # override common function
24 function check_image() {
26 run_check e2fsck -n -f "$TEST_DEV"
27 run_check "$TOP/btrfs-convert" "$TEST_DEV"
28 run_check "$TOP/btrfs" check "$TEST_DEV"
29 run_check "$TOP/btrfs" inspect-internal dump-super "$TEST_DEV"
31 run_check_mount_test_dev
32 run_check $SUDO_HELPER e2fsck -n -f "$TEST_MNT/ext2_saved/image"
33 run_check $SUDO_HELPER umount "$TEST_MNT"
35 run_check "$TOP/btrfs" check "$TEST_DEV"
36 run_check "$TOP/btrfs-convert" -r "$TEST_DEV"
37 run_check e2fsck -n -f "$TEST_DEV"