Whamcloud - gitweb
tests: add f_first_meta_bg_too_big test
authorTheodore Ts'o <tytso@mit.edu>
Sat, 9 Aug 2014 17:03:43 +0000 (13:03 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 10 Aug 2014 20:21:31 +0000 (16:21 -0400)
The test verifies that e2fsck can properly fix a file system where the
value of s_first_meta_bg in the superblock is larger than the number
of block group descriptors in the file system.  E2fsck will fix this
by clearing the meta_bg feature.

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

diff --git a/tests/f_first_meta_bg_too_big/expect.1 b/tests/f_first_meta_bg_too_big/expect.1
new file mode 100644 (file)
index 0000000..85786bd
--- /dev/null
@@ -0,0 +1,20 @@
+First_meta_bg is too big.  (2, max value 1).  Clear? yes
+
+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
+Block bitmap differences:  -3
+Fix? yes
+
+Free blocks count wrong for group #0 (79, counted=80).
+Fix? yes
+
+Free blocks count wrong (79, counted=80).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/16 files (0.0% non-contiguous), 20/100 blocks
+Exit status is 1
diff --git a/tests/f_first_meta_bg_too_big/expect.2 b/tests/f_first_meta_bg_too_big/expect.2
new file mode 100644 (file)
index 0000000..44bff62
--- /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/16 files (0.0% non-contiguous), 20/100 blocks
+Exit status is 0
diff --git a/tests/f_first_meta_bg_too_big/image.gz b/tests/f_first_meta_bg_too_big/image.gz
new file mode 100644 (file)
index 0000000..5279370
Binary files /dev/null and b/tests/f_first_meta_bg_too_big/image.gz differ
diff --git a/tests/f_first_meta_bg_too_big/name b/tests/f_first_meta_bg_too_big/name
new file mode 100644 (file)
index 0000000..47ec96d
--- /dev/null
@@ -0,0 +1 @@
+s_first_meta_bg is too large