1 if ! test -x $DEBUGFS_EXE; then
2 echo "$test_name: $test_description: skipped (no debugfs)"
8 if [ -f $test_dir/expect.gz ]; then
10 gunzip < $test_dir/expect.gz > $EXP1
17 $MKE2FS -F -o Linux -b 4096 -O has_journal -T ext4 $TMPFILE 65536 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT 2>&1
19 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
21 echo Exit status is $status >> $OUT.new
22 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
25 bitmaps="$($DUMPE2FS $TMPFILE 2>&1 | grep 'bitmap at' | sed -e 's/^.*bitmap at \([0-9]*\).*$/\1/g' | tr '\n' ',')"
27 echo "debugfs write journal" >> $OUT
28 echo "jo" > $TMPFILE.cmd
29 echo "jw -b $bitmaps -c /dev/zero" >> $TMPFILE.cmd
30 echo "jc" >> $TMPFILE.cmd
31 $DEBUGFS -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
32 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
35 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
36 echo "logdump -c" > $TMPFILE.cmd
37 $DEBUGFS -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
40 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
42 echo Exit status is $status >> $OUT.new
43 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
51 if [ "$status" = 0 ] ; then
52 echo "$test_name: $test_description: ok"
55 echo "$test_name: $test_description: failed"
56 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
60 unset IMAGE FSCK_OPT OUT EXP