1 if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then 2 3 IMAGE=$test_dir/image.gz 4 FSCK_OPT=-yf 5 OUT=$test_name.log 6 EXP=$test_dir/expect 7 8 gunzip < $IMAGE > $TMPFILE 9 10 echo "resize2fs test" > $OUT 11 12 echo "resize2fs -M test.img" >> $OUT 13 $RESIZE2FS -M $TMPFILE 2>&1 >> $OUT.new 2>&1 14 status=$? 15 echo Exit status is $status >> $OUT.new 16 17 echo " " >> $OUT.new 18 echo fsck $FSCK_OPT -N test_filesys test.img >> $OUT.new 19 $FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1 20 echo Exit status is $status >> $OUT.new 21 22 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT 23 rm $TMPFILE $OUT.new 24 25 # 26 # Do the verification 27 # 28 29 cmp -s $OUT $EXP 30 status=$? 31 32 if [ "$status" = 0 ] ; then 33 echo "$test_name: $test_description: ok" 34 touch $test_name.ok 35 else 36 echo "$test_name: $test_description: failed" 37 diff $DIFF_OPTS $EXP $OUT > $test_name.failed 38 fi 39 40 unset IMAGE FSCK_OPT OUT EXP 41 42 else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then 43 echo "$test_name: $test_description: skipped" 44 fi 45 46