summaryrefslogtreecommitdiffstats
path: root/tests/j_long_revoke_trans
diff options
context:
space:
mode:
Diffstat (limited to 'tests/j_long_revoke_trans')
-rw-r--r--tests/j_long_revoke_trans/expect81
-rw-r--r--tests/j_long_revoke_trans/name1
-rw-r--r--tests/j_long_revoke_trans/script52
3 files changed, 134 insertions, 0 deletions
diff --git a/tests/j_long_revoke_trans/expect b/tests/j_long_revoke_trans/expect
new file mode 100644
index 0000000..c0730e6
--- /dev/null
+++ b/tests/j_long_revoke_trans/expect
@@ -0,0 +1,81 @@
+Creating filesystem with 262144 1k blocks and 16384 inodes
+Superblock backups stored on blocks:
+ 8193, 24577, 40961, 57345, 73729, 204801, 221185
+
+Allocating group tables: done
+Writing inode tables: done
+Creating journal (8192 blocks): done
+Writing superblocks and filesystem accounting information: done
+
+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/16384 files (0.0% non-contiguous), 14431/262144 blocks
+Exit status is 0
+debugfs write journal
+debugfs: logdump -c
+Journal starts at block 1, transaction 1
+Found expected sequence 1, type 1 (descriptor block) at block 1
+Found expected sequence 1, type 1 (descriptor block) at block 126
+Found expected sequence 1, type 1 (descriptor block) at block 251
+Found expected sequence 1, type 1 (descriptor block) at block 376
+Found expected sequence 1, type 1 (descriptor block) at block 501
+Found expected sequence 1, type 1 (descriptor block) at block 626
+Found expected sequence 1, type 1 (descriptor block) at block 751
+Found expected sequence 1, type 1 (descriptor block) at block 876
+Found expected sequence 1, type 1 (descriptor block) at block 1001
+Found expected sequence 1, type 1 (descriptor block) at block 1126
+Found expected sequence 1, type 1 (descriptor block) at block 1251
+Found expected sequence 1, type 1 (descriptor block) at block 1376
+Found expected sequence 1, type 1 (descriptor block) at block 1501
+Found expected sequence 1, type 1 (descriptor block) at block 1626
+Found expected sequence 1, type 1 (descriptor block) at block 1751
+Found expected sequence 1, type 1 (descriptor block) at block 1876
+Found expected sequence 1, type 1 (descriptor block) at block 2001
+Found expected sequence 1, type 1 (descriptor block) at block 2126
+Found expected sequence 1, type 1 (descriptor block) at block 2251
+Found expected sequence 1, type 1 (descriptor block) at block 2376
+Found expected sequence 1, type 1 (descriptor block) at block 2501
+Found expected sequence 1, type 1 (descriptor block) at block 2626
+Found expected sequence 1, type 1 (descriptor block) at block 2751
+Found expected sequence 1, type 1 (descriptor block) at block 2876
+Found expected sequence 1, type 1 (descriptor block) at block 3001
+Found expected sequence 1, type 1 (descriptor block) at block 3126
+Found expected sequence 1, type 1 (descriptor block) at block 3251
+Found expected sequence 1, type 1 (descriptor block) at block 3376
+Found expected sequence 1, type 1 (descriptor block) at block 3501
+Found expected sequence 1, type 1 (descriptor block) at block 3626
+Found expected sequence 1, type 1 (descriptor block) at block 3751
+Found expected sequence 1, type 1 (descriptor block) at block 3876
+Found expected sequence 1, type 1 (descriptor block) at block 4001
+Found expected sequence 1, type 1 (descriptor block) at block 4126
+Found expected sequence 1, type 2 (commit block) at block 4133
+Found expected sequence 2, type 5 (revoke table) at block 4134
+Found expected sequence 2, type 5 (revoke table) at block 4135
+Found expected sequence 2, type 5 (revoke table) at block 4136
+Found expected sequence 2, type 5 (revoke table) at block 4137
+Found expected sequence 2, type 5 (revoke table) at block 4138
+Found expected sequence 2, type 5 (revoke table) at block 4139
+Found expected sequence 2, type 5 (revoke table) at block 4140
+Found expected sequence 2, type 5 (revoke table) at block 4141
+Found expected sequence 2, type 5 (revoke table) at block 4142
+Found expected sequence 2, type 5 (revoke table) at block 4143
+Found expected sequence 2, type 5 (revoke table) at block 4144
+Found expected sequence 2, type 5 (revoke table) at block 4145
+Found expected sequence 2, type 5 (revoke table) at block 4146
+Found expected sequence 2, type 5 (revoke table) at block 4147
+Found expected sequence 2, type 5 (revoke table) at block 4148
+Found expected sequence 2, type 5 (revoke table) at block 4149
+Found expected sequence 2, type 5 (revoke table) at block 4150
+Found expected sequence 2, type 2 (commit block) at block 4151
+No magic number at block 4152: end of journal.
+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
+test_filesys: 11/16384 files (0.0% non-contiguous), 14431/262144 blocks
+Exit status is 0
diff --git a/tests/j_long_revoke_trans/name b/tests/j_long_revoke_trans/name
new file mode 100644
index 0000000..3cbb2cd
--- /dev/null
+++ b/tests/j_long_revoke_trans/name
@@ -0,0 +1 @@
+revoked transaction nuking free space
diff --git a/tests/j_long_revoke_trans/script b/tests/j_long_revoke_trans/script
new file mode 100644
index 0000000..d59578d
--- /dev/null
+++ b/tests/j_long_revoke_trans/script
@@ -0,0 +1,52 @@
+if ! test -x $DEBUGFS_EXE; then
+ echo "$test_name: $test_description: skipped (no debugfs)"
+ return 0
+fi
+
+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
+
+$MKE2FS -F -o Linux -b 1024 -O has_journal -T ext4 $TMPFILE 262144 > $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+
+echo "debugfs write journal" >> $OUT.new
+echo "jo" > $TMPFILE.cmd
+echo "jw -b 259-4356 /dev/zero" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+echo "jo" >> $TMPFILE.cmd
+echo "jw -r 259-4356" >> $TMPFILE.cmd
+echo "jc" >> $TMPFILE.cmd
+$DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
+
+test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
+echo "logdump -c" > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1
+
+$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT
+rm -f $TMPFILE $TMPFILE.cmd $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