diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 04:59:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 04:59:33 +0000 |
commit | 73193347133e750faf27f88fd3ab31ce43aff062 (patch) | |
tree | e28a6d9512d1787b1fcbe9167188c9d134bf51d9 /tests | |
parent | Adding upstream version 1.47.0. (diff) | |
download | e2fsprogs-73193347133e750faf27f88fd3ab31ce43aff062.tar.xz e2fsprogs-73193347133e750faf27f88fd3ab31ce43aff062.zip |
Adding upstream version 1.47.1.upstream/1.47.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
112 files changed, 1436 insertions, 153 deletions
diff --git a/tests/d_corrupt_journal_nr_users/expect b/tests/d_corrupt_journal_nr_users/expect index 656d35c..6267f90 100644 --- a/tests/d_corrupt_journal_nr_users/expect +++ b/tests/d_corrupt_journal_nr_users/expect @@ -26,7 +26,7 @@ Check interval: 0 (<none>) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Journal inode: 8 diff --git a/tests/f_bad_disconnected_inode/expect.1 b/tests/f_bad_disconnected_inode/expect.1 index d1479ce..39c6958 100644 --- a/tests/f_bad_disconnected_inode/expect.1 +++ b/tests/f_bad_disconnected_inode/expect.1 @@ -1,11 +1,17 @@ Pass 1: Checking inodes, blocks, and sizes +Inode 1 has the ea_inode flag set but is not a regular file. Clear flag? yes + Inode 1 has EXTENTS_FL flag set on filesystem without extents support. Clear? yes Inode 9 has the casefold flag set but is not a directory. Clear flag? yes +Inode 10 has the ea_inode flag set but is not a regular file. Clear flag? yes + Inode 14 has the casefold flag set but is not a directory. Clear flag? yes +Inode 14 has the ea_inode flag set but is not a regular file. Clear flag? yes + Inode 14 has INLINE_DATA_FL flag on filesystem without inline data support. Clear? yes @@ -14,6 +20,8 @@ Clear? yes Inode 16 has the casefold flag set but is not a directory. Clear flag? yes +Inode 16 has the ea_inode flag set but is not a regular file. Clear flag? yes + Inode 16 has INLINE_DATA_FL flag on filesystem without inline data support. Clear? yes diff --git a/tests/f_bad_fname/expect.1 b/tests/f_bad_fname/expect.1 index 66f87df..60f64f6 100644 --- a/tests/f_bad_fname/expect.1 +++ b/tests/f_bad_fname/expect.1 @@ -1,4 +1,6 @@ Pass 1: Checking inodes, blocks, and sizes +Inode 12 has the ea_inode flag set but is not a regular file. Clear flag? yes + Pass 2: Checking directory structure Entry 'AM-^?' in /ci_dir (12) has illegal UTF-8 characters in its name. Fix? yes diff --git a/tests/f_boundscheck/expect.1 b/tests/f_boundscheck/expect.1 index c2170b8..5c9ead4 100644 --- a/tests/f_boundscheck/expect.1 +++ b/tests/f_boundscheck/expect.1 @@ -1,6 +1,5 @@ ext2fs_check_desc: Corrupt group descriptor: bad block for inode table ../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks... -../e2fsck/e2fsck: Bad magic number in super-block while using the backup blocks../e2fsck/e2fsck: going back to original superblock Note: if several inode or block bitmap blocks or part of the inode table require relocation, you may wish to try running e2fsck with the '-b 8193' option first. The problem diff --git a/tests/f_boundscheck/expect.2 b/tests/f_boundscheck/expect.2 index c2170b8..5c9ead4 100644 --- a/tests/f_boundscheck/expect.2 +++ b/tests/f_boundscheck/expect.2 @@ -1,6 +1,5 @@ ext2fs_check_desc: Corrupt group descriptor: bad block for inode table ../e2fsck/e2fsck: Group descriptors look bad... trying backup blocks... -../e2fsck/e2fsck: Bad magic number in super-block while using the backup blocks../e2fsck/e2fsck: going back to original superblock Note: if several inode or block bitmap blocks or part of the inode table require relocation, you may wish to try running e2fsck with the '-b 8193' option first. The problem diff --git a/tests/f_desc_size_bad/script b/tests/f_desc_size_bad/script index ae29627..40852c9 100644 --- a/tests/f_desc_size_bad/script +++ b/tests/f_desc_size_bad/script @@ -9,8 +9,8 @@ touch $TMPFILE $MKE2FS -F -o Linux -O 64bit,extents -N 32 -b 1024 -g 512 -E desc_size=128 $TMPFILE 2048 > $test_name.log 2>&1 $DEBUGFS -R "ssv desc_size 129" -w $TMPFILE >> $test_name.log 2>&1 -E2FSCK_TIME=200704102100 -export E2FSCK_TIME +#E2FSCK_TIME=1176238800 +#export E2FSCK_TIME . $cmd_dir/run_e2fsck diff --git a/tests/f_desc_size_zero/expect.1 b/tests/f_desc_size_zero/expect.1 new file mode 100644 index 0000000..acb752a --- /dev/null +++ b/tests/f_desc_size_zero/expect.1 @@ -0,0 +1,13 @@ +../e2fsck/e2fsck: Block group descriptor size incorrect while trying to open test.img +../e2fsck/e2fsck: Trying to load superblock despite errors... +../e2fsck/e2fsck: Block group descriptor size incorrect while trying to open test.img + +The superblock could not be read or does not describe a valid ext2/ext3/ext4 +filesystem. If the device is valid and it really contains an ext2/ext3/ext4 +filesystem (and not swap or ufs or something else), then the superblock +is corrupt, and you might try running e2fsck with an alternate superblock: + e2fsck -b 8193 <device> + or + e2fsck -b 32768 <device> + +Exit status is 8 diff --git a/tests/f_desc_size_zero/image.gz b/tests/f_desc_size_zero/image.gz Binary files differnew file mode 100644 index 0000000..4e43c0c --- /dev/null +++ b/tests/f_desc_size_zero/image.gz diff --git a/tests/f_desc_size_zero/name b/tests/f_desc_size_zero/name new file mode 100644 index 0000000..e77bb11 --- /dev/null +++ b/tests/f_desc_size_zero/name @@ -0,0 +1 @@ +zero s_desc_size diff --git a/tests/f_desc_size_zero/script b/tests/f_desc_size_zero/script new file mode 100644 index 0000000..8ab2b9c --- /dev/null +++ b/tests/f_desc_size_zero/script @@ -0,0 +1,2 @@ +ONE_PASS_ONLY="true" +. $cmd_dir/run_e2fsck diff --git a/tests/f_dup4/script b/tests/f_dup4/script index aec862d..94db73a 100644 --- a/tests/f_dup4/script +++ b/tests/f_dup4/script @@ -45,7 +45,7 @@ set_inode_field /dir3/foe block[0] 34 q EOF -E2FSCK_TIME=200704102100 +E2FSCK_TIME=1176238800 export E2FSCK_TIME . $cmd_dir/run_e2fsck diff --git a/tests/f_ea_inode_dir_ref/expect.1 b/tests/f_ea_inode_dir_ref/expect.1 new file mode 100644 index 0000000..fa6a872 --- /dev/null +++ b/tests/f_ea_inode_dir_ref/expect.1 @@ -0,0 +1,12 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Entry 'xlink' in / (2) references EA inode 13. +Clear? yes + +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 13/128 files (0.0% non-contiguous), 63/1024 blocks +Exit status is 1 diff --git a/tests/f_ea_inode_dir_ref/expect.2 b/tests/f_ea_inode_dir_ref/expect.2 new file mode 100644 index 0000000..24d059a --- /dev/null +++ b/tests/f_ea_inode_dir_ref/expect.2 @@ -0,0 +1,7 @@ +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_filesys: 13/128 files (0.0% non-contiguous), 63/1024 blocks +Exit status is 0 diff --git a/tests/f_ea_inode_dir_ref/image.gz b/tests/f_ea_inode_dir_ref/image.gz Binary files differnew file mode 100644 index 0000000..483cc72 --- /dev/null +++ b/tests/f_ea_inode_dir_ref/image.gz diff --git a/tests/f_ea_inode_dir_ref/name b/tests/f_ea_inode_dir_ref/name new file mode 100644 index 0000000..e43cd69 --- /dev/null +++ b/tests/f_ea_inode_dir_ref/name @@ -0,0 +1 @@ +true ea inode referenced from a directory diff --git a/tests/f_ea_inode_disconnected/expect.1 b/tests/f_ea_inode_disconnected/expect.1 new file mode 100644 index 0000000..afc77ae --- /dev/null +++ b/tests/f_ea_inode_disconnected/expect.1 @@ -0,0 +1,23 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Unattached inode 13 +Connect to /lost+found? yes + +Inode 13 ref count is 2, should be 1. Fix? yes + +Pass 5: Checking group summary information +Inode bitmap differences: -12 +Fix? yes + +Free inodes count wrong for group #0 (115, counted=116). +Fix? yes + +Free inodes count wrong (115, counted=116). +Fix? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 12/128 files (0.0% non-contiguous), 63/1024 blocks +Exit status is 1 diff --git a/tests/f_ea_inode_disconnected/expect.2 b/tests/f_ea_inode_disconnected/expect.2 new file mode 100644 index 0000000..a67f944 --- /dev/null +++ b/tests/f_ea_inode_disconnected/expect.2 @@ -0,0 +1,7 @@ +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_filesys: 12/128 files (0.0% non-contiguous), 63/1024 blocks +Exit status is 0 diff --git a/tests/f_ea_inode_disconnected/image b/tests/f_ea_inode_disconnected/image Binary files differnew file mode 100644 index 0000000..f24547c --- /dev/null +++ b/tests/f_ea_inode_disconnected/image diff --git a/tests/f_ea_inode_disconnected/image.gz b/tests/f_ea_inode_disconnected/image.gz Binary files differnew file mode 100644 index 0000000..f440f20 --- /dev/null +++ b/tests/f_ea_inode_disconnected/image.gz diff --git a/tests/f_ea_inode_disconnected/name b/tests/f_ea_inode_disconnected/name new file mode 100644 index 0000000..ce04192 --- /dev/null +++ b/tests/f_ea_inode_disconnected/name @@ -0,0 +1 @@ +ea inode that is not connected anywhere diff --git a/tests/f_ea_inode_no_feature/expect.1 b/tests/f_ea_inode_no_feature/expect.1 new file mode 100644 index 0000000..f6a232b --- /dev/null +++ b/tests/f_ea_inode_no_feature/expect.1 @@ -0,0 +1,12 @@ +Pass 1: Checking inodes, blocks, and sizes +Inode 12 references EA inode but superblock is missing EA_INODE feature +Fix? yes + +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 13/128 files (0.0% non-contiguous), 63/1024 blocks +Exit status is 1 diff --git a/tests/f_ea_inode_no_feature/expect.2 b/tests/f_ea_inode_no_feature/expect.2 new file mode 100644 index 0000000..24d059a --- /dev/null +++ b/tests/f_ea_inode_no_feature/expect.2 @@ -0,0 +1,7 @@ +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_filesys: 13/128 files (0.0% non-contiguous), 63/1024 blocks +Exit status is 0 diff --git a/tests/f_ea_inode_no_feature/image.gz b/tests/f_ea_inode_no_feature/image.gz Binary files differnew file mode 100644 index 0000000..596d69a --- /dev/null +++ b/tests/f_ea_inode_no_feature/image.gz diff --git a/tests/f_ea_inode_no_feature/name b/tests/f_ea_inode_no_feature/name new file mode 100644 index 0000000..b357afb --- /dev/null +++ b/tests/f_ea_inode_no_feature/name @@ -0,0 +1 @@ +inode with ea inode but EA_INODE feature is not set diff --git a/tests/f_ea_inode_self_ref/expect.1 b/tests/f_ea_inode_self_ref/expect.1 index f94c04d..35bea14 100644 --- a/tests/f_ea_inode_self_ref/expect.1 +++ b/tests/f_ea_inode_self_ref/expect.1 @@ -7,6 +7,8 @@ Clear? yes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts +Regular filesystem inode 16 has EA_INODE flag set. Clear? yes + Pass 5: Checking group summary information Block bitmap differences: -20 Fix? yes diff --git a/tests/f_ea_inode_spurious_flag_dir/expect.1 b/tests/f_ea_inode_spurious_flag_dir/expect.1 new file mode 100644 index 0000000..19999ab --- /dev/null +++ b/tests/f_ea_inode_spurious_flag_dir/expect.1 @@ -0,0 +1,11 @@ +Pass 1: Checking inodes, blocks, and sizes +Inode 2 has the ea_inode flag set but is not a regular file. Clear flag? yes + +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 11/128 files (0.0% non-contiguous), 58/1024 blocks +Exit status is 1 diff --git a/tests/f_ea_inode_spurious_flag_dir/expect.2 b/tests/f_ea_inode_spurious_flag_dir/expect.2 new file mode 100644 index 0000000..a354770 --- /dev/null +++ b/tests/f_ea_inode_spurious_flag_dir/expect.2 @@ -0,0 +1,7 @@ +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_filesys: 11/128 files (0.0% non-contiguous), 58/1024 blocks +Exit status is 0 diff --git a/tests/f_ea_inode_spurious_flag_dir/image b/tests/f_ea_inode_spurious_flag_dir/image Binary files differnew file mode 100644 index 0000000..f323b61 --- /dev/null +++ b/tests/f_ea_inode_spurious_flag_dir/image diff --git a/tests/f_ea_inode_spurious_flag_dir/image.gz b/tests/f_ea_inode_spurious_flag_dir/image.gz Binary files differnew file mode 100644 index 0000000..af19132 --- /dev/null +++ b/tests/f_ea_inode_spurious_flag_dir/image.gz diff --git a/tests/f_ea_inode_spurious_flag_dir/name b/tests/f_ea_inode_spurious_flag_dir/name new file mode 100644 index 0000000..8ae52cc --- /dev/null +++ b/tests/f_ea_inode_spurious_flag_dir/name @@ -0,0 +1 @@ +ea inode flag set on a directory diff --git a/tests/f_inlinedir_bad_symlink/expect.1 b/tests/f_inlinedir_bad_symlink/expect.1 new file mode 100644 index 0000000..e1d0e87 --- /dev/null +++ b/tests/f_inlinedir_bad_symlink/expect.1 @@ -0,0 +1,12 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Symlink /a/7 (inode #19) is invalid. +Clear? yes + +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 19/112 files (0.0% non-contiguous), 16/200 blocks +Exit status is 1 diff --git a/tests/f_inlinedir_bad_symlink/expect.2 b/tests/f_inlinedir_bad_symlink/expect.2 new file mode 100644 index 0000000..b881d65 --- /dev/null +++ b/tests/f_inlinedir_bad_symlink/expect.2 @@ -0,0 +1,7 @@ +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_filesys: 19/112 files (0.0% non-contiguous), 16/200 blocks +Exit status is 0 diff --git a/tests/f_inlinedir_bad_symlink/image.gz b/tests/f_inlinedir_bad_symlink/image.gz Binary files differnew file mode 100644 index 0000000..c5bd71a --- /dev/null +++ b/tests/f_inlinedir_bad_symlink/image.gz diff --git a/tests/f_inlinedir_bad_symlink/name b/tests/f_inlinedir_bad_symlink/name new file mode 100644 index 0000000..f7f7f0d --- /dev/null +++ b/tests/f_inlinedir_bad_symlink/name @@ -0,0 +1 @@ +bad symlink in an inline directory diff --git a/tests/f_itable_collision/expect.1 b/tests/f_itable_collision/expect.1 index 01c85d4..fbab323 100644 --- a/tests/f_itable_collision/expect.1 +++ b/tests/f_itable_collision/expect.1 @@ -27,14 +27,14 @@ Clear inode? yes Restarting e2fsck from the beginning... Pass 1: Checking inodes, blocks, and sizes Inode 12 block 37 conflicts with critical metadata, skipping block checks. -Illegal block number passed to ext2fs_test_block_bitmap #4294967294 for in-use block map -Illegal block number passed to ext2fs_mark_block_bitmap #4294967294 for in-use block map +Illegal block number passed to ext2fs_test_block_bitmap #2147483646 for in-use block map +Illegal block number passed to ext2fs_mark_block_bitmap #2147483646 for in-use block map Illegal block number passed to ext2fs_test_block_bitmap #268435455 for in-use block map Illegal block number passed to ext2fs_mark_block_bitmap #268435455 for in-use block map Running additional passes to resolve blocks claimed by more than one inode... Pass 1B: Rescanning for multiply-claimed blocks -Illegal block number passed to ext2fs_test_block_bitmap #4294967294 for multiply claimed block map +Illegal block number passed to ext2fs_test_block_bitmap #2147483646 for multiply claimed block map Illegal block number passed to ext2fs_test_block_bitmap #268435455 for multiply claimed block map Multiply-claimed block(s) in inode 12: 37 Pass 1C: Scanning directories for inodes with multiply-claimed blocks @@ -46,7 +46,7 @@ File /a (inode #12, mod time Fri Jun 27 18:34:44 2014) <filesystem metadata> Clone multiply-claimed blocks? yes -Illegal block number passed to ext2fs_test_block_bitmap #4294967294 for multiply claimed block map +Illegal block number passed to ext2fs_test_block_bitmap #2147483646 for multiply claimed block map Illegal block number passed to ext2fs_test_block_bitmap #268435455 for multiply claimed block map Pass 2: Checking directory structure Setting filetype for entry 'bad1' in / (2) to 1. @@ -54,7 +54,7 @@ Setting filetype for entry 'bad2' in / (2) to 1. Restarting e2fsck from the beginning... Pass 1: Checking inodes, blocks, and sizes Inode 12 has an invalid extent - (logical block 0, invalid physical block 4294967294, len 1) + (logical block 0, invalid physical block 2147483646, len 1) Clear? yes Inode 12 has an invalid extent diff --git a/tests/f_itable_collision/script b/tests/f_itable_collision/script index 66abd90..9d76c23 100755 --- a/tests/f_itable_collision/script +++ b/tests/f_itable_collision/script @@ -6,7 +6,7 @@ FSCK_OPT=-fy IMAGE=$test_dir/image.gz -E2FSCK_TIME=4294967294 +E2FSCK_TIME=2147483646 export E2FSCK_TIME gzip -d < $IMAGE > $TMPFILE diff --git a/tests/f_jnl_errno/expect.0 b/tests/f_jnl_errno/expect.0 index 96fb01a..9b5b189 100644 --- a/tests/f_jnl_errno/expect.0 +++ b/tests/f_jnl_errno/expect.0 @@ -26,7 +26,7 @@ Check interval: 0 (<none>) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 128 +Inode size: 128 Journal inode: 8 Default directory hash: half_md4 Journal backup: inode blocks diff --git a/tests/f_preen_htree_csum/expect.1 b/tests/f_preen_htree_csum/expect.1 new file mode 100644 index 0000000..bbd8194 --- /dev/null +++ b/tests/f_preen_htree_csum/expect.1 @@ -0,0 +1,4 @@ +test_filesys: Problem in HTREE directory inode 12: internal node fails checksum. +HTREE INDEX CLEARED. +test_filesys: 8204/10000 files (0.0% non-contiguous), 1551/4096 blocks +Exit status is 1 diff --git a/tests/f_preen_htree_csum/expect.2 b/tests/f_preen_htree_csum/expect.2 new file mode 100644 index 0000000..0730c4a --- /dev/null +++ b/tests/f_preen_htree_csum/expect.2 @@ -0,0 +1,7 @@ +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_filesys: 8204/10000 files (0.0% non-contiguous), 1551/4096 blocks +Exit status is 0 diff --git a/tests/f_preen_htree_csum/image.gz b/tests/f_preen_htree_csum/image.gz Binary files differnew file mode 100644 index 0000000..94ce8e1 --- /dev/null +++ b/tests/f_preen_htree_csum/image.gz diff --git a/tests/f_preen_htree_csum/name b/tests/f_preen_htree_csum/name new file mode 100644 index 0000000..c915eec --- /dev/null +++ b/tests/f_preen_htree_csum/name @@ -0,0 +1 @@ +fix a bad htree checksum in preen mode diff --git a/tests/f_preen_htree_csum/script b/tests/f_preen_htree_csum/script new file mode 100644 index 0000000..23ab8b6 --- /dev/null +++ b/tests/f_preen_htree_csum/script @@ -0,0 +1,2 @@ +FSCK_OPT=-pf +. $cmd_dir/run_e2fsck diff --git a/tests/f_quota_deallocate_inode/expect.1 b/tests/f_quota_deallocate_inode/expect.1 new file mode 100644 index 0000000..2b2f128 --- /dev/null +++ b/tests/f_quota_deallocate_inode/expect.1 @@ -0,0 +1,18 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Symlink /testlink (inode #14) is invalid. +Clear? yes + +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 4) != expected (16384, 5) +Update quota info for quota type 0? yes + +[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 4) != expected (16384, 5) +Update quota info for quota type 1? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 13/256 files (15.4% non-contiguous), 1157/8192 blocks +Exit status is 1 diff --git a/tests/f_quota_deallocate_inode/expect.2 b/tests/f_quota_deallocate_inode/expect.2 new file mode 100644 index 0000000..8023179 --- /dev/null +++ b/tests/f_quota_deallocate_inode/expect.2 @@ -0,0 +1,7 @@ +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_filesys: 13/256 files (15.4% non-contiguous), 1157/8192 blocks +Exit status is 0 diff --git a/tests/f_quota_deallocate_inode/image.gz b/tests/f_quota_deallocate_inode/image.gz Binary files differnew file mode 100644 index 0000000..798a72c --- /dev/null +++ b/tests/f_quota_deallocate_inode/image.gz diff --git a/tests/f_quota_deallocate_inode/name b/tests/f_quota_deallocate_inode/name new file mode 100644 index 0000000..396887c --- /dev/null +++ b/tests/f_quota_deallocate_inode/name @@ -0,0 +1 @@ +update quota when deallocating bad inode diff --git a/tests/f_quota_shrinkdir/expect.1 b/tests/f_quota_shrinkdir/expect.1 new file mode 100644 index 0000000..e4fc48e --- /dev/null +++ b/tests/f_quota_shrinkdir/expect.1 @@ -0,0 +1,18 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +/lost+found not found. Create? yes + +Pass 3A: Optimizing directories +Pass 4: Checking reference counts +Pass 5: Checking group summary information +[QUOTA WARNING] Usage inconsistent for ID 0:actual (3072, 3) != expected (13312, 2) +Update quota info for quota type 0? yes + +[QUOTA WARNING] Usage inconsistent for ID 0:actual (3072, 3) != expected (13312, 2) +Update quota info for quota type 1? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 12/256 files (16.7% non-contiguous), 1145/8192 blocks +Exit status is 1 diff --git a/tests/f_quota_shrinkdir/expect.2 b/tests/f_quota_shrinkdir/expect.2 new file mode 100644 index 0000000..fcb2cb8 --- /dev/null +++ b/tests/f_quota_shrinkdir/expect.2 @@ -0,0 +1,7 @@ +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_filesys: 12/256 files (16.7% non-contiguous), 1145/8192 blocks +Exit status is 0 diff --git a/tests/f_quota_shrinkdir/image.gz b/tests/f_quota_shrinkdir/image.gz Binary files differnew file mode 100644 index 0000000..1fee3ca --- /dev/null +++ b/tests/f_quota_shrinkdir/image.gz diff --git a/tests/f_quota_shrinkdir/name b/tests/f_quota_shrinkdir/name new file mode 100644 index 0000000..8772ae5 --- /dev/null +++ b/tests/f_quota_shrinkdir/name @@ -0,0 +1 @@ +update quota on directory optimization diff --git a/tests/f_uninit_last_uninit/script b/tests/f_uninit_last_uninit/script index 53105a4..d0930b8 100644 --- a/tests/f_uninit_last_uninit/script +++ b/tests/f_uninit_last_uninit/script @@ -17,7 +17,7 @@ set_bg 1 checksum calc q EOF -E2FSCK_TIME=200704102100 +E2FSCK_TIME=1176238800 export E2FSCK_TIME . $cmd_dir/run_e2fsck diff --git a/tests/j_ext_dumpe2fs/expect b/tests/j_ext_dumpe2fs/expect index 2838bbd..2f31f43 100644 --- a/tests/j_ext_dumpe2fs/expect +++ b/tests/j_ext_dumpe2fs/expect @@ -37,7 +37,7 @@ Check interval: 0 (<none>) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 28 Desired extra isize: 28 Default directory hash: half_md4 diff --git a/tests/j_ext_long_trans/expect b/tests/j_ext_long_trans/expect index ea3c87f..b95aa9b 100644 --- a/tests/j_ext_long_trans/expect +++ b/tests/j_ext_long_trans/expect @@ -77,7 +77,7 @@ Root inode not allocated. Allocate? yes Pass 4: Checking reference counts Pass 5: Checking group summary information -Block bitmap differences: +(1--259) +275 +(291--418) +2341 +Block bitmap differences: +(1--260) +262 +264 +266 +268 +(275--276) +278 +280 +282 +284 +(291--546) +(675--802) +(931--1058) +(1187--1314) +(1443--1570) +2341 +(8193--8450) +(24577--24834) +(40961--41218) +(57345--57602) +(73729--73986) Fix? yes Free blocks count wrong for group #0 (5838, counted=5851). diff --git a/tests/j_long_trans/expect b/tests/j_long_trans/expect index 82b3caf..ee7af96 100644 --- a/tests/j_long_trans/expect +++ b/tests/j_long_trans/expect @@ -72,7 +72,7 @@ Root inode not allocated. Allocate? yes Pass 4: Checking reference counts Pass 5: Checking group summary information -Block bitmap differences: +(1--259) +273 +275 +289 +(291--418) +(2083--2210) +2341 +Block bitmap differences: +(1--260) +262 +264 +266 +268 +273 +(275--276) +278 +280 +282 +284 +289 +(291--546) +(675--802) +(931--1058) +(1187--1314) +(1443--1570) +(2083--2210) +2341 +(8193--8450) +(24577--24834) +(40961--41218) +(57345--57602) +(73729--73986) Fix? yes Free blocks count wrong for group #0 (5838, counted=5851). diff --git a/tests/j_long_trans_mcsum_32bit/expect b/tests/j_long_trans_mcsum_32bit/expect index ffae07a..0b6cf49 100644 --- a/tests/j_long_trans_mcsum_32bit/expect +++ b/tests/j_long_trans_mcsum_32bit/expect @@ -108,7 +108,7 @@ Root inode not allocated. Allocate? yes Pass 4: Checking reference counts Pass 5: Checking group summary information -Block bitmap differences: +(1--260) +276 +(292--419) +2342 -(139265--155648) +Block bitmap differences: +(1--261) +263 +265 +267 +269 +(276--277) +279 +281 +283 +285 +(292--547) +(676--803) +(932--1059) +(1188--1315) +(1444--1571) +2342 +(8193--8451) +(24577--24835) +(40961--41219) +(57345--57603) +(73729--73987) -(139265--155648) Fix? yes Free blocks count wrong for group #0 (5837, counted=5850). diff --git a/tests/j_long_trans_mcsum_64bit/expect b/tests/j_long_trans_mcsum_64bit/expect index e891def..b520c91 100644 --- a/tests/j_long_trans_mcsum_64bit/expect +++ b/tests/j_long_trans_mcsum_64bit/expect @@ -107,7 +107,7 @@ Root inode not allocated. Allocate? yes Pass 4: Checking reference counts Pass 5: Checking group summary information -Block bitmap differences: +(1--262) +278 +(294--421) +2344 -(139265--155648) +Block bitmap differences: +(1--263) +265 +267 +269 +271 +(278--279) +281 +283 +285 +287 +(294--549) +(678--805) +(934--1061) +(1190--1317) +(1446--1573) +2344 +(8193--8453) +(24577--24837) +(40961--41221) +(57345--57605) +(73729--73989) -(139265--155648) Fix? yes Free blocks count wrong for group #0 (5835, counted=5848). diff --git a/tests/j_short_trans_mcsum_64bit/expect b/tests/j_short_trans_mcsum_64bit/expect index d73e282..5a4f5b9 100644 --- a/tests/j_short_trans_mcsum_64bit/expect +++ b/tests/j_short_trans_mcsum_64bit/expect @@ -28,7 +28,7 @@ Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information -Block bitmap differences: +(0--65) +(67--69) +(71--584) +(1097--2126) +(65536--69631) +(98304--98368) +Block bitmap differences: +(0--2126) +(32768--32832) +(65536--69631) +(98304--98368) Fix? yes Inode bitmap differences: +(1--11) diff --git a/tests/j_short_trans_recover_mcsum_64bit/expect b/tests/j_short_trans_recover_mcsum_64bit/expect index 8c637f1..7139fd8 100644 --- a/tests/j_short_trans_recover_mcsum_64bit/expect +++ b/tests/j_short_trans_recover_mcsum_64bit/expect @@ -30,7 +30,7 @@ Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information -Block bitmap differences: +(0--65) +(67--69) +(71--584) +(1097--2126) +(65536--69631) +(98304--98368) +Block bitmap differences: +(0--2126) +(32768--32832) +(65536--69631) +(98304--98368) Fix? yes Inode bitmap differences: +(1--11) diff --git a/tests/m_64bit_flexbg/expect.1 b/tests/m_64bit_flexbg/expect.1 index 0baea1b..8540d4d 100644 --- a/tests/m_64bit_flexbg/expect.1 +++ b/tests/m_64bit_flexbg/expect.1 @@ -42,7 +42,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_bigjournal/expect.1 b/tests/m_bigjournal/expect.1 index eb0e3bc..4525e60 100644 --- a/tests/m_bigjournal/expect.1 +++ b/tests/m_bigjournal/expect.1 @@ -35,7 +35,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Journal inode: 8 @@ -58,7 +58,7 @@ Group 0: (Blocks 0-32767) 31837 free blocks, 5 free inodes, 2 directories, 5 unused inodes Free blocks: 931-32767 Free inodes: 12-16 -Group 1: (Blocks 32768-65535) [INODE_UNINIT, BLOCK_UNINIT] +Group 1: (Blocks 32768-65535) [INODE_UNINIT] Backup superblock at 32768, Group descriptors at 32769-32769 Reserved GDT blocks at 32770-33440 Block bitmap at 674 (bg #0 + 674), Inode bitmap at 758 (bg #0 + 758) @@ -72,7 +72,7 @@ Group 2: (Blocks 65536-98303) [INODE_UNINIT, BLOCK_UNINIT] 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 65536-98303 Free inodes: 33-48 -Group 3: (Blocks 98304-131071) [INODE_UNINIT, BLOCK_UNINIT] +Group 3: (Blocks 98304-131071) [INODE_UNINIT] Backup superblock at 98304, Group descriptors at 98305-98305 Reserved GDT blocks at 98306-98976 Block bitmap at 676 (bg #0 + 676), Inode bitmap at 760 (bg #0 + 760) @@ -86,7 +86,7 @@ Group 4: (Blocks 131072-163839) [INODE_UNINIT, BLOCK_UNINIT] 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 131072-163839 Free inodes: 65-80 -Group 5: (Blocks 163840-196607) [INODE_UNINIT, BLOCK_UNINIT] +Group 5: (Blocks 163840-196607) [INODE_UNINIT] Backup superblock at 163840, Group descriptors at 163841-163841 Reserved GDT blocks at 163842-164512 Block bitmap at 678 (bg #0 + 678), Inode bitmap at 762 (bg #0 + 762) @@ -100,7 +100,7 @@ Group 6: (Blocks 196608-229375) [INODE_UNINIT, BLOCK_UNINIT] 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 196608-229375 Free inodes: 97-112 -Group 7: (Blocks 229376-262143) [INODE_UNINIT, BLOCK_UNINIT] +Group 7: (Blocks 229376-262143) [INODE_UNINIT] Backup superblock at 229376, Group descriptors at 229377-229377 Reserved GDT blocks at 229378-230048 Block bitmap at 680 (bg #0 + 680), Inode bitmap at 764 (bg #0 + 764) @@ -114,7 +114,7 @@ Group 8: (Blocks 262144-294911) [INODE_UNINIT, BLOCK_UNINIT] 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 262144-294911 Free inodes: 129-144 -Group 9: (Blocks 294912-327679) [INODE_UNINIT, BLOCK_UNINIT] +Group 9: (Blocks 294912-327679) [INODE_UNINIT] Backup superblock at 294912, Group descriptors at 294913-294913 Reserved GDT blocks at 294914-295584 Block bitmap at 682 (bg #0 + 682), Inode bitmap at 766 (bg #0 + 766) @@ -212,7 +212,7 @@ Group 24: (Blocks 786432-819199) [INODE_UNINIT, BLOCK_UNINIT] 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 786432-819199 Free inodes: 385-400 -Group 25: (Blocks 819200-851967) [INODE_UNINIT, BLOCK_UNINIT] +Group 25: (Blocks 819200-851967) [INODE_UNINIT] Backup superblock at 819200, Group descriptors at 819201-819201 Reserved GDT blocks at 819202-819872 Block bitmap at 698 (bg #0 + 698), Inode bitmap at 782 (bg #0 + 782) @@ -226,7 +226,7 @@ Group 26: (Blocks 851968-884735) [INODE_UNINIT, BLOCK_UNINIT] 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 851968-884735 Free inodes: 417-432 -Group 27: (Blocks 884736-917503) [INODE_UNINIT, BLOCK_UNINIT] +Group 27: (Blocks 884736-917503) [INODE_UNINIT] Backup superblock at 884736, Group descriptors at 884737-884737 Reserved GDT blocks at 884738-885408 Block bitmap at 700 (bg #0 + 700), Inode bitmap at 784 (bg #0 + 784) @@ -554,7 +554,7 @@ Group 80: (Blocks 2621440-2654207) [INODE_UNINIT, BLOCK_UNINIT] 32768 free blocks, 16 free inodes, 0 directories, 16 unused inodes Free blocks: 2621440-2654207 Free inodes: 1281-1296 -Group 81: (Blocks 2654208-2686975) [INODE_UNINIT, BLOCK_UNINIT] +Group 81: (Blocks 2654208-2686975) [INODE_UNINIT] Backup superblock at 2654208, Group descriptors at 2654209-2654209 Reserved GDT blocks at 2654210-2654880 Block bitmap at 754 (bg #0 + 754), Inode bitmap at 838 (bg #0 + 838) diff --git a/tests/m_dasd_bs/expect.1 b/tests/m_dasd_bs/expect.1 index 32883c4..87fc62a 100644 --- a/tests/m_dasd_bs/expect.1 +++ b/tests/m_dasd_bs/expect.1 @@ -42,7 +42,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_desc_size_128/expect.1 b/tests/m_desc_size_128/expect.1 index 54b24e0..18405fb 100644 --- a/tests/m_desc_size_128/expect.1 +++ b/tests/m_desc_size_128/expect.1 @@ -43,7 +43,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_extent_journal/expect.1 b/tests/m_extent_journal/expect.1 index 11124e4..f7d2c53 100644 --- a/tests/m_extent_journal/expect.1 +++ b/tests/m_extent_journal/expect.1 @@ -43,7 +43,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Journal inode: 8 diff --git a/tests/m_hugefile/script b/tests/m_hugefile/script index fc1d115..3af4503 100644 --- a/tests/m_hugefile/script +++ b/tests/m_hugefile/script @@ -4,7 +4,7 @@ EXP=$test_dir/expect CONF=$TMPFILE.conf os=$(uname -s) -if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then +if [ "$os" = "Darwin" -o "$os" = "GNU" -o "$os" = "FreeBSD" ]; then # creates a 44GB filesystem echo "$test_name: $test_description: skipped for $os" return 0 diff --git a/tests/m_large_file/expect.1 b/tests/m_large_file/expect.1 index 955ba77..187eff5 100644 --- a/tests/m_large_file/expect.1 +++ b/tests/m_large_file/expect.1 @@ -40,7 +40,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_meta_bg/expect.1 b/tests/m_meta_bg/expect.1 index 28fd5b1..7e7b5b6 100644 --- a/tests/m_meta_bg/expect.1 +++ b/tests/m_meta_bg/expect.1 @@ -41,7 +41,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_minrootdir/expect b/tests/m_minrootdir/expect index d2e9a9e..142c8ee 100644 --- a/tests/m_minrootdir/expect +++ b/tests/m_minrootdir/expect @@ -28,7 +28,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 @@ -140,7 +140,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 @@ -194,7 +194,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_mmp/expect.1 b/tests/m_mmp/expect.1 index 0edb97d..d0c64c5 100644 --- a/tests/m_mmp/expect.1 +++ b/tests/m_mmp/expect.1 @@ -43,7 +43,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_no_opt/expect.1 b/tests/m_no_opt/expect.1 index 806d293..181dad2 100644 --- a/tests/m_no_opt/expect.1 +++ b/tests/m_no_opt/expect.1 @@ -41,7 +41,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_quota/expect.1 b/tests/m_quota/expect.1 index 74e38ca..f0f44b9 100644 --- a/tests/m_quota/expect.1 +++ b/tests/m_quota/expect.1 @@ -42,7 +42,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_raid_opt/expect.1 b/tests/m_raid_opt/expect.1 index c1dc61b..a5ee814 100644 --- a/tests/m_raid_opt/expect.1 +++ b/tests/m_raid_opt/expect.1 @@ -43,7 +43,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_resize_inode_meta_bg/expect.1 b/tests/m_resize_inode_meta_bg/expect.1 index 7feaed9..83397c2 100644 --- a/tests/m_resize_inode_meta_bg/expect.1 +++ b/tests/m_resize_inode_meta_bg/expect.1 @@ -44,7 +44,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Journal inode: 8 @@ -67,7 +67,7 @@ Group 0: (Blocks 0-255) [ITABLE_ZEROED] 159 free blocks, 53 free inodes, 2 directories, 53 unused inodes Free blocks: 97-255 Free inodes: 12-64 -Group 1: (Blocks 256-511) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] +Group 1: (Blocks 256-511) [INODE_UNINIT, ITABLE_ZEROED] Backup superblock at 256, Group descriptor at 257 Block bitmap at 3 (bg #0 + 3) Inode bitmap at 18 (bg #0 + 18) @@ -82,7 +82,7 @@ Group 2: (Blocks 512-767) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] 256 free blocks, 64 free inodes, 0 directories, 64 unused inodes Free blocks: 512-767 Free inodes: 129-192 -Group 3: (Blocks 768-1023) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] +Group 3: (Blocks 768-1023) [INODE_UNINIT, ITABLE_ZEROED] Backup superblock at 768 Block bitmap at 5 (bg #0 + 5) Inode bitmap at 20 (bg #0 + 20) @@ -97,7 +97,7 @@ Group 4: (Blocks 1024-1279) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] 256 free blocks, 64 free inodes, 0 directories, 64 unused inodes Free blocks: 1024-1279 Free inodes: 257-320 -Group 5: (Blocks 1280-1535) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] +Group 5: (Blocks 1280-1535) [INODE_UNINIT, ITABLE_ZEROED] Backup superblock at 1280 Block bitmap at 7 (bg #0 + 7) Inode bitmap at 22 (bg #0 + 22) diff --git a/tests/m_root_owner/expect.1 b/tests/m_root_owner/expect.1 index 3b9e3ee..19a3d6e 100644 --- a/tests/m_root_owner/expect.1 +++ b/tests/m_root_owner/expect.1 @@ -40,7 +40,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_root_perms/expect.1 b/tests/m_root_perms/expect.1 new file mode 100644 index 0000000..19a3d6e --- /dev/null +++ b/tests/m_root_perms/expect.1 @@ -0,0 +1,57 @@ +Creating filesystem with 1024 1k blocks and 128 inodes + +Allocating group tables: done +Writing inode tables: done +Writing superblocks and filesystem accounting information: done + +Filesystem features: ext_attr resize_inode dir_index filetype sparse_super +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_filesys: 11/128 files (0.0% non-contiguous), 54/1024 blocks +Exit status is 0 +Filesystem volume name: <none> +Last mounted on: <not available> +Filesystem magic number: 0xEF53 +Filesystem revision #: 1 (dynamic) +Filesystem features: ext_attr resize_inode dir_index filetype sparse_super +Default mount options: (none) +Filesystem state: clean +Errors behavior: Continue +Filesystem OS type: Linux +Inode count: 128 +Block count: 1024 +Reserved block count: 51 +Overhead clusters: 40 +Free blocks: 970 +Free inodes: 117 +First block: 1 +Block size: 1024 +Fragment size: 1024 +Reserved GDT blocks: 3 +Blocks per group: 8192 +Fragments per group: 8192 +Inodes per group: 128 +Inode blocks per group: 32 +Mount count: 0 +Check interval: 15552000 (6 months) +Reserved blocks uid: 0 +Reserved blocks gid: 0 +First inode: 11 +Inode size: 256 +Required extra isize: 32 +Desired extra isize: 32 +Default directory hash: half_md4 + + +Group 0: (Blocks 1-1023) + Primary superblock at 1, Group descriptors at 2-2 + Reserved GDT blocks at 3-5 + Block bitmap at 6 (+5) + Inode bitmap at 7 (+6) + Inode table at 8-39 (+7) + 970 free blocks, 117 free inodes, 2 directories + Free blocks: 54-1023 + Free inodes: 12-128 diff --git a/tests/m_root_perms/script b/tests/m_root_perms/script new file mode 100644 index 0000000..01c67e9 --- /dev/null +++ b/tests/m_root_perms/script @@ -0,0 +1,4 @@ +DESCRIPTION="root directory permissions" +FS_SIZE=1024 +MKE2FS_OPTS="-E root_perms=0464" +. $cmd_dir/run_mke2fs diff --git a/tests/m_rootdir/expect b/tests/m_rootdir/expect index dbc7977..d27124d 100644 --- a/tests/m_rootdir/expect +++ b/tests/m_rootdir/expect @@ -28,7 +28,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Journal inode: 8 diff --git a/tests/m_rootdir_acl/expect b/tests/m_rootdir_acl/expect index 57f03e5..d3a8101 100644 --- a/tests/m_rootdir_acl/expect +++ b/tests/m_rootdir_acl/expect @@ -28,7 +28,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 512 +Inode size: 512 Required extra isize: 32 Desired extra isize: 32 Journal inode: 8 diff --git a/tests/m_rootgnutar/expect b/tests/m_rootgnutar/expect new file mode 100644 index 0000000..10def6b --- /dev/null +++ b/tests/m_rootgnutar/expect @@ -0,0 +1,141 @@ +Creating regular file test.img +Exit status is 0 +Filesystem volume name: <none> +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 64bit flex_bg sparse_super huge_file dir_nlink extra_isize metadata_csum +Default mount options: (none) +Filesystem state: clean +Errors behavior: Continue +Filesystem OS type: Linux +Inode count: 1024 +Block count: 16384 +Reserved block count: 819 +Overhead clusters: 1543 +Free blocks: 14791 +Free inodes: 1005 +First block: 1 +Block size: 1024 +Fragment size: 1024 +Group descriptor size: 64 +Reserved GDT blocks: 127 +Blocks per group: 8192 +Fragments per group: 8192 +Inodes per group: 512 +Inode blocks per group: 128 +Flex block group size: 16 +Mount count: 0 +Check interval: 15552000 (6 months) +Reserved blocks uid: 0 +Reserved blocks gid: 0 +First inode: 11 +Inode size: 256 +Required extra isize: 32 +Desired extra isize: 32 +Journal inode: 8 +Default directory hash: half_md4 +Journal backup: inode blocks +Checksum type: crc32c +Journal features: (none) +Total journal size: 1024k +Total journal blocks: 1024 +Max transaction length: 1024 +Fast commit length: 0 +Journal sequence: 0x00000001 +Journal start: 0 + + +Group 0: (Blocks 1-8192) + Primary superblock at 1, Group descriptors at 2-2 + Reserved GDT blocks at 3-129 + Block bitmap at 130 (+129) + Inode bitmap at 132 (+131) + Inode table at 134-261 (+133) + 7753 free blocks, 493 free inodes, 5 directories, 493 unused inodes + Free blocks: 440-8192 + Free inodes: 20-512 +Group 1: (Blocks 8193-16383) [INODE_UNINIT] + Backup superblock at 8193, Group descriptors at 8194-8194 + Reserved GDT blocks at 8195-8321 + Block bitmap at 131 (bg #0 + 130) + Inode bitmap at 133 (bg #0 + 132) + Inode table at 262-389 (bg #0 + 261) + 7038 free blocks, 512 free inodes, 0 directories, 512 unused inodes + Free blocks: 9346-16383 + Free inodes: 513-1024 +Exit status is 0 +debugfs: stat /test/emptyfile +Inode: III Type: regular +Size: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +debugfs: stat /test/bigfile +Inode: III Type: regular +Size: 32768 +Links: 1 Blockcount: 64 +Fragment: Address: 0 Number: 0 Size: 0 +debugfs: stat /test/zerofile +Inode: III Type: regular +Size: 1025 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +debugfs: stat /test/silly_bs_link +Inode: III Type: symlink +Size: 14 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +debugfs: stat /test/emptydir +Inode: III Type: directory +Size: 1024 +Links: 2 Blockcount: 2 +Fragment: Address: 0 Number: 0 Size: 0 +debugfs: stat /test/dir +Inode: III Type: directory +Size: 1024 +Links: 2 Blockcount: 2 +Fragment: Address: 0 Number: 0 Size: 0 +debugfs: stat /test/dir/file +Inode: III Type: regular +Size: 8 +Links: 1 Blockcount: 2 +Fragment: Address: 0 Number: 0 Size: 0 +Exit status is 0 +debugfs: ex /test/emptyfile +Level Entries Logical Physical Length Flags +debugfs: ex /test/bigfile +Level Entries Logical Physical Length Flags +X 0/0 1/1 0-31 AAA-BBB 32 +debugfs: ex /test/zerofile +Level Entries Logical Physical Length Flags +debugfs: ex /test/silly_bs_link +/test/silly_bs_link: does not uses extent block maps +debugfs: ex /test/emptydir +Level Entries Logical Physical Length Flags +X 0/0 1/1 0-0 AAA-BBB 1 +debugfs: ex /test/dir +Level Entries Logical Physical Length Flags +X 0/0 1/1 0-0 AAA-BBB 1 +debugfs: ex /test/dir/file +Level Entries Logical Physical Length Flags +X 0/0 1/1 0-0 AAA-BBB 1 +Exit status is 0 +Exit status is 0 +Exit status is 0 +test/ +test/bigfile +test/dir/ +test/dir/file +test/emptydir/ +test/emptyfile +test/silly_bs_link +test/zerofile +Exit status is 0 +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.img: 19/1024 files (0.0% non-contiguous), 1593/16384 blocks +Exit status is 0 +Exit status is 0 diff --git a/tests/m_rootgnutar/mkgnutar.pl b/tests/m_rootgnutar/mkgnutar.pl new file mode 100644 index 0000000..516124c --- /dev/null +++ b/tests/m_rootgnutar/mkgnutar.pl @@ -0,0 +1,138 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +use Getopt::Long; +use Fcntl ':mode'; + +my ($directory, $mtime, $nopadding, $norec, $verbose); +GetOptions( + "directory=s" => \$directory, + "mtime=i" => \$mtime, + "nopadding" => \$nopadding, + "no-recursion" => \$norec, + "verbose" => \$verbose, +); + +chdir($directory) || die "cannot chdir"; + +my $num_entries = 0; + +sub recurse_dir { + my $path = shift; + my @results = ("$path/"); + opendir my $dh, $path or die "cannot open $path"; + while (my $entry = readdir $dh) { + next if $entry eq "."; + next if $entry eq ".."; + if (-d "$path/$entry") { + push @results, (&recurse_dir("$path/$entry")); + } else { + push @results, "$path/$entry"; + } + } + closedir $dh; + return @results; +} + +my @entries; +if (!-e $ARGV[0]) { + die "does not exist: $ARGV[0]"; +} elsif (-d $ARGV[0] && !$norec) { + @entries = sort (recurse_dir($ARGV[0])); +} else { + @entries = ($ARGV[0]); +} + +foreach my $fname (@entries) { + if ($verbose) { + print STDERR "$fname\n"; + } + my ( + $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, + $size, $atime, $mtime_, $ctime, $blksize, $blocks + ) = lstat($fname); + if (!defined $mode) { + die "failed to stat $fname"; + } + my $content = ""; + my $type; + my $linkname = ""; + my $username = $ENV{LOGNAME} || $ENV{USER} || getpwuid($<); + if (S_ISLNK($mode)) { + $type = 2; + $linkname = readlink $fname; + } elsif (S_ISREG($mode)) { + $type = 0; + open(my $fh, '<', $fname); + $content = do { local $/; <$fh> }; + close($fh); + } elsif (S_ISDIR($mode)) { + $type = 5; + } + my $entry = pack( + 'a100 a8 a8 a8 a12 a12 A8 a1 a100 a6 a2 a32 a32 a8 a8 a155 x12', + $fname, + sprintf('%07o', $mode & 07777), + sprintf('%07o', $<), # uid + sprintf('%07o', $(), # gid + sprintf('%011o', length $content), # size + sprintf('%011o', $mtime), + # mtime + '', # checksum + $type, + $linkname, # linkname + "ustar ", # magic + " ", # version + "$username", # username + "$username", # groupname + '', # dev major + '', # dev minor + '', # prefix + ); + + # compute and insert checksum + substr($entry, 148, 7) + = sprintf("%06o\0", unpack("%16C*", $entry)); + print $entry; + $num_entries += 1; + + if (length $content) { + my $num_blocks = int((length $content) / 512); + if ((length $content) % 512 != 0) { + $num_blocks += 1; + } + print $content; + print(("\x00") x ($num_blocks * 512 - (length $content))); + $num_entries += $num_blocks; + } +} + +if (!$nopadding) { + # https://www.gnu.org/software/tar/manual/html_node/Standard.html + # + # Physically, an archive consists of a series of file entries terminated + # by an end-of-archive entry, which consists of two 512 blocks of zero + # bytes. At the end of the archive file there are two 512-byte blocks + # filled with binary zeros as an end-of-file marker. + print(pack 'a512', ''); + print(pack 'a512', ''); + $num_entries += 2; + + # https://www.gnu.org/software/tar/manual/html_section/tar_76.html + # + # Some devices requires that all write operations be a multiple of a + # certain size, and so, tar pads the archive out to the next record + # boundary. + # + # The default blocking factor is 20. With a block size of 512 bytes, we + # get a record size of 10240. + my $num_records = int($num_entries * 512 / 10240); + if (($num_entries * 512) % 10240 != 0) { + $num_records += 1; + } + for (my $i = $num_entries ; $i < $num_records * 10240 / 512 ; $i++) { + print(pack 'a512', ''); + } +} diff --git a/tests/m_rootgnutar/output.sed b/tests/m_rootgnutar/output.sed new file mode 100644 index 0000000..2e76967 --- /dev/null +++ b/tests/m_rootgnutar/output.sed @@ -0,0 +1,5 @@ +s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*-[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/X \1\/\2 \3\/\4 \5-\6 AAA-BBB \7/g +s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/Y \1\/\2 \3\/\4 \5-\6 AAA \7/g +s/Mode:.*$//g +s/User:.*Size:/Size:/g +s/^Inode: [0-9]*/Inode: III/g diff --git a/tests/m_rootgnutar/script b/tests/m_rootgnutar/script new file mode 100644 index 0000000..79fd222 --- /dev/null +++ b/tests/m_rootgnutar/script @@ -0,0 +1,169 @@ +# vim: filetype=sh + +use_mkgnutar= + +test_description="create fs image from GNU tarball" +if ! test -x "$DEBUGFS_EXE"; then + echo "$test_name: $test_description: skipped (no debugfs)" + return 0 +fi +if [ "$(grep -c 'define HAVE_ARCHIVE_H' ../lib/config.h)" -eq 0 ]; then + echo "$test_name: $test_description: skipped (no libarchive)" + exit 0 +fi + +if test -z "$use_mkgnutar" ; then + if type ztar > /dev/null 2>&1 && \ + tar --version 2>&1 | head -1 | grep -q "GNU tar" ; then + TAR=tar + elif type gtar > /dev/null 2>&1 && \ + gtar --version 2>&1 | head -1 | grep -q "GNU tar" ; then + TAR=gtar + else + # if GNU tar is not available, fall back to using mkgnutar.pl + use_mkgnutar=yes +# echo "$test_name: $test_description: skipped (no GNU tar)" +# exit 0 + fi +fi + +MKFS_TAR="$TMPFILE.tar" +MKFS_DIR="$TMPFILE.dir" +OUT="$test_name.log" +EXP="$test_dir/expect" +DEBUGFS_EXE_MTIME=$(perl -e 'print((stat ($ARGV[0]))[9])' "$DEBUGFS_EXE") + +# we put everything in a subdir because we cannot rdump the root as that would +# require permissions to changing ownership of /lost+found +rm -rf "$MKFS_DIR" +mkdir -p "$MKFS_DIR/test" +touch "$MKFS_DIR/test/emptyfile" +dd if=/dev/zero bs=1024 count=32 2> /dev/null | tr '\0' 'a' > "$MKFS_DIR/test/bigfile" +dd if=/dev/zero of="$MKFS_DIR/test/zerofile" bs=1 count=1 seek=1024 2> /dev/null +ln -s /silly_bs_link "$MKFS_DIR/test/silly_bs_link" +mkdir "$MKFS_DIR/test/emptydir" +mkdir "$MKFS_DIR/test/dir" +echo "will be overwritten" > "$MKFS_DIR/test/dir/file" + +if test -z "$use_mkgnutar"; then + # debugfs rdump does not preserve the timestamps when it extracts the + # files so we ignore them by using tar --clamp-mtime + # first write a partial tar + $TAR --sort=name -C "$MKFS_DIR" --mtime="$DEBUGFS_EXE" --clamp-mtime \ + --format=gnu -cf "$MKFS_TAR.dupl" test + # now overwrite the contents of a file + echo "Test me" > "$MKFS_DIR/test/dir/file" + # and update the tar so that it contains two entries for the same file + # we need this to test the code path that first unlinks and then overwrites an + # existing file + $TAR -C "$MKFS_DIR" --mtime="$DEBUGFS_EXE" --clamp-mtime \ + --format=gnu -rf "$MKFS_TAR.dupl" test/dir/file + # also add a duplicate directory entry because those must not be unlinked + echo test | $TAR -C "$MKFS_DIR" --mtime="$DEBUGFS_EXE" --clamp-mtime \ + --format=gnu -rf "$MKFS_TAR.dupl" --no-recursion \ + --verbatim-files-from --files-from=- + # also create a tarball of the directory with only one entry per file + $TAR --sort=name -C "$MKFS_DIR" --mtime="$DEBUGFS_EXE" --clamp-mtime \ + --format=gnu -cf "$MKFS_TAR.uniq" test +else + # same as above but without using GNU tar + perl $test_dir/mkgnutar.pl --nopadding --directory="$MKFS_DIR" --mtime "$DEBUGFS_EXE_MTIME" test > "$MKFS_TAR.dupl" + echo "Test me" > "$MKFS_DIR/test/dir/file" + perl $test_dir/mkgnutar.pl --nopadding --directory="$MKFS_DIR" --mtime "$DEBUGFS_EXE_MTIME" test/dir/file >> "$MKFS_TAR.dupl" + perl $test_dir/mkgnutar.pl --nopadding --directory="$MKFS_DIR" --mtime "$DEBUGFS_EXE_MTIME" --no-recursion test/ >> "$MKFS_TAR.dupl" + # add end-of-archive entry + truncate -s +1024 "$MKFS_TAR.dupl" + # pad to a multiple of the record size + truncate -s %10240 "$MKFS_TAR.dupl" + perl $test_dir/mkgnutar.pl --directory="$MKFS_DIR" --mtime "$DEBUGFS_EXE_MTIME" test > "$MKFS_TAR.uniq" +fi + +rm -r "$MKFS_DIR" + +cat > "$TMPFILE.cmd1" << ENDL +stat /test/emptyfile +stat /test/bigfile +stat /test/zerofile +stat /test/silly_bs_link +stat /test/emptydir +stat /test/dir +stat /test/dir/file +ENDL + +cat > "$TMPFILE.cmd2" << ENDL +ex /test/emptyfile +ex /test/bigfile +ex /test/zerofile +ex /test/silly_bs_link +ex /test/emptydir +ex /test/dir +ex /test/dir/file +ENDL + +# Create two file systems, one for each tar that was created above. The +# tarballs differ but should result in the same filesystem contents +# +for ext in uniq dupl; do + mkdir "$MKFS_DIR" + { + $MKE2FS -q -F -o Linux -T ext4 -O metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -d "$MKFS_TAR.$ext" "$TMPFILE.$ext" 16384 2>&1; + echo Exit status is $?; + $DUMPE2FS "$TMPFILE.$ext" 2>&1; + echo Exit status is $?; + $DEBUGFS -f "$TMPFILE.cmd1" "$TMPFILE.$ext" 2>&1 | grep -E "(stat|Size:|Type:|Links:|Blockcount:)" + echo Exit status is $?; + $DEBUGFS -f "$TMPFILE.cmd2" "$TMPFILE.$ext" 2>&1; + echo Exit status is $?; + $DEBUGFS -R "dump /test/dir/file $TMPFILE.testme" "$TMPFILE.$ext" 2>&1; + echo Exit status is $?; + # extract the files and directories from the image and tar them + # again to make sure that a tarball from the image contents is + # bit-by-bit identical to the tarball the image was created + # from -- essentially this checks whether a roundtrip from tar + # to ext4 to tar remains identical + $DEBUGFS -R "rdump /test $MKFS_DIR" "$TMPFILE.$ext" 2>&1; + echo Exit status is $?; + # debugfs rdump does not preserve the timestamps when it extracts the + if test -z "$use_mkgnutar"; then + # files so we ignore them by using tar --clamp-mtime + $TAR --sort=name -C "$MKFS_DIR" \ + --mtime="$DEBUGFS_EXE" --clamp-mtime --format=gnu \ + -cvf "$TMPFILE.new.tar" test 2>&1; + else + perl $test_dir/mkgnutar.pl --verbose --directory="$MKFS_DIR" --mtime "$DEBUGFS_EXE_MTIME" test 2>&1 > "$TMPFILE.new.tar"; + fi; + echo Exit status is $?; + $FSCK -f -n "$TMPFILE.$ext" 2>&1; + echo Exit status is $?; + # independent from which tarball the ext4 image was created, + # the tarball created from the files in it should be bit-by-bit + # identical to the tarball without duplicate entries + cmp "$MKFS_TAR.uniq" "$TMPFILE.new.tar" 2>&1; + echo Exit status is $?; + } | sed -f "$cmd_dir/filter.sed" -f "$test_dir/output.sed" -e "s;$TMPFILE.$ext;test.img;" | { + # In the first pass, store the output and append to the log + # file. In the second pass, compare the output to the output + # to the one from the first. + case $ext in + uniq) tee "$TMPFILE.log" >> "$OUT";; + dupl) cmp - "$TMPFILE.log" >> "$OUT" 2>&1 || echo "cmp failed" >> "$OUT";; + esac + } + rm -r "$MKFS_DIR" "$TMPFILE.new.tar" +done + +# Do the verification +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 -rf "$MKFS_TAR.dupl" "$MKFS_TAR.uniq" "$TMPFILE.cmd1" "$TMPFILE.cmd2" \ + "$TMPFILE.log" "$TMPFILE.dupl" "$TMPFILE.uniq" "$TMPFILE.testme" +unset MKFS_TAR MKFS_DIR OUT EXP diff --git a/tests/m_rootpaxtar/expect b/tests/m_rootpaxtar/expect new file mode 100644 index 0000000..844d987 --- /dev/null +++ b/tests/m_rootpaxtar/expect @@ -0,0 +1,87 @@ +Filesystem volume name: <none> +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 64bit flex_bg sparse_super huge_file dir_nlink extra_isize metadata_csum +Default mount options: (none) +Filesystem state: clean +Errors behavior: Continue +Filesystem OS type: Linux +Inode count: 1024 +Block count: 16384 +Reserved block count: 819 +Overhead clusters: 1543 +Free blocks: 14827 +Free inodes: 1012 +First block: 1 +Block size: 1024 +Fragment size: 1024 +Group descriptor size: 64 +Reserved GDT blocks: 127 +Blocks per group: 8192 +Fragments per group: 8192 +Inodes per group: 512 +Inode blocks per group: 128 +Flex block group size: 16 +Mount count: 0 +Check interval: 15552000 (6 months) +Reserved blocks uid: 0 +Reserved blocks gid: 0 +First inode: 11 +Inode size: 256 +Required extra isize: 32 +Desired extra isize: 32 +Journal inode: 8 +Default directory hash: half_md4 +Journal backup: inode blocks +Checksum type: crc32c +Journal features: (none) +Total journal size: 1024k +Total journal blocks: 1024 +Max transaction length: 1024 +Fast commit length: 0 +Journal sequence: 0x00000001 +Journal start: 0 + + +Group 0: (Blocks 1-8192) + Primary superblock at 1, Group descriptors at 2-2 + Reserved GDT blocks at 3-129 + Block bitmap at 130 (+129) + Inode bitmap at 132 (+131) + Inode table at 134-261 (+133) + 7789 free blocks, 500 free inodes, 2 directories, 500 unused inodes + Free blocks: 404-8192 + Free inodes: 13-512 +Group 1: (Blocks 8193-16383) [INODE_UNINIT] + Backup superblock at 8193, Group descriptors at 8194-8194 + Reserved GDT blocks at 8195-8321 + Block bitmap at 131 (bg #0 + 130) + Inode bitmap at 133 (bg #0 + 132) + Inode table at 262-389 (bg #0 + 261) + 7038 free blocks, 512 free inodes, 0 directories, 512 unused inodes + Free blocks: 9346-16383 + Free inodes: 513-1024 +debugfs: stat /file +Inode: III Type: regular +Generation: 0 Version: 0x00000000:00000000 +Size: 0 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 + ctime: 0x00000000:00000000 -- Thu Jan 1 00:00:00 1970 + atime: 0x00000000:00000000 -- Thu Jan 1 00:00:00 1970 + mtime: 0x00000000:00000000 -- Thu Jan 1 00:00:00 1970 +Size of extra inode fields: 32 +Extended attributes: + security.capability (20) = 01 00 00 02 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +EXTENTS: +debugfs: ea_list /file +Extended attributes: + security.capability (20) = 01 00 00 02 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +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.img: 12/1024 files (0.0% non-contiguous), 1557/16384 blocks diff --git a/tests/m_rootpaxtar/mkpaxtar.pl b/tests/m_rootpaxtar/mkpaxtar.pl new file mode 100644 index 0000000..f335344 --- /dev/null +++ b/tests/m_rootpaxtar/mkpaxtar.pl @@ -0,0 +1,69 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +my @entries = ( + # filename mode type content + ['./PaxHeaders/file', oct(644), 'x', "57 SCHILY.xattr.security.capability=\x01\0\0\x02\0\x20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x0a"], + ['file', oct(644), 0, ''], +); + +my $num_entries = 0; + +foreach my $file (@entries) { + my ($fname, $mode, $type, $content) = @{$file}; + my $entry = pack( + 'a100 a8 a8 a8 a12 a12 A8 a1 a100 a6 a2 a32 a32 a8 a8 a155 x12', + $fname, + sprintf('%07o', $mode), + sprintf('%07o', 0), # uid + sprintf('%07o', 0), # gid + sprintf('%011o', length $content), # size + sprintf('%011o', 0), # mtime + '', # checksum + $type, + '', # linkname + "ustar", # magic + "00", # version + '', # username + '', # groupname + '', # dev major + '', # dev minor + '', # prefix + ); + + # compute and insert checksum + substr($entry, 148, 7) + = sprintf("%06o\0", unpack("%16C*", $entry)); + print $entry; + $num_entries += 1; + + if (length $content) { + print(pack 'a512', $content); + $num_entries += 1; + } +} + +# https://www.gnu.org/software/tar/manual/html_node/Standard.html +# +# Physically, an archive consists of a series of file entries terminated by an +# end-of-archive entry, which consists of two 512 blocks of zero bytes. At the +# end of the archive file there are two 512-byte blocks filled with binary +# zeros as an end-of-file marker. + +print(pack 'a512', ''); +print(pack 'a512', ''); +$num_entries += 2; + +# https://www.gnu.org/software/tar/manual/html_section/tar_76.html +# +# Some devices requires that all write operations be a multiple of a certain +# size, and so, tar pads the archive out to the next record boundary. +# +# The default blocking factor is 20. With a block size of 512 bytes, we get a +# record size of 10240. + +for (my $i = $num_entries ; $i < 20 ; $i++) { + print(pack 'a512', ''); +} diff --git a/tests/m_rootpaxtar/output.sed b/tests/m_rootpaxtar/output.sed new file mode 100644 index 0000000..2e76967 --- /dev/null +++ b/tests/m_rootpaxtar/output.sed @@ -0,0 +1,5 @@ +s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*-[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/X \1\/\2 \3\/\4 \5-\6 AAA-BBB \7/g +s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/Y \1\/\2 \3\/\4 \5-\6 AAA \7/g +s/Mode:.*$//g +s/User:.*Size:/Size:/g +s/^Inode: [0-9]*/Inode: III/g diff --git a/tests/m_rootpaxtar/script b/tests/m_rootpaxtar/script new file mode 100644 index 0000000..41dc7c3 --- /dev/null +++ b/tests/m_rootpaxtar/script @@ -0,0 +1,44 @@ +# vim: filetype=sh + +test_description="create fs image from pax tarball with xattrs" +if ! test -x $DEBUGFS_EXE; then + echo "$test_name: $test_description: skipped (no debugfs)" + return 0 +fi +if [ "$(grep -c 'define HAVE_ARCHIVE_H' ../lib/config.h)" -eq 0 ]; then + echo "$test_name: skipped (no libarchive)" + exit 0 +fi + +OUT=$test_name.log +EXP=$test_dir/expect + +perl $test_dir/mkpaxtar.pl \ + | $MKE2FS -q -F -o Linux -T ext4 -O metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -d - $TMPFILE 16384 > $OUT 2>&1 + +$DUMPE2FS $TMPFILE >> $OUT 2>&1 +cat > $TMPFILE.cmd << ENDL +stat /file +ea_list /file +ENDL +$DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | egrep -v '^(crtime|Inode checksum):' >> $OUT + +$FSCK -f -n $TMPFILE >> $OUT 2>&1 + +sed -f $cmd_dir/filter.sed -f $test_dir/output.sed -e "s;$TMPFILE;test.img;" < $OUT > $OUT.tmp +mv $OUT.tmp $OUT + +# Do the verification +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 -rf $TMPFILE.cmd +unset OUT EXP diff --git a/tests/m_roottar/expect b/tests/m_roottar/expect new file mode 100644 index 0000000..ea96478 --- /dev/null +++ b/tests/m_roottar/expect @@ -0,0 +1,208 @@ +Filesystem volume name: <none> +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 64bit flex_bg sparse_super huge_file dir_nlink extra_isize metadata_csum +Default mount options: (none) +Filesystem state: clean +Errors behavior: Continue +Filesystem OS type: Linux +Inode count: 1024 +Block count: 16384 +Reserved block count: 819 +Overhead clusters: 1543 +Free blocks: 14824 +Free inodes: 998 +First block: 1 +Block size: 1024 +Fragment size: 1024 +Group descriptor size: 64 +Reserved GDT blocks: 127 +Blocks per group: 8192 +Fragments per group: 8192 +Inodes per group: 512 +Inode blocks per group: 128 +Flex block group size: 16 +Mount count: 0 +Check interval: 15552000 (6 months) +Reserved blocks uid: 0 +Reserved blocks gid: 0 +First inode: 11 +Inode size: 256 +Required extra isize: 32 +Desired extra isize: 32 +Journal inode: 8 +Default directory hash: half_md4 +Journal backup: inode blocks +Checksum type: crc32c +Journal features: (none) +Total journal size: 1024k +Total journal blocks: 1024 +Max transaction length: 1024 +Fast commit length: 0 +Journal sequence: 0x00000001 +Journal start: 0 + + +Group 0: (Blocks 1-8192) + Primary superblock at 1, Group descriptors at 2-2 + Reserved GDT blocks at 3-129 + Block bitmap at 130 (+129) + Inode bitmap at 132 (+131) + Inode table at 134-261 (+133) + 7786 free blocks, 486 free inodes, 5 directories, 486 unused inodes + Free blocks: 407-8192 + Free inodes: 27-512 +Group 1: (Blocks 8193-16383) [INODE_UNINIT] + Backup superblock at 8193, Group descriptors at 8194-8194 + Reserved GDT blocks at 8195-8321 + Block bitmap at 131 (bg #0 + 130) + Inode bitmap at 133 (bg #0 + 132) + Inode table at 262-389 (bg #0 + 261) + 7038 free blocks, 512 free inodes, 0 directories, 512 unused inodes + Free blocks: 9346-16383 + Free inodes: 513-1024 +debugfs: stat /dev/ +Inode: III Type: directory +Generation: 0 Version: 0x00000000:00000000 +Size: 1024 +File ACL: 0 +Links: 4 Blockcount: 2 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +EXTENTS: +(0):404 +debugfs: stat /dev/console +Inode: III Type: character special +Generation: 0 Version: 0x00000000:00000000 +Size: 0 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Device major/minor number: 05:01 (hex 05:01) +debugfs: stat /dev/fd +Inode: III Type: symlink +Generation: 0 Version: 0x00000000:00000000 +Size: 13 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Fast link dest: "/proc/self/fd" +debugfs: stat /dev/full +Inode: III Type: character special +Generation: 0 Version: 0x00000000:00000000 +Size: 0 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Device major/minor number: 01:07 (hex 01:07) +debugfs: stat /dev/null +Inode: III Type: character special +Generation: 0 Version: 0x00000000:00000000 +Size: 0 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Device major/minor number: 01:03 (hex 01:03) +debugfs: stat /dev/ptmx +Inode: III Type: character special +Generation: 0 Version: 0x00000000:00000000 +Size: 0 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Device major/minor number: 05:02 (hex 05:02) +debugfs: stat /dev/pts/ +Inode: III Type: directory +Generation: 0 Version: 0x00000000:00000000 +Size: 1024 +File ACL: 0 +Links: 2 Blockcount: 2 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +EXTENTS: +(0):405 +debugfs: stat /dev/random +Inode: III Type: character special +Generation: 0 Version: 0x00000000:00000000 +Size: 0 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Device major/minor number: 01:08 (hex 01:08) +debugfs: stat /dev/shm/ +Inode: III Type: directory +Generation: 0 Version: 0x00000000:00000000 +Size: 1024 +File ACL: 0 +Links: 2 Blockcount: 2 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +EXTENTS: +(0):406 +debugfs: stat /dev/stderr +Inode: III Type: symlink +Generation: 0 Version: 0x00000000:00000000 +Size: 15 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Fast link dest: "/proc/self/fd/2" +debugfs: stat /dev/stdin +Inode: III Type: symlink +Generation: 0 Version: 0x00000000:00000000 +Size: 15 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Fast link dest: "/proc/self/fd/0" +debugfs: stat /dev/stdout +Inode: III Type: symlink +Generation: 0 Version: 0x00000000:00000000 +Size: 15 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Fast link dest: "/proc/self/fd/1" +debugfs: stat /dev/tty +Inode: III Type: character special +Generation: 0 Version: 0x00000000:00000000 +Size: 0 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Device major/minor number: 05:00 (hex 05:00) +debugfs: stat /dev/urandom +Inode: III Type: character special +Generation: 0 Version: 0x00000000:00000000 +Size: 0 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Device major/minor number: 01:09 (hex 01:09) +debugfs: stat /dev/zero +Inode: III Type: character special +Generation: 0 Version: 0x00000000:00000000 +Size: 0 +File ACL: 0 +Links: 1 Blockcount: 0 +Fragment: Address: 0 Number: 0 Size: 0 +Size of extra inode fields: 32 +Device major/minor number: 01:05 (hex 01:05) +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.img: 26/1024 files (0.0% non-contiguous), 1560/16384 blocks diff --git a/tests/m_roottar/mktar.pl b/tests/m_roottar/mktar.pl new file mode 100644 index 0000000..0e8843c --- /dev/null +++ b/tests/m_roottar/mktar.pl @@ -0,0 +1,62 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +# type codes: +# 0 -> normal file +# 1 -> hardlink +# 2 -> symlink +# 3 -> character special +# 4 -> block special +# 5 -> directory +my @devfiles = ( + # filename mode type link target major minor + ["", oct(755), 5, '', undef, undef], + ["console", oct(666), 3, '', 5, 1], + ["fd", oct(777), 2, '/proc/self/fd', undef, undef], + ["full", oct(666), 3, '', 1, 7], + ["null", oct(666), 3, '', 1, 3], + ["ptmx", oct(666), 3, '', 5, 2], + ["pts/", oct(755), 5, '', undef, undef], + ["random", oct(666), 3, '', 1, 8], + ["shm/", oct(755), 5, '', undef, undef], + ["stderr", oct(777), 2, '/proc/self/fd/2', undef, undef], + ["stdin", oct(777), 2, '/proc/self/fd/0', undef, undef], + ["stdout", oct(777), 2, '/proc/self/fd/1', undef, undef], + ["tty", oct(666), 3, '', 5, 0], + ["urandom", oct(666), 3, '', 1, 9], + ["zero", oct(666), 3, '', 1, 5], +); + +my $mtime = time; +if (exists $ENV{SOURCE_DATE_EPOCH}) { + $mtime = $ENV{SOURCE_DATE_EPOCH} + 0; +} + +foreach my $file (@devfiles) { + my ($fname, $mode, $type, $linkname, $devmajor, $devminor) = @{$file}; + my $entry = pack( + 'a100 a8 a8 a8 a12 a12 A8 a1 a100 a8 a32 a32 a8 a8 a155 x12', + "./dev/$fname", + sprintf('%07o', $mode), + sprintf('%07o', 0), # uid + sprintf('%07o', 0), # gid + sprintf('%011o', 0), # size + sprintf('%011o', $mtime), + '', # checksum + $type, + $linkname, + "ustar ", + '', # username + '', # groupname + defined($devmajor) ? sprintf('%07o', $devmajor) : '', + defined($devminor) ? sprintf('%07o', $devminor) : '', + '', # prefix + ); + + # compute and insert checksum + substr($entry, 148, 7) + = sprintf("%06o\0", unpack("%16C*", $entry)); + print $entry; +} diff --git a/tests/m_roottar/output.sed b/tests/m_roottar/output.sed new file mode 100644 index 0000000..2e76967 --- /dev/null +++ b/tests/m_roottar/output.sed @@ -0,0 +1,5 @@ +s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*-[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/X \1\/\2 \3\/\4 \5-\6 AAA-BBB \7/g +s/^[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)\/[[:space:]]*\([0-9]*\)[[:space:]]*\([0-9]*\)[[:space:]]*-[[:space:]]*\([0-9]*\)[[:space:]]*[0-9]*[[:space:]]*\([0-9]*\)/Y \1\/\2 \3\/\4 \5-\6 AAA \7/g +s/Mode:.*$//g +s/User:.*Size:/Size:/g +s/^Inode: [0-9]*/Inode: III/g diff --git a/tests/m_roottar/script b/tests/m_roottar/script new file mode 100644 index 0000000..701e8c8 --- /dev/null +++ b/tests/m_roottar/script @@ -0,0 +1,57 @@ +# vim: filetype=sh + +test_description="create fs image from tarball" +if ! test -x "$DEBUGFS_EXE"; then + echo "$test_name: $test_description: skipped (no debugfs)" + return 0 +fi +if [ "$(grep -c 'define HAVE_ARCHIVE_H' ../lib/config.h)" -eq 0 ]; then + echo "$test_name: skipped (no libarchive)" + exit 0 +fi + +OUT="$test_name.log" +EXP="$test_dir/expect" + +perl "$test_dir/mktar.pl" \ + | $MKE2FS -q -F -o Linux -T ext4 -O metadata_csum,64bit -E lazy_itable_init=1 -b 1024 -d - "$TMPFILE" 16384 > "$OUT" 2>&1 + +$DUMPE2FS "$TMPFILE" >> "$OUT" 2>&1 +cat > "$TMPFILE.cmd" << 'ENDL' +stat /dev/ +stat /dev/console +stat /dev/fd +stat /dev/full +stat /dev/null +stat /dev/ptmx +stat /dev/pts/ +stat /dev/random +stat /dev/shm/ +stat /dev/stderr +stat /dev/stdin +stat /dev/stdout +stat /dev/tty +stat /dev/urandom +stat /dev/zero +ENDL +$DEBUGFS -f "$TMPFILE.cmd" "$TMPFILE" 2>&1 | grep -E -v "(time|checksum):" >> "$OUT" + +$FSCK -f -n "$TMPFILE" >> "$OUT" 2>&1 + +sed -f "$cmd_dir/filter.sed" -f "$test_dir/output.sed" -e "s;$TMPFILE;test.img;" < "$OUT" > "$OUT.tmp" +mv "$OUT.tmp" "$OUT" + +# Do the verification +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 -rf "$TMPFILE.cmd" +unset OUT EXP diff --git a/tests/m_std/expect.1 b/tests/m_std/expect.1 index e1d1845..c552603 100644 --- a/tests/m_std/expect.1 +++ b/tests/m_std/expect.1 @@ -42,7 +42,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/m_uninit/expect.1 b/tests/m_uninit/expect.1 index 3c28755..6596df4 100644 --- a/tests/m_uninit/expect.1 +++ b/tests/m_uninit/expect.1 @@ -42,7 +42,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 @@ -56,7 +56,7 @@ Group 0: (Blocks 1-8192) [ITABLE_ZEROED] 7406 free blocks, 2037 free inodes, 2 directories, 2037 unused inodes Free blocks: 787-8192 Free inodes: 12-2048 -Group 1: (Blocks 8193-16384) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] +Group 1: (Blocks 8193-16384) [INODE_UNINIT, ITABLE_ZEROED] Backup superblock at 8193, Group descriptors at 8194-8194 Reserved GDT blocks at 8195-8450 Block bitmap at 8451 (+258), Inode bitmap at 8452 (+259) @@ -70,7 +70,7 @@ Group 2: (Blocks 16385-24576) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes Free blocks: 16899-24576 Free inodes: 4097-6144 -Group 3: (Blocks 24577-32768) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] +Group 3: (Blocks 24577-32768) [INODE_UNINIT, ITABLE_ZEROED] Backup superblock at 24577, Group descriptors at 24578-24578 Reserved GDT blocks at 24579-24834 Block bitmap at 24835 (+258), Inode bitmap at 24836 (+259) @@ -84,7 +84,7 @@ Group 4: (Blocks 32769-40960) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes Free blocks: 33283-40960 Free inodes: 8193-10240 -Group 5: (Blocks 40961-49152) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] +Group 5: (Blocks 40961-49152) [INODE_UNINIT, ITABLE_ZEROED] Backup superblock at 40961, Group descriptors at 40962-40962 Reserved GDT blocks at 40963-41218 Block bitmap at 41219 (+258), Inode bitmap at 41220 (+259) @@ -98,7 +98,7 @@ Group 6: (Blocks 49153-57344) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes Free blocks: 49667-57344 Free inodes: 12289-14336 -Group 7: (Blocks 57345-65536) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] +Group 7: (Blocks 57345-65536) [INODE_UNINIT, ITABLE_ZEROED] Backup superblock at 57345, Group descriptors at 57346-57346 Reserved GDT blocks at 57347-57602 Block bitmap at 57603 (+258), Inode bitmap at 57604 (+259) @@ -112,7 +112,7 @@ Group 8: (Blocks 65537-73728) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] 7678 free blocks, 2048 free inodes, 0 directories, 2048 unused inodes Free blocks: 66051-73728 Free inodes: 16385-18432 -Group 9: (Blocks 73729-81920) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED] +Group 9: (Blocks 73729-81920) [INODE_UNINIT, ITABLE_ZEROED] Backup superblock at 73729, Group descriptors at 73730-73730 Reserved GDT blocks at 73731-73986 Block bitmap at 73987 (+258), Inode bitmap at 73988 (+259) diff --git a/tests/progs/Makefile.in b/tests/progs/Makefile.in index e1325c6..1a8e929 100644 --- a/tests/progs/Makefile.in +++ b/tests/progs/Makefile.in @@ -20,7 +20,8 @@ TEST_REL_OBJS= test_rel.o test_rel_cmds.o TEST_ICOUNT_OBJS= test_icount.o test_icount_cmds.o -SRCS= $(srcdir)/test_rel.c +SRCS= $(srcdir)/test_icount.c \ + $(srcdir)/test_rel.c LIBS= $(LIBEXT2FS) $(LIBSS) $(LIBCOM_ERR) $(SYSLIBS) DEPLIBS= $(LIBEXT2FS) $(DEPLIBSS) $(DEPLIBCOM_ERR) @@ -72,6 +73,15 @@ distclean: clean # Makefile dependencies follow. This must be the last section in # the Makefile.in file # +test_icount.o: $(srcdir)/test_icount.c $(top_builddir)/lib/config.h \ + $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \ + $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/et/com_err.h \ + $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \ + $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \ + $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \ + $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/hashmap.h \ + $(top_srcdir)/lib/ext2fs/bitops.h $(top_srcdir)/lib/ext2fs/irel.h \ + $(top_srcdir)/lib/ext2fs/brel.h $(srcdir)/test_icount.h test_rel.o: $(srcdir)/test_rel.c $(top_builddir)/lib/config.h \ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/et/com_err.h \ $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \ diff --git a/tests/progs/test_icount.c b/tests/progs/test_icount.c index 6ebb100..c1005c6 100644 --- a/tests/progs/test_icount.c +++ b/tests/progs/test_icount.c @@ -61,7 +61,7 @@ static int parse_inode(const char *request, const char *desc, return 0; } -void do_create_icount(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_create_icount(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -92,7 +92,7 @@ void do_create_icount(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), } } -void do_free_icount(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_free_icount(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { if (argc != 1) { @@ -106,7 +106,7 @@ void do_free_icount(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), test_icount = 0; } -void do_fetch(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_fetch(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -129,7 +129,7 @@ void do_fetch(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), printf("Count is %u\n", count); } -void do_increment(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_increment(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -153,7 +153,7 @@ void do_increment(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), printf("Count is now %u\n", count); } -void do_decrement(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_decrement(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -177,7 +177,7 @@ void do_decrement(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), printf("Count is now %u\n", count); } -void do_store(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_store(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -206,7 +206,7 @@ void do_store(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), } } -void do_dump(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_dump(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -231,7 +231,7 @@ void do_dump(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), } } -void do_validate(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_validate(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { errcode_t retval; @@ -250,7 +250,7 @@ void do_validate(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), printf("Icount structure successfully validated\n"); } -void do_get_size(int argc, char **argv, int sci_idx EXT2FS_ATTR((unused)), +void do_get_size(int argc, ss_argv_t argv, int sci_idx EXT2FS_ATTR((unused)), void *infop EXT2FS_ATTR((unused))) { ext2_ino_t size; diff --git a/tests/progs/test_icount.h b/tests/progs/test_icount.h index 29d56ab..b086547 100644 --- a/tests/progs/test_icount.h +++ b/tests/progs/test_icount.h @@ -1,10 +1,21 @@ -void do_create_icount(int argc, char **argv, int sci_idx, void *infop); -void do_free_icount(int argc, char **argv, int sci_idx, void *infop); -void do_fetch(int argc, char **argv, int sci_idx, void *infop); -void do_increment(int argc, char **argv, int sci_idx, void *infop); -void do_decrement(int argc, char **argv, int sci_idx, void *infop); -void do_store(int argc, char **argv, int sci_idx, void *infop); -void do_get_size(int argc, char **argv, int sci_idx, void *infop); -void do_dump(int argc, char **argv, int sci_idx, void *infop); -void do_validate(int argc, char **argv, int sci_idx, void *infop); +/* + * test_icount.h + * + * Copyright (C) 1997 Theodore Ts'o. + * + * %Begin-Header% + * This file may be redistributed under the terms of the GNU Public + * License. + * %End-Header% + */ + +void do_create_icount(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_free_icount(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_fetch(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_increment(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_decrement(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_store(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_get_size(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_dump(int argc, ss_argv_t argv, int sci_idx, void *infop); +void do_validate(int argc, ss_argv_t argv, int sci_idx, void *infop); diff --git a/tests/progs/test_rel.c b/tests/progs/test_rel.c index 8f7280c..6666b73 100644 --- a/tests/progs/test_rel.c +++ b/tests/progs/test_rel.c @@ -141,7 +141,7 @@ static void display_irel_entry(ext2_ino_t old, /* * These are the actual command table procedures */ -void do_brel_ma_create(int argc, char **argv) +void do_brel_ma_create(int argc, ss_argv_t argv) { const char *usage = "Usage: %s name max_blocks\n"; errcode_t retval; @@ -161,7 +161,7 @@ void do_brel_ma_create(int argc, char **argv) return; } -void do_brel_free(int argc, char **argv) +void do_brel_free(int argc, ss_argv_t argv) { if (check_brel(argv[0])) return; @@ -170,7 +170,7 @@ void do_brel_free(int argc, char **argv) return; } -void do_brel_put(int argc, char **argv) +void do_brel_put(int argc, ss_argv_t argv) { const char *usage = "usage: %s old_block new_block [owner] [offset]"; errcode_t retval; @@ -211,7 +211,7 @@ void do_brel_put(int argc, char **argv) return; } -void do_brel_get(int argc, char **argv) +void do_brel_get(int argc, ss_argv_t argv) { const char *usage = "%s block"; errcode_t retval; @@ -235,7 +235,7 @@ void do_brel_get(int argc, char **argv) return; } -void do_brel_start_iter(int argc, char **argv) +void do_brel_start_iter(int argc, ss_argv_t argv) { errcode_t retval; @@ -250,7 +250,7 @@ void do_brel_start_iter(int argc, char **argv) return; } -void do_brel_next(int argc, char **argv) +void do_brel_next(int argc, ss_argv_t argv) { errcode_t retval; struct ext2_block_relocate_entry ent; @@ -272,7 +272,7 @@ void do_brel_next(int argc, char **argv) return; } -void do_brel_dump(int argc, char **argv) +void do_brel_dump(int argc, ss_argv_t argv) { errcode_t retval; struct ext2_block_relocate_entry ent; @@ -301,7 +301,7 @@ void do_brel_dump(int argc, char **argv) return; } -void do_brel_move(int argc, char **argv) +void do_brel_move(int argc, ss_argv_t argv) { const char *usage = "%s old_block new_block"; errcode_t retval; @@ -326,7 +326,7 @@ void do_brel_move(int argc, char **argv) return; } -void do_brel_delete(int argc, char **argv) +void do_brel_delete(int argc, ss_argv_t argv) { const char *usage = "%s block"; errcode_t retval; @@ -348,7 +348,7 @@ void do_brel_delete(int argc, char **argv) } } -void do_irel_ma_create(int argc, char **argv) +void do_irel_ma_create(int argc, ss_argv_t argv) { const char *usage = "Usage: %s name max_inode\n"; errcode_t retval; @@ -368,7 +368,7 @@ void do_irel_ma_create(int argc, char **argv) return; } -void do_irel_free(int argc, char **argv) +void do_irel_free(int argc, ss_argv_t argv) { if (check_irel(argv[0])) return; @@ -378,7 +378,7 @@ void do_irel_free(int argc, char **argv) return; } -void do_irel_put(int argc, char **argv) +void do_irel_put(int argc, ss_argv_t argv) { const char *usage = "%s old new max_refs"; errcode_t retval; @@ -414,7 +414,7 @@ void do_irel_put(int argc, char **argv) return; } -void do_irel_get(int argc, char **argv) +void do_irel_get(int argc, ss_argv_t argv) { const char *usage = "%s inode"; errcode_t retval; @@ -440,7 +440,7 @@ void do_irel_get(int argc, char **argv) return; } -void do_irel_get_by_orig(int argc, char **argv) +void do_irel_get_by_orig(int argc, ss_argv_t argv) { const char *usage = "%s orig_inode"; errcode_t retval; @@ -466,7 +466,7 @@ void do_irel_get_by_orig(int argc, char **argv) return; } -void do_irel_start_iter(int argc, char **argv) +void do_irel_start_iter(int argc, ss_argv_t argv) { errcode_t retval; @@ -481,7 +481,7 @@ void do_irel_start_iter(int argc, char **argv) return; } -void do_irel_next(int argc, char **argv) +void do_irel_next(int argc, ss_argv_t argv) { errcode_t retval; ext2_ino_t old; @@ -503,7 +503,7 @@ void do_irel_next(int argc, char **argv) return; } -void do_irel_dump(int argc, char **argv) +void do_irel_dump(int argc, ss_argv_t argv) { errcode_t retval; ext2_ino_t ino; @@ -532,7 +532,7 @@ void do_irel_dump(int argc, char **argv) return; } -void do_irel_add_ref(int argc, char **argv) +void do_irel_add_ref(int argc, ss_argv_t argv) { const char *usage = "%s inode block offset"; errcode_t retval; @@ -569,7 +569,7 @@ void do_irel_add_ref(int argc, char **argv) return; } -void do_irel_start_iter_ref(int argc, char **argv) +void do_irel_start_iter_ref(int argc, ss_argv_t argv) { const char *usage = "%s inode"; errcode_t retval; @@ -593,7 +593,7 @@ void do_irel_start_iter_ref(int argc, char **argv) return; } -void do_irel_next_ref(int argc, char **argv) +void do_irel_next_ref(int argc, ss_argv_t argv) { struct ext2_inode_reference ref; errcode_t retval; @@ -610,7 +610,7 @@ void do_irel_next_ref(int argc, char **argv) return; } -void do_irel_move(int argc, char **argv) +void do_irel_move(int argc, ss_argv_t argv) { const char *usage = "%s old new"; errcode_t retval; @@ -636,7 +636,7 @@ void do_irel_move(int argc, char **argv) return; } -void do_irel_delete(int argc, char **argv) +void do_irel_delete(int argc, ss_argv_t argv) { const char *usage = "%s inode"; errcode_t retval; diff --git a/tests/progs/test_rel.h b/tests/progs/test_rel.h index 47c4d09..62267ba 100644 --- a/tests/progs/test_rel.h +++ b/tests/progs/test_rel.h @@ -11,25 +11,25 @@ -void do_brel_ma_create(int argc, char **argv); -void do_brel_free(int argc, char **argv); -void do_brel_put(int argc, char **argv); -void do_brel_get(int argc, char **argv); -void do_brel_start_iter(int argc, char **argv); -void do_brel_next(int argc, char **argv); -void do_brel_dump(int argc, char **argv); -void do_brel_move(int argc, char **argv); -void do_brel_delete(int argc, char **argv); -void do_irel_ma_create(int argc, char **argv); -void do_irel_free(int argc, char **argv); -void do_irel_put(int argc, char **argv); -void do_irel_get(int argc, char **argv); -void do_irel_get_by_orig(int argc, char **argv); -void do_irel_start_iter(int argc, char **argv); -void do_irel_next(int argc, char **argv); -void do_irel_dump(int argc, char **argv); -void do_irel_add_ref(int argc, char **argv); -void do_irel_start_iter_ref(int argc, char **argv); -void do_irel_next_ref(int argc, char **argv); -void do_irel_move(int argc, char **argv); -void do_irel_delete(int argc, char **argv); +void do_brel_ma_create(int argc, ss_argv_t argv); +void do_brel_free(int argc, ss_argv_t argv); +void do_brel_put(int argc, ss_argv_t argv); +void do_brel_get(int argc, ss_argv_t argv); +void do_brel_start_iter(int argc, ss_argv_t argv); +void do_brel_next(int argc, ss_argv_t argv); +void do_brel_dump(int argc, ss_argv_t argv); +void do_brel_move(int argc, ss_argv_t argv); +void do_brel_delete(int argc, ss_argv_t argv); +void do_irel_ma_create(int argc, ss_argv_t argv); +void do_irel_free(int argc, ss_argv_t argv); +void do_irel_put(int argc, ss_argv_t argv); +void do_irel_get(int argc, ss_argv_t argv); +void do_irel_get_by_orig(int argc, ss_argv_t argv); +void do_irel_start_iter(int argc, ss_argv_t argv); +void do_irel_next(int argc, ss_argv_t argv); +void do_irel_dump(int argc, ss_argv_t argv); +void do_irel_add_ref(int argc, ss_argv_t argv); +void do_irel_start_iter_ref(int argc, ss_argv_t argv); +void do_irel_next_ref(int argc, ss_argv_t argv); +void do_irel_move(int argc, ss_argv_t argv); +void do_irel_delete(int argc, ss_argv_t argv); diff --git a/tests/r_64bit_big_expand/script b/tests/r_64bit_big_expand/script index d1bf8cd..147cf9b 100644 --- a/tests/r_64bit_big_expand/script +++ b/tests/r_64bit_big_expand/script @@ -11,7 +11,7 @@ LOG=$test_name.log E2FSCK=../e2fsck/e2fsck os=$(uname -s) -if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then +if [ "$os" = "Darwin" -o "$os" = "GNU" -o "$os" = "FreeBSD" ]; then # creates a 2TB filesystem echo "$test_name: $test_description: skipped for $os" return 0 diff --git a/tests/r_bigalloc_big_expand/script b/tests/r_bigalloc_big_expand/script index 101aafb..bd42178 100644 --- a/tests/r_bigalloc_big_expand/script +++ b/tests/r_bigalloc_big_expand/script @@ -12,7 +12,7 @@ E2FSCK=../e2fsck/e2fsck RESIZE2FS_OPTS=-f os=$(uname -s) -if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then +if [ "$os" = "Darwin" -o "$os" = "GNU" -o "$os" = "FreeBSD" ]; then # creates a 2TB filesystem echo "$test_name: $test_description: skipped for $os" return 0 diff --git a/tests/r_ext4_big_expand/script b/tests/r_ext4_big_expand/script index a49e4c3..4b0016c 100644 --- a/tests/r_ext4_big_expand/script +++ b/tests/r_ext4_big_expand/script @@ -11,9 +11,9 @@ LOG=$test_name.log E2FSCK=../e2fsck/e2fsck os=$(uname -s) -if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then +if [ "$os" = "Darwin" -o "$os" = "GNU" -o "$os" = "FreeBSD" ]; then # creates a 2TB filesystem - echo "$test_name: $test_description: skipped for FreeBSD" + echo "$test_name: $test_description: skipped for $os" return 0 fi diff --git a/tests/r_move_itable/expect b/tests/r_move_itable/expect index 74a00fe..f879fed 100644 --- a/tests/r_move_itable/expect +++ b/tests/r_move_itable/expect @@ -27,7 +27,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 @@ -104,7 +104,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 @@ -399,7 +399,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 @@ -931,7 +931,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 @@ -1694,7 +1694,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/r_move_itable_nostride/expect b/tests/r_move_itable_nostride/expect index 74c2cc0..b53d056 100644 --- a/tests/r_move_itable_nostride/expect +++ b/tests/r_move_itable_nostride/expect @@ -1,6 +1,6 @@ mke2fs -q -F -o Linux -b 1024 -i 1024 -E stride=8192 -t ext4 test.img 1024000 resize2fs -p test.img 10240000 -Resizing the filesystem on test.img to 100000000 (1k) blocks. +Resizing the filesystem on test.img to 99999745 (1k) blocks. Begin pass 2 (max = 2062) Relocating blocks ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Begin pass 3 (max = 125) @@ -45,7 +45,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Journal inode: 8 diff --git a/tests/r_move_itable_nostride/script b/tests/r_move_itable_nostride/script index d24df22..1246e1a 100644 --- a/tests/r_move_itable_nostride/script +++ b/tests/r_move_itable_nostride/script @@ -1,5 +1,5 @@ os=$(uname -s) -if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then +if [ "$os" = "Darwin" -o "$os" = "GNU" -o "$os" = "FreeBSD" ]; then # creates a 96GB filesystem echo "$test_name: $test_description: skipped for $os" return 0 diff --git a/tests/r_move_itable_realloc/expect b/tests/r_move_itable_realloc/expect index 67f2fe4..65691ad 100644 --- a/tests/r_move_itable_realloc/expect +++ b/tests/r_move_itable_realloc/expect @@ -1,6 +1,6 @@ mke2fs -q -F -o Linux -b 1024 -i 1024 -O ^resize_inode -t ext4 test.img 1024000 resize2fs -p test.img 100000000 -Resizing the filesystem on test.img to 100000000 (1k) blocks. +Resizing the filesystem on test.img to 99999745 (1k) blocks. Begin pass 2 (max = 2061) Relocating blocks ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Begin pass 3 (max = 125) @@ -44,7 +44,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Journal inode: 8 diff --git a/tests/r_move_itable_realloc/script b/tests/r_move_itable_realloc/script index 20c26db..49f8d58 100644 --- a/tests/r_move_itable_realloc/script +++ b/tests/r_move_itable_realloc/script @@ -1,5 +1,5 @@ os=$(uname -s) -if [ "$os" = "Darwin" -o "$os" = "GNU" -o "FreeBSD" ]; then +if [ "$os" = "Darwin" -o "$os" = "GNU" -o "$os" = "FreeBSD" ]; then # creates a 96GB filesystem echo "$test_name: $test_description: skipped: skipped for $os" return 0 diff --git a/tests/r_resize_inode/expect b/tests/r_resize_inode/expect index 6756580..d3a73d4 100644 --- a/tests/r_resize_inode/expect +++ b/tests/r_resize_inode/expect @@ -28,7 +28,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 @@ -183,7 +183,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 @@ -622,7 +622,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 @@ -1071,7 +1071,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 @@ -1229,7 +1229,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/scripts/resize_test b/tests/scripts/resize_test index a000c85..588f5da 100755 --- a/tests/scripts/resize_test +++ b/tests/scripts/resize_test @@ -64,6 +64,7 @@ chmod u-w $TMPFILE echo $RESIZE2FS -P $TMPFILE >> $LOG 2>&1 if ! $RESIZE2FS -P $TMPFILE >> $LOG 2>&1 then + echo "First resize2fs failed" >> $LOG return 1 fi chmod u+w $TMPFILE @@ -71,12 +72,14 @@ chmod u+w $TMPFILE echo $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS $TMPFILE $SIZE_2 >> $LOG 2>&1 if ! $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS $TMPFILE $SIZE_2 >> $LOG 2>&1 then + echo "Second resize2fs failed" >> $LOG return 1 fi echo $FSCK -fy $TMPFILE >> $LOG 2>&1 if ! $FSCK -fy $TMPFILE >> $LOG 2>&1 then + echo "First fsck failed" >> $LOG $DUMPE2FS $TMPFILE >> $LOG return 1 fi @@ -101,12 +104,14 @@ fi echo $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1 if ! $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1 then + echo "Third resize2fs failed" >> $LOG return 1 fi echo $FSCK -fy $TMPFILE >> $LOG 2>&1 if ! $FSCK -fy $TMPFILE >> $LOG 2>&1 then + echo "Second fsck failed" >> $LOG $DUMPE2FS $TMPFILE >> $LOG return 1 fi @@ -126,12 +131,14 @@ fi echo $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1 if ! $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1 then + echo "Fourth resize2fs failed" >> $LOG return 1 fi echo $FSCK -fy $TMPFILE >> $LOG 2>&1 if ! $FSCK -fy $TMPFILE >> $LOG 2>&1 then + echo "Third fsck failed" >> $LOG $DUMPE2FS $TMPFILE >> $LOG return 1 fi @@ -151,12 +158,14 @@ fi echo $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1 if ! $RESIZE2FS $RESIZE2FS_OPTS -d $DBG_FLAGS -M $TMPFILE $SIZE_2 >> $LOG 2>&1 then + echo "Fifth resize2fs failed" >> $LOG return 1 fi echo $FSCK -fy $TMPFILE >> $LOG 2>&1 if ! $FSCK -fy $TMPFILE >> $LOG 2>&1 then + echo "Fourth fsck failed" >> $LOG $DUMPE2FS $TMPFILE >> $LOG return 1 fi diff --git a/tests/t_dangerous/expect b/tests/t_dangerous/expect index 31aaf4f..6f76ce7 100644 --- a/tests/t_dangerous/expect +++ b/tests/t_dangerous/expect @@ -84,10 +84,10 @@ Change in FS metadata: @@ -1,3 +1,3 @@ -Filesystem UUID: 6fc3daa4-180d-4f2b-a6f2-f7a5efb79bcf -Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit sparse_super large_file huge_file uninit_bg dir_nlink extra_isize --Inode size: 256 +-Inode size: 256 +Filesystem UUID: f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0 +Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent 64bit sparse_super large_file huge_file dir_nlink extra_isize metadata_csum -+Inode size: 512 ++Inode size: 512 Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity diff --git a/tests/t_iexpand_full/expect b/tests/t_iexpand_full/expect index f99ab4b..130e09d 100644 --- a/tests/t_iexpand_full/expect +++ b/tests/t_iexpand_full/expect @@ -28,8 +28,8 @@ Change in FS metadata: -Inode blocks per group: 128 +Inode blocks per group: 256 @@ -29 +29 @@ --Inode size: 128 -+Inode size: 256 +-Inode size: 128 ++Inode size: 256 Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity diff --git a/tests/t_iexpand_mcsum/expect b/tests/t_iexpand_mcsum/expect index 354b117..a79d508 100644 --- a/tests/t_iexpand_mcsum/expect +++ b/tests/t_iexpand_mcsum/expect @@ -44,8 +44,8 @@ Change in FS metadata: -Inode blocks per group: 128 +Inode blocks per group: 256 @@ -28 +28 @@ --Inode size: 128 -+Inode size: 256 +-Inode size: 128 ++Inode size: 256 @@ -31,0 +32 @@ +Checksum type: crc32c Pass 1: Checking inodes, blocks, and sizes diff --git a/tests/u_bounce_io/expect.1 b/tests/u_bounce_io/expect.1 index e1d1845..c552603 100644 --- a/tests/u_bounce_io/expect.1 +++ b/tests/u_bounce_io/expect.1 @@ -42,7 +42,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Default directory hash: half_md4 diff --git a/tests/u_direct_io/expect b/tests/u_direct_io/expect index 830cbd7..ac22e66 100644 --- a/tests/u_direct_io/expect +++ b/tests/u_direct_io/expect @@ -1,4 +1,4 @@ -mke2fs -F -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D $LOOP +mke2fs -F -b 4096 -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D $LOOP Creating filesystem with 32768 4k blocks and 32768 inodes Allocating group tables: done @@ -36,7 +36,7 @@ Check interval: 15552000 (6 months) Reserved blocks uid: 0 Reserved blocks gid: 0 First inode: 11 -Inode size: 256 +Inode size: 256 Required extra isize: 32 Desired extra isize: 32 Journal inode: 8 diff --git a/tests/u_direct_io/script b/tests/u_direct_io/script index b4f0775..2f80e64 100644 --- a/tests/u_direct_io/script +++ b/tests/u_direct_io/script @@ -8,14 +8,14 @@ elif test ! -x $DEBUGFS_EXE; then echo "$test_name: $DESCRIPTION: skipped (no debugfs)" else dd if=/dev/zero of=$TMPFILE bs=1M count=128 > /dev/null 2>&1 - LOOP=$(losetup --show --sector-size 4096 -f $TMPFILE) + LOOP=$(losetup --show -f $TMPFILE 2>&1) if [ ! -b "$LOOP" ]; then echo "$test_name: $DESCRIPTION: skipped (no loop devices)" rm -f $TMPFILE exit 0 fi - echo mke2fs -F -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D \$LOOP > $OUT - $MKE2FS -F -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D $LOOP 2>&1 | \ + echo mke2fs -F -b 4096 -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D \$LOOP > $OUT + $MKE2FS -F -b 4096 -o Linux -t ext4 -O ^metadata_csum,^uninit_bg -D $LOOP 2>&1 | \ sed -f $cmd_dir/filter.sed >> $OUT echo debugfs -D -R stats \$LOOP >> $OUT |