Whamcloud - gitweb
tests: Add new test f_unused_itable
authorTheodore Ts'o <tytso@mit.edu>
Wed, 12 May 2010 01:10:12 +0000 (21:10 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 12 May 2010 01:10:12 +0000 (21:10 -0400)
Add test to make sure e2fsck doesn't end up detaching and sending to
lost+found inodes which are in an bg_itable_unused_region (e.g. if
there was a power failure and bg_itable_unused wasn't updated because
journaling wasn't enabled).

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

diff --git a/tests/f_unused_itable/expect.1 b/tests/f_unused_itable/expect.1
new file mode 100644 (file)
index 0000000..d77e82a
--- /dev/null
@@ -0,0 +1,31 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'foo' in / (2) references inode 65 found in group 1's unused inodes area.
+Fix? yes
+
+Entry '1' in / (2) references inode 12 found in group 0's unused inodes area.
+Fix? yes
+
+Restarting e2fsck from the beginning...
+One or more block group descriptor checksums are invalid.  Fix? yes
+
+Group descriptor 0 checksum is invalid.  FIXED.
+Group descriptor 1 checksum is invalid.  FIXED.
+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
+Free inodes count wrong for group #0 (53, counted=51).
+Fix? yes
+
+Free inodes count wrong for group #1 (64, counted=58).
+Fix? yes
+
+Free inodes count wrong (117, counted=109).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 19/128 files (0.0% non-contiguous), 165/1000 blocks
+Exit status is 1
diff --git a/tests/f_unused_itable/expect.2 b/tests/f_unused_itable/expect.2
new file mode 100644 (file)
index 0000000..b79d318
--- /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: 19/128 files (0.0% non-contiguous), 165/1000 blocks
+Exit status is 0
diff --git a/tests/f_unused_itable/image.gz b/tests/f_unused_itable/image.gz
new file mode 100644 (file)
index 0000000..ca93e98
Binary files /dev/null and b/tests/f_unused_itable/image.gz differ
diff --git a/tests/f_unused_itable/name b/tests/f_unused_itable/name
new file mode 100644 (file)
index 0000000..39b68d6
--- /dev/null
@@ -0,0 +1 @@
+Invalid bg_unused_itable shouldn't move files to lost+found