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/f_badcluster | |
parent | Initial commit. (diff) | |
download | e2fsprogs-upstream/1.47.0.tar.xz e2fsprogs-upstream/1.47.0.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/f_badcluster')
-rw-r--r-- | tests/f_badcluster/expect | 194 | ||||
-rw-r--r-- | tests/f_badcluster/image.gz | bin | 0 -> 3149 bytes | |||
-rw-r--r-- | tests/f_badcluster/name | 1 | ||||
-rw-r--r-- | tests/f_badcluster/script | 29 |
4 files changed, 224 insertions, 0 deletions
diff --git a/tests/f_badcluster/expect b/tests/f_badcluster/expect new file mode 100644 index 0000000..b44e65d --- /dev/null +++ b/tests/f_badcluster/expect @@ -0,0 +1,194 @@ +Pass 1: Checking inodes, blocks, and sizes +Inode 12 logical block 2 (physical block 1154) violates cluster allocation rules. +Will fix in pass 1B. +Inode 12, i_blocks is 32, should be 64. Fix? yes + +Inode 16 logical block 5 (physical block 1173) violates cluster allocation rules. +Will fix in pass 1B. +Inode 16, i_size is 3072, should be 6144. Fix? yes + +Inode 16, i_blocks is 32, should be 64. Fix? yes + +Inode 17 logical block 0 (physical block 1186) violates cluster allocation rules. +Will fix in pass 1B. +Inode 17 logical block 2 (physical block 1184) violates cluster allocation rules. +Will fix in pass 1B. +Inode 18 logical block 3 (physical block 1201) violates cluster allocation rules. +Will fix in pass 1B. +Inode 18, i_blocks is 32, should be 64. Fix? yes + +Inode 15 on bigalloc filesystem cannot be block mapped. Fix? yes + + +Running additional passes to resolve blocks claimed by more than one inode... +Pass 1B: Rescanning for multiply-claimed blocks +Multiply-claimed block(s) in inode 12: 1154 +Multiply-claimed block(s) in inode 13: 1152--1154 +Multiply-claimed block(s) in inode 14: 1648--1650 +Multiply-claimed block(s) in inode 15: 1650 +Multiply-claimed block(s) in inode 16: 1173 +Multiply-claimed block(s) in inode 17: 1186 1185 1184 +Multiply-claimed block(s) in inode 18: 1201 +Pass 1C: Scanning directories for inodes with multiply-claimed blocks +Pass 1D: Reconciling multiply-claimed blocks +(There are 7 inodes containing multiply-claimed blocks.) + +File /a (inode #12, mod time Tue Jun 17 08:00:50 2014) + has 1 multiply-claimed block(s), shared with 1 file(s): + /b (inode #13, mod time Tue Jun 17 08:00:50 2014) +Clone multiply-claimed blocks? yes + +File /b (inode #13, mod time Tue Jun 17 08:00:50 2014) + has 1 multiply-claimed block(s), shared with 1 file(s): + /a (inode #12, mod time Tue Jun 17 08:00:50 2014) +Multiply-claimed blocks already reassigned or cloned. + +File /c (inode #14, mod time Tue Jun 17 08:00:50 2014) + has 1 multiply-claimed block(s), shared with 1 file(s): + /d (inode #15, mod time Tue Jun 17 08:00:50 2014) +Clone multiply-claimed blocks? yes + +File /d (inode #15, mod time Tue Jun 17 08:00:50 2014) + has 1 multiply-claimed block(s), shared with 1 file(s): + /c (inode #14, mod time Tue Jun 17 08:00:50 2014) +Multiply-claimed blocks already reassigned or cloned. + +File /e (inode #16, mod time Tue Jun 17 08:00:50 2014) + has 1 multiply-claimed block(s), shared with 0 file(s): +Clone multiply-claimed blocks? yes + +File /f (inode #17, mod time Tue Jun 17 08:00:50 2014) + has 1 multiply-claimed block(s), shared with 0 file(s): +Clone multiply-claimed blocks? yes + +File /g (inode #18, mod time Tue Jun 17 08:00:50 2014) + has 1 multiply-claimed block(s), shared with 0 file(s): +Clone multiply-claimed blocks? yes + +Pass 1E: Optimizing extent trees +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +Free blocks count wrong for group #0 (51, counted=48). +Fix? yes + +Free blocks count wrong (816, counted=768). +Fix? yes + + +test_fs: ***** FILE SYSTEM WAS MODIFIED ***** +test_fs: 18/128 files (22.2% non-contiguous), 1280/2048 blocks +Pass 1: Checking inodes, blocks, and sizes +Inode 12, i_blocks is 64, should be 32. Fix? yes + +Inode 16, i_blocks is 64, should be 32. Fix? yes + +Inode 18, i_blocks is 64, should be 32. Fix? yes + +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +Block bitmap differences: -(1168--1200) +Fix? yes + +Free blocks count wrong for group #0 (48, counted=51). +Fix? yes + +Free blocks count wrong (768, counted=816). +Fix? yes + + +test_fs: ***** FILE SYSTEM WAS MODIFIED ***** +test_fs: 18/128 files (5.6% non-contiguous), 1232/2048 blocks +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 +test_fs: 18/128 files (5.6% non-contiguous), 1232/2048 blocks +debugfs: stat /a +Inode: 12 Type: regular Mode: 0644 Flags: 0x80000 +Generation: 1117152157 Version: 0x00000001 +User: 0 Group: 0 Size: 3072 +File ACL: 0 +Links: 1 Blockcount: 32 +Fragment: Address: 0 Number: 0 Size: 0 +ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +EXTENTS: +(0-1):1136-1137, (2):1138 +debugfs: stat /b +Inode: 13 Type: regular Mode: 0644 Flags: 0x80000 +Generation: 1117152158 Version: 0x00000001 +User: 0 Group: 0 Size: 3072 +File ACL: 0 +Links: 1 Blockcount: 32 +Fragment: Address: 0 Number: 0 Size: 0 +ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +EXTENTS: +(0-2):1152-1154 +debugfs: stat /c +Inode: 14 Type: regular Mode: 0644 Flags: 0x80000 +Generation: 1117152159 Version: 0x00000001 +User: 0 Group: 0 Size: 3072 +File ACL: 0 +Links: 1 Blockcount: 32 +Fragment: Address: 0 Number: 0 Size: 0 +ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +EXTENTS: +(0-1):1216-1217, (2):1218 +debugfs: stat /d +Inode: 15 Type: regular Mode: 0644 Flags: 0x80000 +Generation: 1117152160 Version: 0x00000001 +User: 0 Group: 0 Size: 3072 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +EXTENTS: +debugfs: stat /e +Inode: 16 Type: regular Mode: 0644 Flags: 0x80000 +Generation: 1117152161 Version: 0x00000001 +User: 0 Group: 0 Size: 6144 +File ACL: 0 +Links: 1 Blockcount: 32 +Fragment: Address: 0 Number: 0 Size: 0 +ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +EXTENTS: +(0-2):1664-1666, (5):1669 +debugfs: stat /f +Inode: 17 Type: regular Mode: 0644 Flags: 0x80000 +Generation: 1117152162 Version: 0x00000001 +User: 0 Group: 0 Size: 3072 +File ACL: 0 +Links: 1 Blockcount: 32 +Fragment: Address: 0 Number: 0 Size: 0 +ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +EXTENTS: +(0):1232, (1):1233, (2):1234 +debugfs: stat /g +Inode: 18 Type: regular Mode: 0644 Flags: 0x80000 +Generation: 1117152163 Version: 0x00000001 +User: 0 Group: 0 Size: 3072 +File ACL: 0 +Links: 1 Blockcount: 32 +Fragment: Address: 0 Number: 0 Size: 0 +ctime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +atime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +mtime: 0x539ff5b2 -- Tue Jun 17 08:00:50 2014 +EXTENTS: +(0-2):1680-1682, (3):1683 +debugfs: quit diff --git a/tests/f_badcluster/image.gz b/tests/f_badcluster/image.gz Binary files differnew file mode 100644 index 0000000..3f21e98 --- /dev/null +++ b/tests/f_badcluster/image.gz diff --git a/tests/f_badcluster/name b/tests/f_badcluster/name new file mode 100644 index 0000000..06bad7c --- /dev/null +++ b/tests/f_badcluster/name @@ -0,0 +1 @@ +test alignment problems with bigalloc clusters diff --git a/tests/f_badcluster/script b/tests/f_badcluster/script new file mode 100644 index 0000000..6c9e1cf --- /dev/null +++ b/tests/f_badcluster/script @@ -0,0 +1,29 @@ +if ! test -x $DEBUGFS_EXE; then + echo "$test_name: $test_description: skipped (no debugfs)" + return 0 +fi + +IMAGE=$test_dir/../f_badcluster/image.gz +OUT=$test_name.log +EXP=$test_dir/expect +gzip -d < $IMAGE > $TMPFILE +$FSCK -fy $TMPFILE > $OUT.new 2>&1 +$FSCK -fy $TMPFILE >> $OUT.new 2>&1 +$FSCK -fy $TMPFILE >> $OUT.new 2>&1 +for i in a b c d e f g; do echo "stat /$i"; done > $TMPFILE.cmd +echo "quit" >> $TMPFILE.cmd +$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1 +sed -f $cmd_dir/filter.sed $OUT.new > $OUT +rm -f $TMPFILE $TMPFILE.cmd $OUT.new + +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 + rm -f $test_name.tmp +fi |