1 FSCK_OPT=-fy 2 OUT=$test_name.log 3 if [ -f $test_dir/expect.gz ]; then 4 EXP=$test_name.tmp 5 gunzip < $test_dir/expect.gz > $EXP1 6 else 7 EXP=$test_dir/expect 8 fi 9 10 cp /dev/null $OUT 11 12 gunzip < $test_dir/image.gz > $TMPFILE 13 14 echo "e2fsck external journal" >> $OUT 15 $FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1 16 status=$? 17 echo Exit status is $status >> $OUT.new 18 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT 19 rm -f $OUT.new 20 21 echo "dumpe2fs external journal" >> $OUT 22 $DUMPE2FS $TMPFILE > $OUT.new 2>&1 23 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT 24 rm -f $OUT.new 25 26 rm -f $TMPFILE 27 28 cmp -s $OUT $EXP 29 status=$? 30 31 if [ "$status" = 0 ] ; then 32 echo "$test_name: $test_description: ok" 33 touch $test_name.ok 34 else 35 echo "$test_name: $test_description: failed" 36 diff $DIFF_OPTS $EXP $OUT > $test_name.failed 37 rm -f $test_name.tmp 38 fi 39 40 unset IMAGE FSCK_OPT OUT EXP 41