diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:49:25 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:49:25 +0000 |
commit | 464df1d5e5ab1322e2dd0a7796939fff1aeefa9a (patch) | |
tree | 6a403684e0978f0287d7f0ec0e5aab1fd31a59e1 /tests/r_32to64bit_move_itable | |
parent | Initial commit. (diff) | |
download | e2fsprogs-464df1d5e5ab1322e2dd0a7796939fff1aeefa9a.tar.xz e2fsprogs-464df1d5e5ab1322e2dd0a7796939fff1aeefa9a.zip |
Adding upstream version 1.47.0.upstream/1.47.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/r_32to64bit_move_itable')
-rw-r--r-- | tests/r_32to64bit_move_itable/expect | 108 | ||||
-rw-r--r-- | tests/r_32to64bit_move_itable/name | 1 | ||||
-rw-r--r-- | tests/r_32to64bit_move_itable/script | 72 |
3 files changed, 181 insertions, 0 deletions
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 |