aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTao Ma <boyu.mt@taobao.com>2012-06-10 23:56:30 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-06-11 01:06:50 -0400
commit8d12c46a22965179cae1e3b47778fdee5efeb513 (patch)
tree7c9a09b71c8c4ea76d8442b80f02888227cc7893 /tests
parent9c40d14841f04811097a123d6e8555e78ce56811 (diff)
downloade2fsprogs-8d12c46a22965179cae1e3b47778fdee5efeb513.tar.gz
e2fsprogs-8d12c46a22965179cae1e3b47778fdee5efeb513.tar.xz
e2fsprogs-8d12c46a22965179cae1e3b47778fdee5efeb513.zip
tests: add new test f_zero_extent_length
If all of the extents in the last extent tree block (ETB) in a non-trivial extent tree contain uninitialized extents which are after the end of the file as defined by i_size, the hueristics will incorrectly estimate the last entry (and hence the node's e_len field) in the last entry of each level of the extent tree. As Tao Ma has noted, since e2fsck was requiring that the length (e_len) field of interior nodes be non-zero, this was causing false failures where e2fsck would declare that the extent tree was corrupted. This was fixed in commit 9c40d14841: "e2fsck: only check for zero-length leaf extents". Add a regression test case to ensure that this issue remains fixed. Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tests')
-rw-r--r--tests/f_uninit_ext_past_eof/expect.17
-rw-r--r--tests/f_uninit_ext_past_eof/expect.27
-rw-r--r--tests/f_uninit_ext_past_eof/image.gzbin0 -> 5102 bytes
-rw-r--r--tests/f_uninit_ext_past_eof/name1
4 files changed, 15 insertions, 0 deletions
diff --git a/tests/f_uninit_ext_past_eof/expect.1 b/tests/f_uninit_ext_past_eof/expect.1
new file mode 100644
index 00000000..762159c9
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof/expect.1
@@ -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/1024 files (16.7% non-contiguous), 1227/4096 blocks
+Exit status is 0
diff --git a/tests/f_uninit_ext_past_eof/expect.2 b/tests/f_uninit_ext_past_eof/expect.2
new file mode 100644
index 00000000..762159c9
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof/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/1024 files (16.7% non-contiguous), 1227/4096 blocks
+Exit status is 0
diff --git a/tests/f_uninit_ext_past_eof/image.gz b/tests/f_uninit_ext_past_eof/image.gz
new file mode 100644
index 00000000..0b691580
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof/image.gz
Binary files differ
diff --git a/tests/f_uninit_ext_past_eof/name b/tests/f_uninit_ext_past_eof/name
new file mode 100644
index 00000000..9e0c6e02
--- /dev/null
+++ b/tests/f_uninit_ext_past_eof/name
@@ -0,0 +1 @@
+fallocated extents after i_size