From: Tahsin Erdogan Date: Wed, 5 Jul 2017 03:53:59 +0000 (-0400) Subject: e2fsck: add test for ea_inode feature X-Git-Tag: v1.44.0-rc1~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76d1914303275912d70dd4f01fff1cc552a244f8;p=thirdparty%2Fe2fsprogs.git e2fsck: add test for ea_inode feature f_ea_inode test covers the following scenarios: - a file that contains old Lustre-style valid ea_inode references in inode body and xattr block - a file that contains new style valid ea_inode references in inode body and xattr block - a file with an extended attribute that references an invalid inode number (e_value_inum > s_inodes_count) - an ea entry with bad e_hash and points to an inode that does not have EA_INODE flag set - an ea entry with bad e_hash but points to a valid ea_inode - an ea entry with valid e_hash that points to an inode that is missing EA_INODE flag Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o --- diff --git a/tests/f_ea_inode/expect.1 b/tests/f_ea_inode/expect.1 new file mode 100644 index 000000000..aaa0bead9 --- /dev/null +++ b/tests/f_ea_inode/expect.1 @@ -0,0 +1,31 @@ +Pass 1: Checking inodes, blocks, and sizes +Inode 17 has illegal extended attribute value inode 4008636142. +Clear? yes + +Inode 17, i_blocks is 8, should be 0. Fix? yes + +Inode 18 has illegal extended attribute value inode 19. +Clear? yes + +Inode 18, i_blocks is 8, should be 0. Fix? yes + +Extended attribute in inode 20 has a hash (1145324612) which is invalid +Clear? yes + +Inode 20, i_blocks is 8, should be 0. Fix? yes + +EA inode 19 for parent inode 21 missing EA_INODE flag. + Fix? yes + +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Extended attribute inode 16 ref count is 51, should be 2. Fix? yes + +Extended attribute inode 19 ref count is 2, should be 1. Fix? yes + +Pass 5: Checking group summary information + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 21/32 files (0.0% non-contiguous), 18/64 blocks +Exit status is 1 diff --git a/tests/f_ea_inode/expect.2 b/tests/f_ea_inode/expect.2 new file mode 100644 index 000000000..f9276fba3 --- /dev/null +++ b/tests/f_ea_inode/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: 21/32 files (0.0% non-contiguous), 18/64 blocks +Exit status is 0 diff --git a/tests/f_ea_inode/image.gz b/tests/f_ea_inode/image.gz new file mode 100644 index 000000000..68a397580 Binary files /dev/null and b/tests/f_ea_inode/image.gz differ