From: Tao Ma Date: Mon, 11 Jun 2012 03:56:30 +0000 (-0400) Subject: tests: add new test f_zero_extent_length X-Git-Tag: v1.42.4~7 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=8d12c46a22965179cae1e3b47778fdee5efeb513;p=tools%2Fe2fsprogs.git 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 Signed-off-by: Theodore Ts'o --- 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 0000000..762159c --- /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 0000000..762159c --- /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 0000000..0b69158 Binary files /dev/null and b/tests/f_uninit_ext_past_eof/image.gz differ diff --git a/tests/f_uninit_ext_past_eof/name b/tests/f_uninit_ext_past_eof/name new file mode 100644 index 0000000..9e0c6e0 --- /dev/null +++ b/tests/f_uninit_ext_past_eof/name @@ -0,0 +1 @@ +fallocated extents after i_size