summaryrefslogtreecommitdiffstats
path: root/tests/j_ext_dumpe2fs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/j_ext_dumpe2fs/expect55
-rw-r--r--tests/j_ext_dumpe2fs/image.gzbin0 -> 2963 bytes
-rw-r--r--tests/j_ext_dumpe2fs/name1
-rw-r--r--tests/j_ext_dumpe2fs/script34
4 files changed, 90 insertions, 0 deletions
diff --git a/tests/j_ext_dumpe2fs/expect b/tests/j_ext_dumpe2fs/expect
new file mode 100644
index 0000000..2838bbd
--- /dev/null
+++ b/tests/j_ext_dumpe2fs/expect
@@ -0,0 +1,55 @@
+e2fsck external journal
+../e2fsck/e2fsck: Filesystem has unsupported feature(s) while trying to open test.img
+
+The superblock could not be read or does not describe a valid ext2/ext3/ext4
+filesystem. If the device is valid and it really contains an ext2/ext3/ext4
+filesystem (and not swap or ufs or something else), then the superblock
+is corrupt, and you might try running e2fsck with an alternate superblock:
+ e2fsck -b 8193 <device>
+ or
+ e2fsck -b 32768 <device>
+
+Exit status is 8
+dumpe2fs external journal
+Filesystem volume name: <none>
+Last mounted on: <not available>
+Filesystem magic number: 0xEF53
+Filesystem revision #: 1 (dynamic)
+Filesystem features: journal_dev metadata_csum
+Default mount options: user_xattr acl block_validity
+Filesystem state: clean
+Errors behavior: Continue
+Filesystem OS type: Linux
+Inode count: 0
+Block count: 2048
+Reserved block count: 0
+Free blocks: 0
+Free inodes: 0
+First block: 1
+Block size: 1024
+Fragment size: 1024
+Blocks per group: 8192
+Fragments per group: 8192
+Inodes per group: 0
+Inode blocks per group: 0
+Mount count: 0
+Check interval: 0 (<none>)
+Reserved blocks uid: 0
+Reserved blocks gid: 0
+First inode: 11
+Inode size: 256
+Required extra isize: 28
+Desired extra isize: 28
+Default directory hash: half_md4
+Checksum type: crc32c
+Journal features: journal_64bit journal_checksum_v3
+Total journal size: 2048k
+Total journal blocks: 2048
+Max transaction length: 2048
+Fast commit length: 0
+Journal first block: 3
+Journal sequence: 0x00000003
+Journal start: 0
+Journal checksum type: crc32c
+Journal checksum: 0x661e816f
+Journal users: 117f752e-f27d-4f6f-a652-072586a29b82
diff --git a/tests/j_ext_dumpe2fs/image.gz b/tests/j_ext_dumpe2fs/image.gz
new file mode 100644
index 0000000..781b591
--- /dev/null
+++ b/tests/j_ext_dumpe2fs/image.gz
Binary files differ
diff --git a/tests/j_ext_dumpe2fs/name b/tests/j_ext_dumpe2fs/name
new file mode 100644
index 0000000..60d276c
--- /dev/null
+++ b/tests/j_ext_dumpe2fs/name
@@ -0,0 +1 @@
+dumpe2fs of external journal device
diff --git a/tests/j_ext_dumpe2fs/script b/tests/j_ext_dumpe2fs/script
new file mode 100644
index 0000000..b7bae59
--- /dev/null
+++ b/tests/j_ext_dumpe2fs/script
@@ -0,0 +1,34 @@
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+ EXP=$test_name.tmp
+ gunzip < $test_dir/expect.gz > $EXP1
+else
+ EXP=$test_dir/expect
+fi
+
+gunzip < $test_dir/image.gz > $TMPFILE
+
+echo "e2fsck external journal" > $OUT.new
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "dumpe2fs external journal" >> $OUT.new
+$DUMPE2FS $TMPFILE >> $OUT.new 2>&1
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $OUT.new
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+ rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP