1 if ! test -x $DEBUGFS_EXE; then 2 echo "$test_name: $test_description: skipped" 3 exit 0 4 fi 5 6 OUT=$test_name.log 7 EXP=$test_dir/expect 8 VERIFY_FSCK_OPT=-yf 9 10 ZIMAGE=$test_dir/image.gz 11 gzip -d < $ZIMAGE > $TMPFILE 12 13 echo "*** long file" > $OUT 14 $DEBUGFS -R 'stat /file' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 15 echo "*** short file" >> $OUT 16 $DEBUGFS -R 'stat /shortfile' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 17 echo >> $OUT 18 19 echo "*** long dir" >> $OUT 20 $DEBUGFS -R 'stat /dir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 21 echo "*** short dir" >> $OUT 22 $DEBUGFS -R 'stat /shortdir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 23 echo >> $OUT 24 25 echo "*** long link" >> $OUT 26 $DEBUGFS -R 'stat /link' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 27 echo "*** short link" >> $OUT 28 $DEBUGFS -R 'stat /shortlink' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 29 30 echo "*** end test" >> $OUT 31 32 cmp -s $OUT $EXP 33 status=$? 34 35 if [ "$status" = 0 ] ; then 36 echo "$test_name: $test_description: ok" 37 touch $test_name.ok 38 else 39 echo "$test_name: $test_description: failed" 40 diff $DIFF_OPTS $EXP $OUT > $test_name.failed 41 fi 42 43 unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA ZIMAGE 44