1if test -x $DEBUGFS_EXE; then 2 3IMAGE=$test_dir/image.gz 4FSCK_OPT=-fy 5OUT=$test_name.log 6if [ -f $test_dir/expect.gz ]; then 7 EXP=$test_name.tmp 8 gunzip < $test_dir/expect.gz > $EXP1 9else 10 EXP=$test_dir/expect 11fi 12 13cp /dev/null $OUT 14 15gzip -d < $IMAGE > $TMPFILE 16 17$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1 18status=$? 19echo Exit status is $status >> $OUT.new 20sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT 21rm -f $OUT.new 22 23$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1 24status=$? 25echo Exit status is $status >> $OUT.new 26sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT 27rm -f $OUT.new 28 29echo "cat /a" > $TMPFILE.cmd 30echo >> $TMPFILE.cmd 31$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT 32echo >> $OUT 33rm -f $TMPFILE.cmd 34 35rm -f $TMPFILE 36 37cmp -s $OUT $EXP 38status=$? 39 40if [ "$status" = 0 ] ; then 41 echo "$test_name: $test_description: ok" 42 touch $test_name.ok 43else 44 echo "$test_name: $test_description: failed" 45 diff $DIFF_OPTS $EXP $OUT > $test_name.failed 46 rm -f $test_name.tmp 47fi 48 49unset IMAGE FSCK_OPT OUT EXP 50 51else #if test -x $DEBUGFS_EXE; then 52 echo "$test_name: $test_description: skipped" 53fi 54