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