summaryrefslogtreecommitdiffstats
path: root/tests/j_recover_csum2_32bit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/j_recover_csum2_32bit')
-rw-r--r--tests/j_recover_csum2_32bit/expect.118
-rw-r--r--tests/j_recover_csum2_32bit/expect.27
-rw-r--r--tests/j_recover_csum2_32bit/image.bz2bin0 -> 3371 bytes
-rw-r--r--tests/j_recover_csum2_32bit/name1
-rwxr-xr-xtests/j_recover_csum2_32bit/script30
5 files changed, 56 insertions, 0 deletions
diff --git a/tests/j_recover_csum2_32bit/expect.1 b/tests/j_recover_csum2_32bit/expect.1
new file mode 100644
index 0000000..fdbda36
--- /dev/null
+++ b/tests/j_recover_csum2_32bit/expect.1
@@ -0,0 +1,18 @@
+test_filesys: recovering journal
+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
+Block bitmap differences: +(1--259) +265 +(274--275) +281 +(290--418) +(1059--1186) +(2211--2352)
+Fix? yes
+
+Inode bitmap differences: +(1--11)
+Fix? yes
+
+Padding at end of inode bitmap is not set. Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/8192 files (0.0% non-contiguous), 7739/131072 blocks
+Exit status is 0
diff --git a/tests/j_recover_csum2_32bit/expect.2 b/tests/j_recover_csum2_32bit/expect.2
new file mode 100644
index 0000000..d223026
--- /dev/null
+++ b/tests/j_recover_csum2_32bit/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/8192 files (0.0% non-contiguous), 7739/131072 blocks
+Exit status is 0
diff --git a/tests/j_recover_csum2_32bit/image.bz2 b/tests/j_recover_csum2_32bit/image.bz2
new file mode 100644
index 0000000..2212edd
--- /dev/null
+++ b/tests/j_recover_csum2_32bit/image.bz2
Binary files differ
diff --git a/tests/j_recover_csum2_32bit/name b/tests/j_recover_csum2_32bit/name
new file mode 100644
index 0000000..6fd378c
--- /dev/null
+++ b/tests/j_recover_csum2_32bit/name
@@ -0,0 +1 @@
+recover 32-bit journal checksum v2
diff --git a/tests/j_recover_csum2_32bit/script b/tests/j_recover_csum2_32bit/script
new file mode 100755
index 0000000..cc736ca
--- /dev/null
+++ b/tests/j_recover_csum2_32bit/script
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+FSCK_OPT=-fy
+IMAGE=$test_dir/image.bz2
+
+bzip2 -d < $IMAGE > $TMPFILE
+
+# Run fsck to fix things?
+EXP1=$test_dir/expect.1
+OUT1=$test_name.1.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT1
+echo "Exit status is $?" >> $OUT1
+
+# Run a second time
+EXP2=$test_dir/expect.2
+OUT2=$test_name.2.log
+
+$FSCK $FSCK_OPT -N test_filesys $TMPFILE 2>&1 | head -n 1000 | tail -n +2 > $OUT2
+echo "Exit status is $?" >> $OUT2
+
+# Figure out what happened
+if cmp -s $EXP1 $OUT1 && cmp -s $EXP2 $OUT2; then
+ echo "$test_name: $test_description: ok"
+ touch $test_name.ok
+else
+ echo "$test_name: $test_description: failed"
+ diff -u $EXP1 $OUT1 >> $test_name.failed
+ diff -u $EXP2 $OUT2 >> $test_name.failed
+fi