OSDN Git Service

ChangeLog, run_e2fsck, expect.1, expect.2, image.gz, name, script:
authorTheodore Ts'o <tytso@mit.edu>
Wed, 10 Nov 1999 13:17:24 +0000 (13:17 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 10 Nov 1999 13:17:24 +0000 (13:17 +0000)
  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.

14 files changed:
tests/ChangeLog
tests/f_filetype/expect.1 [new file with mode: 0644]
tests/f_filetype/expect.2 [new file with mode: 0644]
tests/f_filetype/image.gz [new file with mode: 0644]
tests/f_filetype/name [new file with mode: 0644]
tests/f_imagic/expect.1 [new file with mode: 0644]
tests/f_imagic/expect.2 [new file with mode: 0644]
tests/f_imagic/image.gz [new file with mode: 0644]
tests/f_imagic/name [new file with mode: 0644]
tests/f_imagic_fs/expect.1 [new file with mode: 0644]
tests/f_imagic_fs/expect.2 [new file with mode: 0644]
tests/f_imagic_fs/name [new file with mode: 0644]
tests/f_imagic_fs/script [new file with mode: 0644]
tests/run_e2fsck

index c1a423f..fc801cc 100644 (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
diff --git a/tests/f_filetype/expect.1 b/tests/f_filetype/expect.1
new file mode 100644 (file)
index 0000000..e65fdb2
--- /dev/null
@@ -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
diff --git a/tests/f_filetype/expect.2 b/tests/f_filetype/expect.2
new file mode 100644 (file)
index 0000000..a8681aa
--- /dev/null
@@ -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
diff --git a/tests/f_filetype/image.gz b/tests/f_filetype/image.gz
new file mode 100644 (file)
index 0000000..ad0b2ec
Binary files /dev/null and b/tests/f_filetype/image.gz differ
diff --git a/tests/f_filetype/name b/tests/f_filetype/name
new file mode 100644 (file)
index 0000000..0c021f5
--- /dev/null
@@ -0,0 +1 @@
+set filetype information and illegal special files
diff --git a/tests/f_imagic/expect.1 b/tests/f_imagic/expect.1
new file mode 100644 (file)
index 0000000..8e78c55
--- /dev/null
@@ -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
diff --git a/tests/f_imagic/expect.2 b/tests/f_imagic/expect.2
new file mode 100644 (file)
index 0000000..1f411c0
--- /dev/null
@@ -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
diff --git a/tests/f_imagic/image.gz b/tests/f_imagic/image.gz
new file mode 100644 (file)
index 0000000..6c2b3fa
Binary files /dev/null and b/tests/f_imagic/image.gz differ
diff --git a/tests/f_imagic/name b/tests/f_imagic/name
new file mode 100644 (file)
index 0000000..db94008
--- /dev/null
@@ -0,0 +1 @@
+non-imagic filesystem with imagic inodes
diff --git a/tests/f_imagic_fs/expect.1 b/tests/f_imagic_fs/expect.1
new file mode 100644 (file)
index 0000000..cf54099
--- /dev/null
@@ -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
diff --git a/tests/f_imagic_fs/expect.2 b/tests/f_imagic_fs/expect.2
new file mode 100644 (file)
index 0000000..1f411c0
--- /dev/null
@@ -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
diff --git a/tests/f_imagic_fs/name b/tests/f_imagic_fs/name
new file mode 100644 (file)
index 0000000..a036976
--- /dev/null
@@ -0,0 +1 @@
+imagic filesystem with imagic inodes
diff --git a/tests/f_imagic_fs/script b/tests/f_imagic_fs/script
new file mode 100644 (file)
index 0000000..572ace1
--- /dev/null
@@ -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
index 91277e1..cd30290 100644 (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