aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-05-31 20:12:35 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-05-31 20:12:35 -0400
commitbe1b8c6fe8bbb9c78cc3f9d1f963618e7c5823a7 (patch)
tree0ecaaa0a7117e5134323e5c5a1d6075e3356e5e5
parent6d75685e2b76f4099589ad33732cf59f279b5d65 (diff)
downloade2fsprogs-be1b8c6fe8bbb9c78cc3f9d1f963618e7c5823a7.tar.gz
e2fsprogs-be1b8c6fe8bbb9c78cc3f9d1f963618e7c5823a7.tar.xz
e2fsprogs-be1b8c6fe8bbb9c78cc3f9d1f963618e7c5823a7.zip
tests: add new test to validate errno handling in the journal superblock
Add a new regression test f_jnl_errno Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r--tests/f_jnl_errno/expect.048
-rw-r--r--tests/f_jnl_errno/expect.19
-rw-r--r--tests/f_jnl_errno/expect.27
-rw-r--r--tests/f_jnl_errno/image.gzbin0 -> 8822 bytes
-rw-r--r--tests/f_jnl_errno/name1
-rw-r--r--tests/f_jnl_errno/script4
6 files changed, 69 insertions, 0 deletions
diff --git a/tests/f_jnl_errno/expect.0 b/tests/f_jnl_errno/expect.0
new file mode 100644
index 00000000..7dae17d0
--- /dev/null
+++ b/tests/f_jnl_errno/expect.0
@@ -0,0 +1,48 @@
+
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize
+Default mount options: user_xattr acl
+Filesystem state: clean
+Errors behavior: Remount read-only
+Filesystem OS type: Linux
+Inode count: 2048
+Block count: 8192
+Reserved block count: 409
+Free blocks: 6862
+Free inodes: 2037
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Reserved GDT blocks: 31
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 2048
+Inode blocks per group: 256
+Flex block group size: 16
+Mount count: 0
+Check interval: 0 (<none>)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 128
+Journal inode: 8
+Default directory hash: half_md4
+Journal backup: inode blocks
+Journal features: (none)
+Journal size: 1024k
+Journal length: 1024
+Journal sequence: 0x00000005
+Journal start: 0
+
+
+Group 0: (Blocks 1-8191) [ITABLE_ZEROED]
+ Primary superblock at 1, Group descriptors at 2-2
+ Reserved GDT blocks at 3-33
+ Block bitmap at 34 (+33), Inode bitmap at 50 (+49)
+ Inode table at 66-321 (+65)
+ 6862 free blocks, 2037 free inodes, 2 directories, 2037 unused inodes
+ Free blocks: 1330-8191
+ Free inodes: 12-2048
diff --git a/tests/f_jnl_errno/expect.1 b/tests/f_jnl_errno/expect.1
new file mode 100644
index 00000000..c5729512
--- /dev/null
+++ b/tests/f_jnl_errno/expect.1
@@ -0,0 +1,9 @@
+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: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/2048 files (9.1% non-contiguous), 1330/8192 blocks
+Exit status is 1
diff --git a/tests/f_jnl_errno/expect.2 b/tests/f_jnl_errno/expect.2
new file mode 100644
index 00000000..db16a759
--- /dev/null
+++ b/tests/f_jnl_errno/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: 11/2048 files (9.1% non-contiguous), 1330/8192 blocks
+Exit status is 0
diff --git a/tests/f_jnl_errno/image.gz b/tests/f_jnl_errno/image.gz
new file mode 100644
index 00000000..c55c775d
--- /dev/null
+++ b/tests/f_jnl_errno/image.gz
Binary files differ
diff --git a/tests/f_jnl_errno/name b/tests/f_jnl_errno/name
new file mode 100644
index 00000000..e5f64d6d
--- /dev/null
+++ b/tests/f_jnl_errno/name
@@ -0,0 +1 @@
+journal s_errno handling
diff --git a/tests/f_jnl_errno/script b/tests/f_jnl_errno/script
new file mode 100644
index 00000000..dd1ffd6c
--- /dev/null
+++ b/tests/f_jnl_errno/script
@@ -0,0 +1,4 @@
+AFTER_CMD='$DUMPE2FS $TMPFILE 2>&1 | sed -f $cmd_dir/filter_dumpe2fs > $test_name.0.log'
+PASS_ZERO=true
+
+. $cmd_dir/run_e2fsck