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 000000000..762159c9f --- /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 000000000..762159c9f --- /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 zc-rmMYgEz)7{_s%Gi95p9i3VV(=OK3937LIDIPVQR$^|3R$lQwk?=Y%K^I*mHf1JQ zR^+Uek*Pz$Qo*Cnl<9D(RN^%iGeiU-E+YSJo$bZm?cHAN|9Sho`=00g;ACTCcW4V5 zVvvH1O-g`BCeUdXVb+ipWLs?-yO@eXOxKP|EEPPvQN=%e1}?vd|X_3+#BW|UXB->K#PTTL?yaob}PMT1)dGap+L zp0p&3^9cKD%xCAV+nnqRse@ZRl-eO$gHpE=CRsg)=W3>x)6+D`bA8lYl&5^jprcBE zATt%G;YR~4KMLB`7U`S<{j@9E_8_HalghFzp`q667>;A-(j*?FMeP=}+xPOUk*^Be z#t3T$nWF7>R31x49Glq?9><7#Sk~kcuS7-EH-~k`XKORqT0_V`CG1@#DT3Hjl^K_$ z3RyaEfAP`Mr285Bx{r!=UdS^wp*CB1(i!H?5hplIukI76Hj(zqgNY3{rWk?p987>q zW5`dR;~Rkf)F{9^u+_@$DouM)9twm+y@B%%ulwfJk#@N%P3Q0GYuZOpe;!df}9%hDn2?2_^^MFVXT-TSNWo+dSW+@{W*bY}2g42jLgQ*fcVsG55iV z6ptnP15P&M_}!?O5Xes zS;=11ybxHm@jJUt>rLlJiF$5rZiYYuyo>VoLkJnC8&&fKX2%t!CTs`Noy`Jwp^jgp zyc{nuG=JF<^4z)eEf;XW(@TW7Ltc(hyqnN-u!32*mb<5Ae{|MPapaisOxg|DE_o&* z`s5tum23h&gI^=)N5^Gcw?|1znn+0Z)H8lI`o4uFBL%qQm7zIT146e6f%K!pk7rTP z3#P5h@P)SZ)`jKfbsYvRR-v;6YJMuVF`4l(){HrDpTWCgDA89my$;-uSL+WEJw+a5UE)BlrRJ*vm4zk?@ZmbZHdgvykC$*N z3aW?ixx&J!SE_w!a@KKY