From 8d12c46a22965179cae1e3b47778fdee5efeb513 Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Sun, 10 Jun 2012 23:56:30 -0400 Subject: [PATCH] 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 --- tests/f_uninit_ext_past_eof/expect.1 | 7 +++++++ tests/f_uninit_ext_past_eof/expect.2 | 7 +++++++ tests/f_uninit_ext_past_eof/image.gz | Bin 0 -> 5102 bytes tests/f_uninit_ext_past_eof/name | 1 + 4 files changed, 15 insertions(+) create mode 100644 tests/f_uninit_ext_past_eof/expect.1 create mode 100644 tests/f_uninit_ext_past_eof/expect.2 create mode 100644 tests/f_uninit_ext_past_eof/image.gz create mode 100644 tests/f_uninit_ext_past_eof/name 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 0000000000000000000000000000000000000000..0b6915805bc7c3d67b9bf0f944f980b36012268e GIT binary patch literal 5102 zcmb2|=HM{n-0IK3oSB=Lp33m{u78e5s070Y^WBScwzp2RH+-t{lY_{A6(w~8 zL)9)$^`=g#RICD+?rfbW|xE5jfl^Fk47()~U$+s*edxoa}rp6SlP%t;{b= zOY|0Bx$rI5=ijRG?`PkDN?U*Zbz%DYuYW#-zWv;o zzyIfhcX>HKGoGB7R&H}Q*|pujU(VlG{qKRkzl_bqBYfXQ z`%~91whPSNC#$>h_1Wohn%DLy9y=vr{;1mIR^e~v;%6$d(@t&sSa<6oV?@&Gq&58; zbyL3DN3PuxdLX6rSJC!gtPH3i)#!8m7q9L2rxta*|MD^K|B9FE-rO^*Rb0u_`p3?^ zc43gD)T#FmH>+LImY4hY*_W5y?9);oKfADW zPi}0BUEP<8&9UJ=_ut#kj*+muR#=z(<%n(gggaOD@=xd6zZbk(_Se63-+5rDSEgN_ zf7@I?ZapYXHMBnYC4Xwgo9q9l%za(Yh?>mk%UiHHtH