summaryrefslogtreecommitdiffstats
path: root/tests/r_32to64bit
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/r_32to64bit/expect100
-rw-r--r--tests/r_32to64bit/name1
-rw-r--r--tests/r_32to64bit/script72
-rw-r--r--tests/r_32to64bit_expand_full/expect139
-rw-r--r--tests/r_32to64bit_expand_full/name1
-rw-r--r--tests/r_32to64bit_expand_full/script81
-rw-r--r--tests/r_32to64bit_meta/expect81
-rw-r--r--tests/r_32to64bit_meta/name1
-rw-r--r--tests/r_32to64bit_meta/script72
-rw-r--r--tests/r_32to64bit_move_itable/expect108
-rw-r--r--tests/r_32to64bit_move_itable/name1
-rw-r--r--tests/r_32to64bit_move_itable/script72
12 files changed, 729 insertions, 0 deletions
diff --git a/tests/r_32to64bit/expect b/tests/r_32to64bit/expect
new file mode 100644
index 0000000..de573b3
--- /dev/null
+++ b/tests/r_32to64bit/expect
@@ -0,0 +1,100 @@
+resize2fs test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 477 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+resize2fs test.img -b
+Converting the filesystem to 64-bit.
+The filesystem on test.img is now 524288 (1k) blocks long.
+
+Exit status is 0
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
++Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -10,13 +10,13 @@
+ Inode count: 65536
+ Block count: 524288
+ Reserved block count: 26214
+-Overhead clusters: 35228
+ Free blocks: 589
+ Free inodes: 65048
+ First block: 1
+ Block size: 1024
+ Fragment size: 1024
+-Reserved GDT blocks: 256
++Group descriptor size: 64
++Reserved GDT blocks: 254
+ Blocks per group: 8192
+ Fragments per group: 8192
+ Inodes per group: 1024
+@@ -43,16 +43,16 @@
+
+
+ group:block:super:gdt:bbitmap:ibitmap:itable
+-0:1:1:2-3:260:276:292
+-1:8193:8193:8194-8195:261:277:548
++0:1:1:2-5:260:276:292
++1:8193:8193:8194-8197:261:277:548
+ 2:16385:-1:-1:262:278:804
+-3:24577:24577:24578-24579:263:279:1060
++3:24577:24577:24578-24581:263:279:1060
+ 4:32769:-1:-1:264:280:1316
+-5:40961:40961:40962-40963:265:281:1572
++5:40961:40961:40962-40965:265:281:1572
+ 6:49153:-1:-1:266:282:1828
+-7:57345:57345:57346-57347:267:283:2084
++7:57345:57345:57346-57349:267:283:2084
+ 8:65537:-1:-1:268:284:2340
+-9:73729:73729:73730-73731:269:285:2596
++9:73729:73729:73730-73733:269:285:2596
+ 10:81921:-1:-1:270:286:2852
+ 11:90113:-1:-1:271:287:3108
+ 12:98305:-1:-1:272:288:3364
+@@ -68,9 +68,9 @@
+ 22:180225:-1:-1:131079:131095:132641
+ 23:188417:-1:-1:131080:131096:132897
+ 24:196609:-1:-1:131081:131097:133153
+-25:204801:204801:204802-204803:131082:131098:133409
++25:204801:204801:204802-204805:131082:131098:133409
+ 26:212993:-1:-1:131083:131099:133665
+-27:221185:221185:221186-221187:131084:131100:133921
++27:221185:221185:221186-221189:131084:131100:133921
+ 28:229377:-1:-1:131085:131101:134177
+ 29:237569:-1:-1:131086:131102:134433
+ 30:245761:-1:-1:131087:131103:134689
+@@ -92,7 +92,7 @@
+ 46:376833:-1:-1:262159:262175:265761
+ 47:385025:-1:-1:262160:262176:266017
+ 48:393217:-1:-1:393217:393233:393249
+-49:401409:401409:401410-401411:393218:393234:393505
++49:401409:401409:401410-401413:393218:393234:393505
+ 50:409601:-1:-1:393219:393235:393761
+ 51:417793:-1:-1:393220:393236:394017
+ 52:425985:-1:-1:393221:393237:394273
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/r_32to64bit/name b/tests/r_32to64bit/name
new file mode 100644
index 0000000..fb45fab
--- /dev/null
+++ b/tests/r_32to64bit/name
@@ -0,0 +1 @@
+convert flex_bg 32bit fs to 64bit fs
diff --git a/tests/r_32to64bit/script b/tests/r_32to64bit/script
new file mode 100644
index 0000000..40b8088
--- /dev/null
+++ b/tests/r_32to64bit/script
@@ -0,0 +1,72 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "resize2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 524288 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# resize it
+echo "resize2fs test.img -b" >> $OUT
+$RESIZE2FS -b -f $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/r_32to64bit_expand_full/expect b/tests/r_32to64bit_expand_full/expect
new file mode 100644
index 0000000..f9e30f3
--- /dev/null
+++ b/tests/r_32to64bit_expand_full/expect
@@ -0,0 +1,139 @@
+resize2fs test
+Creating filesystem with 786432 1k blocks and 98304 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 727 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+resize2fs -b test.img
+Converting the filesystem to 64-bit.
+The filesystem on test.img is now 786432 (1k) blocks long.
+
+resize2fs test.img
+Resizing the filesystem on test.img to 1179648 (1k) blocks.
+The filesystem on test.img is now 1179648 (1k) blocks long.
+
+Exit status is 0
+Change in FS metadata:
+@@ -1,15 +1,15 @@
+
+ group:block:super:gdt:bbitmap:ibitmap:itable
+-0:1:1:2-7:8:9:10
+-1:8193:8193:8194-8199:8200:8201:8202
++0:1:1:2-10:266:267:268
++1:8193:8193:8194-8202:8458:8459:8460
+ 2:16385:-1:-1:16385:16386:16387
+-3:24577:24577:24578-24583:24584:24585:24586
++3:24577:24577:24578-24586:24842:24843:24844
+ 4:32769:-1:-1:32769:32770:32771
+-5:40961:40961:40962-40967:40968:40969:40970
++5:40961:40961:40962-40970:41226:41227:41228
+ 6:49153:-1:-1:49153:49154:49155
+-7:57345:57345:57346-57351:57352:57353:57354
++7:57345:57345:57346-57354:57610:57611:57612
+ 8:65537:-1:-1:65537:65538:65539
+-9:73729:73729:73730-73735:73736:73737:73738
++9:73729:73729:73730-73738:73994:73995:73996
+ 10:81921:-1:-1:81921:81922:81923
+ 11:90113:-1:-1:90113:90114:90115
+ 12:98305:-1:-1:98305:98306:98307
+@@ -25,9 +25,9 @@
+ 22:180225:-1:-1:180225:180226:180227
+ 23:188417:-1:-1:188417:188418:188419
+ 24:196609:-1:-1:196609:196610:196611
+-25:204801:204801:204802-204807:204808:204809:204810
++25:204801:204801:204802-204810:205066:205067:205068
+ 26:212993:-1:-1:212993:212994:212995
+-27:221185:221185:221186-221191:221192:221193:221194
++27:221185:221185:221186-221194:221450:221451:221452
+ 28:229377:-1:-1:229377:229378:229379
+ 29:237569:-1:-1:237569:237570:237571
+ 30:245761:-1:-1:245761:245762:245763
+@@ -49,7 +49,7 @@
+ 46:376833:-1:-1:376833:376834:376835
+ 47:385025:-1:-1:385025:385026:385027
+ 48:393217:-1:-1:393217:393218:393219
+-49:401409:401409:401410-401415:401416:401417:401418
++49:401409:401409:401410-401418:401674:401675:401676
+ 50:409601:-1:-1:409601:409602:409603
+ 51:417793:-1:-1:417793:417794:417795
+ 52:425985:-1:-1:425985:425986:425987
+@@ -81,7 +81,7 @@
+ 78:638977:-1:-1:638977:638978:638979
+ 79:647169:-1:-1:647169:647170:647171
+ 80:655361:-1:-1:655361:655362:655363
+-81:663553:663553:663554-663559:663560:663561:663562
++81:663553:663553:663554-663562:663818:663819:663820
+ 82:671745:-1:-1:671745:671746:671747
+ 83:679937:-1:-1:679937:679938:679939
+ 84:688129:-1:-1:688129:688130:688131
+@@ -96,3 +96,51 @@
+ 93:761857:-1:-1:761857:761858:761859
+ 94:770049:-1:-1:770049:770050:770051
+ 95:778241:-1:-1:778241:778242:778243
++96:786433:-1:-1:786433:786434:786435
++97:794625:-1:-1:794625:794626:794627
++98:802817:-1:-1:802817:802818:802819
++99:811009:-1:-1:811009:811010:811011
++100:819201:-1:-1:819201:819202:819203
++101:827393:-1:-1:827393:827394:827395
++102:835585:-1:-1:835585:835586:835587
++103:843777:-1:-1:843777:843778:843779
++104:851969:-1:-1:851969:851970:851971
++105:860161:-1:-1:860161:860162:860163
++106:868353:-1:-1:868353:868354:868355
++107:876545:-1:-1:876545:876546:876547
++108:884737:-1:-1:884737:884738:884739
++109:892929:-1:-1:892929:892930:892931
++110:901121:-1:-1:901121:901122:901123
++111:909313:-1:-1:909313:909314:909315
++112:917505:-1:-1:917505:917506:917507
++113:925697:-1:-1:925697:925698:925699
++114:933889:-1:-1:933889:933890:933891
++115:942081:-1:-1:942081:942082:942083
++116:950273:-1:-1:950273:950274:950275
++117:958465:-1:-1:958465:958466:958467
++118:966657:-1:-1:966657:966658:966659
++119:974849:-1:-1:974849:974850:974851
++120:983041:-1:-1:983041:983042:983043
++121:991233:-1:-1:991233:991234:991235
++122:999425:-1:-1:999425:999426:999427
++123:1007617:-1:-1:1007617:1007618:1007619
++124:1015809:-1:-1:1015809:1015810:1015811
++125:1024001:1024001:1024002-1024010:1024011:1024012:1024013
++126:1032193:-1:-1:1032193:1032194:1032195
++127:1040385:-1:-1:1040385:1040386:1040387
++128:1048577:-1:-1:1048577:1048578:1048579
++129:1056769:-1:-1:1056769:1056770:1056771
++130:1064961:-1:-1:1064961:1064962:1064963
++131:1073153:-1:-1:1073153:1073154:1073155
++132:1081345:-1:-1:1081345:1081346:1081347
++133:1089537:-1:-1:1089537:1089538:1089539
++134:1097729:-1:-1:1097729:1097730:1097731
++135:1105921:-1:-1:1105921:1105922:1105923
++136:1114113:-1:-1:1114113:1114114:1114115
++137:1122305:-1:-1:1122305:1122306:1122307
++138:1130497:-1:-1:1130497:1130498:1130499
++139:1138689:-1:-1:1138689:1138690:1138691
++140:1146881:-1:-1:1146881:1146882:1146883
++141:1155073:-1:-1:1155073:1155074:1155075
++142:1163265:-1:-1:1163265:1163266:1163267
++143:1171457:-1:-1:1171457:1171458:1171459
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/r_32to64bit_expand_full/name b/tests/r_32to64bit_expand_full/name
new file mode 100644
index 0000000..34b08c7
--- /dev/null
+++ b/tests/r_32to64bit_expand_full/name
@@ -0,0 +1 @@
+convert+expand full fs to 64bit
diff --git a/tests/r_32to64bit_expand_full/script b/tests/r_32to64bit_expand_full/script
new file mode 100644
index 0000000..018f42c
--- /dev/null
+++ b/tests/r_32to64bit_expand_full/script
@@ -0,0 +1,81 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+#gzip -d < $EXP.gz > $EXP
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,^resize_inode,^meta_bg,^flex_bg
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "resize2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h $TMPFILE 786432 >> $OUT 2>&1
+rm -f $CONF
+
+# check
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# convert it
+echo "resize2fs -b test.img" >> $OUT
+$RESIZE2FS -b -f $TMPFILE >> $OUT 2>&1
+$DUMPE2FS -g $TMPFILE >> $OUT.before 2> /dev/null
+
+# grow it
+echo "resize2fs test.img" >> $OUT
+dd if=/dev/zero of=$TMPFILE conv=notrunc bs=1 count=1 seek=1207959552 2> /dev/null
+$RESIZE2FS -f $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+$DUMPE2FS -g $TMPFILE >> $OUT.after 2> /dev/null
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+rm $OUT.before $OUT.after
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/r_32to64bit_meta/expect b/tests/r_32to64bit_meta/expect
new file mode 100644
index 0000000..70babbd
--- /dev/null
+++ b/tests/r_32to64bit_meta/expect
@@ -0,0 +1,81 @@
+resize2fs test
+Creating filesystem with 524288 1k blocks and 65536 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 479 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+resize2fs test.img -b
+Converting the filesystem to 64-bit.
+The filesystem on test.img is now 524288 (1k) blocks long.
+
+Exit status is 0
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
++Filesystem features: has_journal ext_attr dir_index filetype meta_bg extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -10,12 +10,12 @@
+ Inode count: 65536
+ Block count: 524288
+ Reserved block count: 26214
+-Overhead clusters: 32912
+-Free blocks: 858
++Free blocks: 852
+ Free inodes: 65046
+ First block: 1
+ Block size: 1024
+ Fragment size: 1024
++Group descriptor size: 64
+ Blocks per group: 8192
+ Fragments per group: 8192
+ Inodes per group: 1024
+@@ -57,9 +57,9 @@
+ 12:98305:-1:-1:15:31:3107
+ 13:106497:-1:-1:16:32:3363
+ 14:114689:-1:-1:17:33:3619
+-15:122881:-1:-1:18:34:3875
+-16:131073:-1:-1:131073:131089:131105
+-17:139265:-1:-1:131074:131090:131361
++15:122881:-1:122881:18:34:3875
++16:131073:-1:131073:135201:131089:131105
++17:139265:-1:139265:131074:131090:131361
+ 18:147457:-1:-1:131075:131091:131617
+ 19:155649:-1:-1:131076:131092:131873
+ 20:163841:-1:-1:131077:131093:132129
+@@ -89,9 +89,9 @@
+ 44:360449:-1:-1:262158:262174:265250
+ 45:368641:-1:-1:262159:262175:265506
+ 46:376833:-1:-1:262160:262176:265762
+-47:385025:-1:-1:262161:262177:266018
+-48:393217:-1:-1:393217:393233:393249
+-49:401409:401409:-1:393218:393234:393505
++47:385025:-1:385025:262161:262177:266018
++48:393217:-1:393217:397345:393233:393249
++49:401409:401409:401410:393218:393234:393505
+ 50:409601:-1:-1:393219:393235:393761
+ 51:417793:-1:-1:393220:393236:394017
+ 52:425985:-1:-1:393221:393237:394273
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/r_32to64bit_meta/name b/tests/r_32to64bit_meta/name
new file mode 100644
index 0000000..d83492e
--- /dev/null
+++ b/tests/r_32to64bit_meta/name
@@ -0,0 +1 @@
+convert meta_bg 32bit fs to 64bit fs
diff --git a/tests/r_32to64bit_meta/script b/tests/r_32to64bit_meta/script
new file mode 100644
index 0000000..20106fd
--- /dev/null
+++ b/tests/r_32to64bit_meta/script
@@ -0,0 +1,72 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,meta_bg,^resize_inode
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "resize2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 524288 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# resize it
+echo "resize2fs test.img -b" >> $OUT
+$RESIZE2FS -b -f $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF
diff --git a/tests/r_32to64bit_move_itable/expect b/tests/r_32to64bit_move_itable/expect
new file mode 100644
index 0000000..a1d2aeb
--- /dev/null
+++ b/tests/r_32to64bit_move_itable/expect
@@ -0,0 +1,108 @@
+resize2fs test
+Creating filesystem with 786432 1k blocks and 98304 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (16384 blocks): done
+Creating 727 huge file(s) with 1024 blocks each: done
+Writing superblocks and filesystem accounting information: done
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
+resize2fs test.img -b
+Converting the filesystem to 64-bit.
+The filesystem on test.img is now 786432 (1k) blocks long.
+
+Exit status is 0
+Change in FS metadata:
+@@ -2,7 +2,7 @@
+ Last mounted on: <not available>
+ Filesystem magic number: 0xEF53
+ Filesystem revision #: 1 (dynamic)
+-Filesystem features: has_journal ext_attr dir_index filetype extent sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
++Filesystem features: has_journal ext_attr dir_index filetype extent 64bit sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
+ Default mount options: user_xattr acl
+ Filesystem state: clean
+ Errors behavior: Continue
+@@ -10,12 +10,12 @@
+ Inode count: 98304
+ Block count: 786432
+ Reserved block count: 39321
+-Overhead clusters: 41193
+-Free blocks: 764
++Free blocks: 734
+ Free inodes: 97566
+ First block: 1
+ Block size: 1024
+ Fragment size: 1024
++Group descriptor size: 64
+ Blocks per group: 8192
+ Fragments per group: 8192
+ Inodes per group: 1024
+@@ -41,16 +41,16 @@
+
+
+ group:block:super:gdt:bbitmap:ibitmap:itable
+-0:1:1:2-4:5:6:7
+-1:8193:8193:8194-8196:8197:8198:8199
++0:1:1:2-7:8:9:10
++1:8193:8193:8194-8199:8200:8201:8202
+ 2:16385:-1:-1:16385:16386:16387
+-3:24577:24577:24578-24580:24581:24582:24583
++3:24577:24577:24578-24583:24584:24585:24586
+ 4:32769:-1:-1:32769:32770:32771
+-5:40961:40961:40962-40964:40965:40966:40967
++5:40961:40961:40962-40967:40968:40969:40970
+ 6:49153:-1:-1:49153:49154:49155
+-7:57345:57345:57346-57348:57349:57350:57351
++7:57345:57345:57346-57351:57352:57353:57354
+ 8:65537:-1:-1:65537:65538:65539
+-9:73729:73729:73730-73732:73733:73734:73735
++9:73729:73729:73730-73735:73736:73737:73738
+ 10:81921:-1:-1:81921:81922:81923
+ 11:90113:-1:-1:90113:90114:90115
+ 12:98305:-1:-1:98305:98306:98307
+@@ -66,9 +66,9 @@
+ 22:180225:-1:-1:180225:180226:180227
+ 23:188417:-1:-1:188417:188418:188419
+ 24:196609:-1:-1:196609:196610:196611
+-25:204801:204801:204802-204804:204805:204806:204807
++25:204801:204801:204802-204807:204808:204809:204810
+ 26:212993:-1:-1:212993:212994:212995
+-27:221185:221185:221186-221188:221189:221190:221191
++27:221185:221185:221186-221191:221192:221193:221194
+ 28:229377:-1:-1:229377:229378:229379
+ 29:237569:-1:-1:237569:237570:237571
+ 30:245761:-1:-1:245761:245762:245763
+@@ -90,7 +90,7 @@
+ 46:376833:-1:-1:376833:376834:376835
+ 47:385025:-1:-1:385025:385026:385027
+ 48:393217:-1:-1:393217:393218:393219
+-49:401409:401409:401410-401412:401413:401414:401415
++49:401409:401409:401410-401415:401416:401417:401418
+ 50:409601:-1:-1:409601:409602:409603
+ 51:417793:-1:-1:417793:417794:417795
+ 52:425985:-1:-1:425985:425986:425987
+@@ -122,7 +122,7 @@
+ 78:638977:-1:-1:638977:638978:638979
+ 79:647169:-1:-1:647169:647170:647171
+ 80:655361:-1:-1:655361:655362:655363
+-81:663553:663553:663554-663556:663557:663558:663559
++81:663553:663553:663554-663559:663560:663561:663562
+ 82:671745:-1:-1:671745:671746:671747
+ 83:679937:-1:-1:679937:679938:679939
+ 84:688129:-1:-1:688129:688130:688131
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+Exit status is 0
diff --git a/tests/r_32to64bit_move_itable/name b/tests/r_32to64bit_move_itable/name
new file mode 100644
index 0000000..7dc2155
--- /dev/null
+++ b/tests/r_32to64bit_move_itable/name
@@ -0,0 +1 @@
+convert 32 to 64bit w/ itable move
diff --git a/tests/r_32to64bit_move_itable/script b/tests/r_32to64bit_move_itable/script
new file mode 100644
index 0000000..0748986
--- /dev/null
+++ b/tests/r_32to64bit_move_itable/script
@@ -0,0 +1,72 @@
+if ! test -x $RESIZE2FS_EXE -o ! -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs/resize2fs)"
+ return 0
+fi
+
+FSCK_OPT=-fn
+OUT=$test_name.log
+EXP=$test_dir/expect
+CONF=$TMPFILE.conf
+
+cat > $CONF << ENDL
+[fs_types]
+ ext4h = {
+ features = has_journal,extent,huge_file,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,^resize_inode,^meta_bg,^flex_bg
+ blocksize = 1024
+ inode_size = 256
+ make_hugefiles = true
+ hugefiles_dir = /
+ hugefiles_slack = 0
+ hugefiles_name = aaaaa
+ hugefiles_digits = 4
+ hugefiles_size = 1M
+ zero_hugefiles = false
+ }
+ENDL
+
+echo "resize2fs test" > $OUT
+
+MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h -o Linux $TMPFILE 786432 >> $OUT 2>&1
+rm -f $CONF
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.before
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# convert it
+echo "resize2fs test.img -b" >> $OUT
+$RESIZE2FS -b -f $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+# dump and check
+($DUMPE2FS -h $TMPFILE; $DUMPE2FS -g $TMPFILE) 2> /dev/null | sed -f $cmd_dir/filter.sed > $OUT.after
+echo "Change in FS metadata:" >> $OUT
+diff -u $OUT.before $OUT.after | tail -n +3 >> $OUT
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1
+status=$?
+echo Exit status is $status >> $OUT
+
+rm $TMPFILE $OUT.before $OUT.after
+
+#
+# Do the verification
+#
+
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' < $OUT > $OUT.new
+mv $OUT.new $OUT
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+fi
+
+unset IMAGE FSCK_OPT OUT EXP CONF