OSDN Git Service

Add test for the case where s_inode_size is zero
authorTheodore Ts'o <tytso@mit.edu>
Fri, 7 Sep 2007 21:06:25 +0000 (17:06 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 7 Sep 2007 21:06:25 +0000 (17:06 -0400)
Older e2fsck's would crash; e2fsck should now automatically retry
using the backup superblock if it is present.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
tests/f_zero_inode_size/expect.1 [new file with mode: 0644]
tests/f_zero_inode_size/expect.2 [new file with mode: 0644]
tests/f_zero_inode_size/image.gz [new file with mode: 0644]
tests/f_zero_inode_size/name [new file with mode: 0644]

diff --git a/tests/f_zero_inode_size/expect.1 b/tests/f_zero_inode_size/expect.1
new file mode 100644 (file)
index 0000000..3e54170
--- /dev/null
@@ -0,0 +1,10 @@
+../e2fsck/e2fsck: Superblock invalid, trying backup blocks...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/2512 files (9.1% non-contiguous), 415/10000 blocks
+Exit status is 1
diff --git a/tests/f_zero_inode_size/expect.2 b/tests/f_zero_inode_size/expect.2
new file mode 100644 (file)
index 0000000..a6f1434
--- /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: 11/2512 files (9.1% non-contiguous), 415/10000 blocks
+Exit status is 0
diff --git a/tests/f_zero_inode_size/image.gz b/tests/f_zero_inode_size/image.gz
new file mode 100644 (file)
index 0000000..f4503c8
Binary files /dev/null and b/tests/f_zero_inode_size/image.gz differ
diff --git a/tests/f_zero_inode_size/name b/tests/f_zero_inode_size/name
new file mode 100644 (file)
index 0000000..ce88d96
--- /dev/null
@@ -0,0 +1 @@
+superblock with a zero inode size