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