aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-03-11 16:19:10 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-03-11 23:31:38 -0400
commit26c09eb8145a16dcba6c40810d46a78712d253f2 (patch)
treeebc779c27fcedcd2602156a141add4dcba80e717 /tests
parentc15386cdeed2464736f46bf1b19ec80ba8812dbf (diff)
downloade2fsprogs-26c09eb8145a16dcba6c40810d46a78712d253f2.tar.gz
e2fsprogs-26c09eb8145a16dcba6c40810d46a78712d253f2.tar.xz
e2fsprogs-26c09eb8145a16dcba6c40810d46a78712d253f2.zip
e2fsck: check for zero length extent
If an extent has e_len set to zero, the kernel will oops with a BUG_ON. Unfortunately, e2fsck wasn't catching this case. The kernel needs to be fixed to notice this case and call ext4_error() instead of failing an assertion check, but e2fsck should catch this case and repair it (by deleting the errant extent). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'tests')
-rw-r--r--tests/f_ext_zero_len/expect.113
-rw-r--r--tests/f_ext_zero_len/expect.27
-rw-r--r--tests/f_ext_zero_len/image.gzbin0 -> 576 bytes
-rw-r--r--tests/f_ext_zero_len/name1
4 files changed, 21 insertions, 0 deletions
diff --git a/tests/f_ext_zero_len/expect.1 b/tests/f_ext_zero_len/expect.1
new file mode 100644
index 00000000..40109b34
--- /dev/null
+++ b/tests/f_ext_zero_len/expect.1
@@ -0,0 +1,13 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has zero length extent
+ (invalid logical block 0, physical block 37)
+Clear? yes
+
+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: 12/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 1
diff --git a/tests/f_ext_zero_len/expect.2 b/tests/f_ext_zero_len/expect.2
new file mode 100644
index 00000000..4ee5d96a
--- /dev/null
+++ b/tests/f_ext_zero_len/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: 12/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
diff --git a/tests/f_ext_zero_len/image.gz b/tests/f_ext_zero_len/image.gz
new file mode 100644
index 00000000..a03e5fd8
--- /dev/null
+++ b/tests/f_ext_zero_len/image.gz
Binary files differ
diff --git a/tests/f_ext_zero_len/name b/tests/f_ext_zero_len/name
new file mode 100644
index 00000000..ada4a72f
--- /dev/null
+++ b/tests/f_ext_zero_len/name
@@ -0,0 +1 @@
+extent with zero length