1 if test -x $DEBUGFS_EXE; then
5 if [ -f $test_dir/expect.gz ]; then
7 gunzip < $test_dir/expect.gz > $EXP1
14 $MKE2FS -F -o Linux -b 1024 -O has_journal -T ext4 $TMPFILE 262144 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT 2>&1
16 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
18 echo Exit status is $status >> $OUT.new
19 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
22 echo "debugfs write journal" >> $OUT
23 echo "jo" > $TMPFILE.cmd
24 echo "jw -b 259-4356 /dev/zero" >> $TMPFILE.cmd
25 echo "jc" >> $TMPFILE.cmd
26 $DEBUGFS_EXE -w -f $TMPFILE.cmd $TMPFILE 2>> $OUT.new > /dev/null
27 sed -f $cmd_dir/filter.sed < $OUT.new >> $OUT
30 test -d "$JOURNAL_DUMP_DIR" -a -w "$JOURNAL_DUMP_DIR" && cp "$TMPFILE" "$JOURNAL_DUMP_DIR/$test_name.img"
31 echo "logdump -c" > $TMPFILE.cmd
32 $DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
35 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
37 echo Exit status is $status >> $OUT.new
38 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
46 if [ "$status" = 0 ] ; then
47 echo "$test_name: $test_description: ok"
50 echo "$test_name: $test_description: failed"
51 diff $DIFF_OPTS $EXP $OUT > $test_name.failed
55 unset IMAGE FSCK_OPT OUT EXP
57 else #if test -x $DEBUGFS_EXE; then
58 echo "$test_name: $test_description: skipped"