Whamcloud - gitweb
tests: add test cases for inode badness
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 13 Apr 2012 07:23:17 +0000 (01:23 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 29 May 2012 08:09:25 +0000 (02:09 -0600)
Signed-off-by: Girish Shilamkar <girish@clusterfs.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
tests/f_ibadness/expect.1 [new file with mode: 0644]
tests/f_ibadness/expect.2 [new file with mode: 0644]
tests/f_ibadness/image.gz [new file with mode: 0644]
tests/f_ibadness/name [new file with mode: 0644]
tests/f_ibadness_bad_extents/expect.1 [new file with mode: 0644]
tests/f_ibadness_bad_extents/expect.2 [new file with mode: 0644]
tests/f_ibadness_bad_extents/image.gz [new file with mode: 0644]
tests/f_ibadness_bad_extents/name [new file with mode: 0644]

diff --git a/tests/f_ibadness/expect.1 b/tests/f_ibadness/expect.1
new file mode 100644 (file)
index 0000000..24b3444
--- /dev/null
@@ -0,0 +1,42 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 13 is in use, but has dtime set.  Fix? yes
+
+Inode 13 has illegal block(s).  Clear? yes
+
+Illegal block #0 (4294967295) in inode 13.  CLEARED.
+Illegal block #1 (4294967295) in inode 13.  CLEARED.
+Illegal block #7 (12345678) in inode 13.  CLEARED.
+Illegal triple indirect block (1234567) in inode 13.  CLEARED.
+Inode 13, i_blocks is 3453453, should be 138.  Fix? yes
+
+Pass 2: Checking directory structure
+i_file_acl for inode 13 (/testfile) is 345, should be zero.
+Clear? yes
+
+i_faddr for inode 13 (/testfile) is 34534, should be zero.
+Clear? yes
+
+Inode 13 is badly corrupt (badness value = 13).  Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences:  -(1368--1369) -1375
+Fix? yes
+
+Free blocks count wrong for group #0 (6822, counted=6825).
+Fix? yes
+
+Free blocks count wrong (14690, counted=14693).
+Fix? yes
+
+Free inodes count wrong for group #0 (2039, counted=2037).
+Fix? yes
+
+Free inodes count wrong (4087, counted=4085).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/4096 files (9.1% non-contiguous), 1691/16384 blocks
+Exit status is 1
diff --git a/tests/f_ibadness/expect.2 b/tests/f_ibadness/expect.2
new file mode 100644 (file)
index 0000000..44d9c79
--- /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: 11/4096 files (0.0% non-contiguous), 1691/16384 blocks
+Exit status is 0
diff --git a/tests/f_ibadness/image.gz b/tests/f_ibadness/image.gz
new file mode 100644 (file)
index 0000000..4c9c22f
Binary files /dev/null and b/tests/f_ibadness/image.gz differ
diff --git a/tests/f_ibadness/name b/tests/f_ibadness/name
new file mode 100644 (file)
index 0000000..bdaceb3
--- /dev/null
@@ -0,0 +1 @@
+Inode with badness over threshold
diff --git a/tests/f_ibadness_bad_extents/expect.1 b/tests/f_ibadness_bad_extents/expect.1
new file mode 100644 (file)
index 0000000..664b3ed
--- /dev/null
@@ -0,0 +1,38 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has an invalid extent
+       (logical block 0, invalid physical block 1231231222, len 492)
+Clear? yes
+
+Inode 12 has an invalid extent
+       (logical block 556, invalid physical block 4294967295, len 45)
+Clear? yes
+
+Inode 12 has an invalid extent
+       (logical block 666, invalid physical block 4294967295, len 5)
+Clear? yes
+
+Inode 12 has an invalid extent
+       (logical block 700, invalid physical block 4294967295, len 45)
+Clear? yes
+
+Inode 12, i_blocks is 984, should be 0.  Fix? yes
+
+Pass 2: Checking directory structure
+Inode 12 is badly corrupt (badness value = 9).  Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences:  -(6145--6636)
+Fix? yes
+
+Free blocks count wrong for group #0 (6525, counted=7017).
+Fix? yes
+
+Free blocks count wrong (14584, counted=15076).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/2048 files (0.0% non-contiguous), 1308/16384 blocks
+Exit status is 1
diff --git a/tests/f_ibadness_bad_extents/expect.2 b/tests/f_ibadness_bad_extents/expect.2
new file mode 100644 (file)
index 0000000..7560785
--- /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: 11/2048 files (0.0% non-contiguous), 1308/16384 blocks
+Exit status is 0
diff --git a/tests/f_ibadness_bad_extents/image.gz b/tests/f_ibadness_bad_extents/image.gz
new file mode 100644 (file)
index 0000000..1c267f0
Binary files /dev/null and b/tests/f_ibadness_bad_extents/image.gz differ
diff --git a/tests/f_ibadness_bad_extents/name b/tests/f_ibadness_bad_extents/name
new file mode 100644 (file)
index 0000000..58bd208
--- /dev/null
@@ -0,0 +1 @@
+All in inode extents corrupt