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