ChangeLog, run_e2fsck, expect.1, expect.2, image.gz, name, script:

f_imagic: New test case which tests handling of imagic inodes in an
  	non-imagic-enabled filessystem.
  f_imagic_fs: New test case which tests handling of imagic inodes in an
  	imagic-enabled filesystem.
  f_filetype: New test case which tests setting filetype information in
  	a filesystem.  Also tests handling of immutable special files
  	(device/fifo).
  run_e2fsck: Add support for PREP_CMD, which allows a test case to
  	specify some commands which will be run (via eval) after the image is
  	compressed and before running e2fsck.
bitmap-optimize
Theodore Ts'o 1999-11-10 13:17:24 +00:00
parent 9b9fe8ac19
commit 0444e15b34
14 changed files with 143 additions and 1 deletions

View File

@ -1,3 +1,19 @@
1999-11-10 <tytso@valinux.com>
* f_imagic: New test case which tests handling of imagic inodes in
an non-imagic-enabled filessystem.
* f_imagic_fs: New test case which tests handling of imagic inodes
in an imagic-enabled filesystem.
* f_filetype: New test case which tests setting filetype
information in a filesystem. Also tests handling of
immutable special files (device/fifo).
* run_e2fsck: Add support for PREP_CMD, which allows a test case
to specify some commands which will be run (via eval)
after the image is compressed and before running e2fsck.
1999-10-26 <tytso@valinux.com>
* Release of E2fsprogs 1.17

37
tests/f_filetype/expect.1 Normal file
View File

@ -0,0 +1,37 @@
Pass 1: Checking inodes, blocks, and sizes
Special (device/socket/fifo) inode 14 has immutable flag set. Clear? yes
Special (device/socket/fifo) inode 15 has immutable flag set. Clear? yes
Special (device/socket/fifo) inode 16 has immutable flag set. Clear? yes
Pass 2: Checking directory structure
Setting filetype for entry '.' in / (2) to 2.
Setting filetype for entry '..' in / (2) to 2.
Setting filetype for entry 'lost+found' in / (2) to 2.
Setting filetype for entry 'file' in / (2) to 1.
Setting filetype for entry 'dir' in / (2) to 2.
Setting filetype for entry 'fifo' in / (2) to 5.
Setting filetype for entry 'block' in / (2) to 4.
Setting filetype for entry 'char' in / (2) to 3.
Setting filetype for entry 'symlink' in / (2) to 7.
Inode 18 (/badchar) is an illegal character device.
Clear? yes
Inode 19 (/badblock) is an illegal block device.
Clear? yes
Inode 20 (/badfifo) is an illegal FIFO.
Clear? yes
Setting filetype for entry '.' in /lost+found (11) to 2.
Setting filetype for entry '..' in /lost+found (11) to 2.
Setting filetype for entry '.' in /dir (13) to 2.
Setting filetype for entry '..' in /dir (13) to 2.
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 17/64 files (0.0% non-contiguous), 27/100 blocks
Exit status is 1

View File

@ -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: 17/64 files (0.0% non-contiguous), 27/100 blocks
Exit status is 0

BIN
tests/f_filetype/image.gz Normal file

Binary file not shown.

1
tests/f_filetype/name Normal file
View File

@ -0,0 +1 @@
set filetype information and illegal special files

38
tests/f_imagic/expect.1 Normal file
View File

@ -0,0 +1,38 @@
Pass 1: Checking inodes, blocks, and sizes
Inode 12 has imagic flag set. Clear? yes
Inode 13 has imagic flag set. Clear? yes
Inode 14 has imagic flag set. Clear? yes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found. Create? yes
Pass 4: Checking reference counts
Inode 2 ref count is 4, should be 3. Fix? yes
Unattached inode 12
Connect to /lost+found? yes
Inode 12 ref count is 2, should be 1. Fix? yes
Unattached inode 14
Connect to /lost+found? yes
Inode 14 ref count is 2, should be 1. Fix? yes
Pass 5: Checking group summary information
Block bitmap differences: -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19
Fix? yes
Free blocks count wrong for group #0 (76, counted=87).
Fix? yes
Free blocks count wrong (76, counted=87).
Fix? yes
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 14/16 files (0.0% non-contiguous), 13/100 blocks
Exit status is 1

7
tests/f_imagic/expect.2 Normal file
View File

@ -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: 14/16 files (0.0% non-contiguous), 13/100 blocks
Exit status is 0

BIN
tests/f_imagic/image.gz Normal file

Binary file not shown.

1
tests/f_imagic/name Normal file
View File

@ -0,0 +1 @@
non-imagic filesystem with imagic inodes

View File

@ -0,0 +1,22 @@
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found. Create? yes
Pass 4: Checking reference counts
Inode 2 ref count is 4, should be 3. Fix? yes
Pass 5: Checking group summary information
Block bitmap differences: -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19
Fix? yes
Free blocks count wrong for group #0 (76, counted=87).
Fix? yes
Free blocks count wrong (76, counted=87).
Fix? yes
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 14/16 files (0.0% non-contiguous), 13/100 blocks
Exit status is 1

View File

@ -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: 14/16 files (0.0% non-contiguous), 13/100 blocks
Exit status is 0

1
tests/f_imagic_fs/name Normal file
View File

@ -0,0 +1 @@
imagic filesystem with imagic inodes

3
tests/f_imagic_fs/script Normal file
View File

@ -0,0 +1,3 @@
IMAGE=$test_dir/../f_imagic/image.gz
PREP_CMD='$DEBUGFS -w -R "feature imagic_inodes" $TMPFILE > /dev/null 2>&1'
. $cmd_dir/run_e2fsck

View File

@ -28,6 +28,8 @@ fi
gunzip < $IMAGE > $TMPFILE
eval $PREP_CMD
$FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT1.new 2>&1
status=$?
echo Exit status is $status >> $OUT1.new
@ -68,6 +70,6 @@ if [ "$SKIP_VERIFY" != "true" ] ; then
fi
if [ "$SKIP_CLEANUP" != "true" ] ; then
unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2 ONE_PASS_ONLY
unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2 ONE_PASS_ONLY PREP_CMD
fi