From: Theodore Ts'o Date: Wed, 12 May 2010 01:10:12 +0000 (-0400) Subject: tests: Add new test f_unused_itable X-Git-Tag: v1.41.12~20 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=53499e86c509d190579433ade88a810ed86caf0c;p=tools%2Fe2fsprogs.git 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" --- diff --git a/tests/f_unused_itable/expect.1 b/tests/f_unused_itable/expect.1 new file mode 100644 index 0000000..d77e82a --- /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 0000000..b79d318 --- /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 0000000..ca93e98 Binary files /dev/null and b/tests/f_unused_itable/image.gz differ diff --git a/tests/f_unused_itable/name b/tests/f_unused_itable/name new file mode 100644 index 0000000..39b68d6 --- /dev/null +++ b/tests/f_unused_itable/name @@ -0,0 +1 @@ +Invalid bg_unused_itable shouldn't move files to lost+found