diff options
Diffstat (limited to 'tests/j_ext_long_revoke_trans')
-rw-r--r-- | tests/j_ext_long_revoke_trans/expect | 91 | ||||
-rw-r--r-- | tests/j_ext_long_revoke_trans/name | 1 | ||||
-rw-r--r-- | tests/j_ext_long_revoke_trans/script | 65 |
3 files changed, 157 insertions, 0 deletions
diff --git a/tests/j_ext_long_revoke_trans/expect b/tests/j_ext_long_revoke_trans/expect new file mode 100644 index 0000000..ed19872 --- /dev/null +++ b/tests/j_ext_long_revoke_trans/expect @@ -0,0 +1,91 @@ +Creating filesystem with 262144 1k blocks and 0 inodes +Superblock backups stored on blocks: + +Zeroing journal device: +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 +Writing superblocks and filesystem accounting information: done + +debugfs add journal device/UUID +debugfs: feature has_journal +Filesystem features: has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super huge_file uninit_bg dir_nlink extra_isize +debugfs: ssv journal_dev 0x9999 +debugfs: ssv journal_uuid 1db3f677-6832-4adb-bafc-8e4059c30a34 +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), 6239/262144 blocks +Exit status is 0 +debugfs write journal +debugfs: logdump -c +Ext2 superblock header found. +Journal starts at block 3, transaction 1 +Found expected sequence 1, type 1 (descriptor block) at block 3 +Found expected sequence 1, type 1 (descriptor block) at block 128 +Found expected sequence 1, type 1 (descriptor block) at block 253 +Found expected sequence 1, type 1 (descriptor block) at block 378 +Found expected sequence 1, type 1 (descriptor block) at block 503 +Found expected sequence 1, type 1 (descriptor block) at block 628 +Found expected sequence 1, type 1 (descriptor block) at block 753 +Found expected sequence 1, type 1 (descriptor block) at block 878 +Found expected sequence 1, type 1 (descriptor block) at block 1003 +Found expected sequence 1, type 1 (descriptor block) at block 1128 +Found expected sequence 1, type 1 (descriptor block) at block 1253 +Found expected sequence 1, type 1 (descriptor block) at block 1378 +Found expected sequence 1, type 1 (descriptor block) at block 1503 +Found expected sequence 1, type 1 (descriptor block) at block 1628 +Found expected sequence 1, type 1 (descriptor block) at block 1753 +Found expected sequence 1, type 1 (descriptor block) at block 1878 +Found expected sequence 1, type 1 (descriptor block) at block 2003 +Found expected sequence 1, type 1 (descriptor block) at block 2128 +Found expected sequence 1, type 1 (descriptor block) at block 2253 +Found expected sequence 1, type 1 (descriptor block) at block 2378 +Found expected sequence 1, type 1 (descriptor block) at block 2503 +Found expected sequence 1, type 1 (descriptor block) at block 2628 +Found expected sequence 1, type 1 (descriptor block) at block 2753 +Found expected sequence 1, type 1 (descriptor block) at block 2878 +Found expected sequence 1, type 1 (descriptor block) at block 3003 +Found expected sequence 1, type 1 (descriptor block) at block 3128 +Found expected sequence 1, type 1 (descriptor block) at block 3253 +Found expected sequence 1, type 1 (descriptor block) at block 3378 +Found expected sequence 1, type 1 (descriptor block) at block 3503 +Found expected sequence 1, type 1 (descriptor block) at block 3628 +Found expected sequence 1, type 1 (descriptor block) at block 3753 +Found expected sequence 1, type 1 (descriptor block) at block 3878 +Found expected sequence 1, type 1 (descriptor block) at block 4003 +Found expected sequence 1, type 1 (descriptor block) at block 4128 +Found expected sequence 1, type 2 (commit block) 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 5 (revoke table) at block 4151 +Found expected sequence 2, type 5 (revoke table) at block 4152 +Found expected sequence 2, type 2 (commit block) at block 4153 +No magic number at block 4154: end of journal. +debugfs fsck +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), 6239/262144 blocks +Exit status is 0 diff --git a/tests/j_ext_long_revoke_trans/name b/tests/j_ext_long_revoke_trans/name new file mode 100644 index 0000000..932a5bd --- /dev/null +++ b/tests/j_ext_long_revoke_trans/name @@ -0,0 +1 @@ +revoke trans nuking free space w/ ext. journal diff --git a/tests/j_ext_long_revoke_trans/script b/tests/j_ext_long_revoke_trans/script new file mode 100644 index 0000000..c99c8f1 --- /dev/null +++ b/tests/j_ext_long_revoke_trans/script @@ -0,0 +1,65 @@ +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 + +JNLFILE=$TMPFILE.jnl + +touch $JNLFILE +$MKE2FS -F -o Linux -b 1024 -O journal_dev -T ext4 -U 1db3f677-6832-4adb-bafc-8e4059c30a34 $JNLFILE 262144 > $OUT.new 2>&1 +$MKE2FS -F -o Linux -b 1024 -O ^has_journal -T ext4 $TMPFILE 262144 >> $OUT.new 2>&1 + +echo "debugfs add journal device/UUID" >> $OUT.new +$DEBUGFS -w -f - $TMPFILE <<-EOF >> $OUT.new 2>&1 + feature has_journal + ssv journal_dev 0x9999 + ssv journal_uuid 1db3f677-6832-4adb-bafc-8e4059c30a34 +EOF + +$FSCK -fy -N test_filesys -j $JNLFILE $TMPFILE >> $OUT.new 2>&1 +status=$? +echo Exit status is $status >> $OUT.new + +echo "debugfs write journal" >> $OUT.new +echo "jo -f $JNLFILE" > $TMPFILE.cmd +echo "jw -b 259-4356 /dev/zero" >> $TMPFILE.cmd +echo "jc" >> $TMPFILE.cmd +echo "jo -f $JNLFILE" >> $TMPFILE.cmd +echo "jw -r 259-4356 /dev/zero" >> $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" +test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$JNLFILE" "$JOURNAL_DUMP_DIR/$test_name.img.jnl" +echo "logdump -c -f $JNLFILE" > $TMPFILE.cmd +$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT.new 2>&1 + +echo "debugfs fsck" >> $OUT.new +$FSCK -fy -N test_filesys -j $JNLFILE $TMPFILE >> $OUT.new 2>&1 +status=$? +echo Exit status is $status >> $OUT.new +sed -f $cmd_dir/filter.sed -e 's/logdump -c -f.*/logdump -c/g' $OUT.new > $OUT +rm -f $TMPFILE $TMPFILE.cmd $JNLFILE $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 JNLFILE |