1if [ $(uname -s) = "Darwin" ]; then 2 # creates a 4GB filesystem 3 echo "$test_name: $DESCRIPTION: skipped for HFS+ (no sparse files)" 4 return 0 5fi 6 7if ! test -x $DEBUGFS_EXE; then 8 echo "$test_name: $test_description: skipped (no debugfs)" 9 return 0 10fi 11 12FSCK_OPT=-fy 13OUT=$test_name.log 14if [ -f $test_dir/expect.gz ]; then 15 EXP=$test_name.tmp 16 gunzip < $test_dir/expect.gz > $EXP1 17else 18 EXP=$test_dir/expect 19fi 20 21$MKE2FS -F -o Linux -b 4096 -O has_journal -T ext4 $TMPFILE 1048576 > $OUT.new 2>&1 22 23$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1 24status=$? 25echo Exit status is $status >> $OUT.new 26 27echo "dumpe2fs output" >> $OUT.new 28$DUMPE2FS -g $TMPFILE >> $OUT.new 2>&1 29sed -f $cmd_dir/filter.sed $OUT.new > $OUT 30rm -f $TMPFILE $OUT.new 31 32cmp -s $OUT $EXP 33status=$? 34 35if [ "$status" = 0 ] ; then 36 echo "$test_name: $test_description: ok" 37 touch $test_name.ok 38else 39 echo "$test_name: $test_description: failed" 40 diff $DIFF_OPTS $EXP $OUT > $test_name.failed 41 rm -f $test_name.tmp 42fi 43 44unset IMAGE FSCK_OPT OUT EXP 45