Whamcloud - gitweb
e2fsck: add test for ea_inode feature
authorTahsin Erdogan <tahsin@google.com>
Wed, 5 Jul 2017 03:53:59 +0000 (23:53 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 5 Jul 2017 03:53:59 +0000 (23:53 -0400)
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 <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
tests/f_ea_inode/expect.1 [new file with mode: 0644]
tests/f_ea_inode/expect.2 [new file with mode: 0644]
tests/f_ea_inode/image.gz [new file with mode: 0644]

diff --git a/tests/f_ea_inode/expect.1 b/tests/f_ea_inode/expect.1
new file mode 100644 (file)
index 0000000..aaa0bea
--- /dev/null
@@ -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 (file)
index 0000000..f9276fb
--- /dev/null
@@ -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 (file)
index 0000000..68a3975
Binary files /dev/null and b/tests/f_ea_inode/image.gz differ