summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2010-05-11 21:10:12 -0400
committerTheodore Ts'o <tytso@mit.edu>2010-05-11 21:10:12 -0400
commit53499e86c509d190579433ade88a810ed86caf0c (patch)
tree435f456f4c3a3b87ae8e02e76db04536ce8f99d6
parent0433c1f1b72bb85d9ea11e7716a415a878a655c8 (diff)
downloade2fsprogs-53499e86c509d190579433ade88a810ed86caf0c.tar.gz
tests: Add new test f_unused_itable
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>
-rw-r--r--tests/f_unused_itable/expect.131
-rw-r--r--tests/f_unused_itable/expect.27
-rw-r--r--tests/f_unused_itable/image.gzbin0 -> 2310 bytes
-rw-r--r--tests/f_unused_itable/name1
4 files changed, 39 insertions, 0 deletions
diff --git a/tests/f_unused_itable/expect.1 b/tests/f_unused_itable/expect.1
new file mode 100644
index 00000000..d77e82a5
--- /dev/null
+++ b/tests/f_unused_itable/expect.1
@@ -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
index 00000000..b79d3180
--- /dev/null
+++ b/tests/f_unused_itable/expect.2
@@ -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
index 00000000..ca93e987
--- /dev/null
+++ b/tests/f_unused_itable/image.gz
Binary files differ
diff --git a/tests/f_unused_itable/name b/tests/f_unused_itable/name
new file mode 100644
index 00000000..39b68d64
--- /dev/null
+++ b/tests/f_unused_itable/name
@@ -0,0 +1 @@
+Invalid bg_unused_itable shouldn't move files to lost+found