From 53499e86c509d190579433ade88a810ed86caf0c Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 11 May 2010 21:10:12 -0400 Subject: [PATCH] tests: Add new test f_unused_itable Add test to make sure e2fsck doesn't end up detaching and sending to lost+found inodes which are in an bg_itable_unused_region (e.g. if there was a power failure and bg_itable_unused wasn't updated because journaling wasn't enabled). Signed-off-by: "Theodore Ts'o" --- tests/f_unused_itable/expect.1 | 31 +++++++++++++++++++++++++++++++ tests/f_unused_itable/expect.2 | 7 +++++++ tests/f_unused_itable/image.gz | Bin 0 -> 2310 bytes tests/f_unused_itable/name | 1 + 4 files changed, 39 insertions(+) create mode 100644 tests/f_unused_itable/expect.1 create mode 100644 tests/f_unused_itable/expect.2 create mode 100644 tests/f_unused_itable/image.gz create mode 100644 tests/f_unused_itable/name diff --git a/tests/f_unused_itable/expect.1 b/tests/f_unused_itable/expect.1 new file mode 100644 index 000000000..d77e82a59 --- /dev/null +++ b/tests/f_unused_itable/expect.1 @@ -0,0 +1,31 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Entry 'foo' in / (2) references inode 65 found in group 1's unused inodes area. +Fix? yes + +Entry '1' in / (2) references inode 12 found in group 0's unused inodes area. +Fix? yes + +Restarting e2fsck from the beginning... +One or more block group descriptor checksums are invalid. Fix? yes + +Group descriptor 0 checksum is invalid. FIXED. +Group descriptor 1 checksum is invalid. FIXED. +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 +Free inodes count wrong for group #0 (53, counted=51). +Fix? yes + +Free inodes count wrong for group #1 (64, counted=58). +Fix? yes + +Free inodes count wrong (117, counted=109). +Fix? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 19/128 files (0.0% non-contiguous), 165/1000 blocks +Exit status is 1 diff --git a/tests/f_unused_itable/expect.2 b/tests/f_unused_itable/expect.2 new file mode 100644 index 000000000..b79d3180b --- /dev/null +++ b/tests/f_unused_itable/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: 19/128 files (0.0% non-contiguous), 165/1000 blocks +Exit status is 0 diff --git a/tests/f_unused_itable/image.gz b/tests/f_unused_itable/image.gz new file mode 100644 index 0000000000000000000000000000000000000000..ca93e987f22683c8984268175ebb4ec469698475 GIT binary patch literal 2310 zc-rlhe>~H99LFc!gFBbek5kR8wn{<~mPkAjuFH?y3e8+6BDN?(EKPr0h$EfOk7Y%c z^PBmZvFXlO-2)-ktf@QAuVJ;UG26cP`QGF1kNf-n>5txjJs;24`~CiWzu(9A`^9AG z>kq}w9ABdwbs;qJ9AZK2Lot=0^7l)9=?p*)^VL(~W-I#v1}HLhgE zkM^a!?a}5=jJGSh=>+$m`bG{ISYjfjmq-ZSmO5ydkbAuQ=;%<@YF-%c{K+m(=LLH- zx^TA$&B#_aZg!1Yy`mav%h^^F(lTtDMjBOMSffnnR&9(Xol-kO8K9kDT@N%0)(?P=83v2`RY>8S0DvdR#bqE5 z28XpA1Ka2T66m0@6`oIobNEDOSQo$=J`KJi@dKcBV5kPL3ih}7fO(}9XM|15{p+OQbx-Z=|R*h68Vth|e9X{{0Lz*pRe9c@P#VluN96sp-l z2%Ab}C^hlv%G*h0P7no(o#yTrcb?@|;HbD&>?+PRN4-Pt9ll3S33rl@@COG%waA?2 zzLk*ynnz@=qL#_{;Y0FU+B-G7uXpd1S}&jogMcdy6QI~iJ+tTOV~K=intf*?h;vwx z&n?m{RErGzIUnSY^LG(NWJ#$|*vxKH|7lR)^P(g7tYfbwj#jscm*H+u&^bX+L4!m# zUmp!UB*&5Q>owlN)&(U%^cq$kBmcM z1_&I`uTv2@(1mtkz?OS4C~xX3qk{4u^bkBZgJqvDhv ztsaZHhm0yGif!_V7-2z`5_L*umtrG75pK`I$uE|xx*vIAb3M(n4w)rmS#~VT{fqa| zS2cPXy(P>unj56^FI;yR7=(2Gek$FP&^i^9qsV6zN8=wlN5xtMbCJy{I~!6`8zM^` zXZzOP z3Pvf-uEa;5mtRpugi0nUu63C2F5QrFm!40qxA9M~-@oNxK(^