1if ! test -x $DEBUGFS_EXE; then 2 echo "$test_name: $test_description: skipped (no debugfs)" 3 return 0 4fi 5 6OUT=$test_name.log 7EXP=$test_dir/expect 8VERIFY_FSCK_OPT=-yf 9 10ZIMAGE=$test_dir/image.gz 11gzip -d < $ZIMAGE > $TMPFILE 12 13echo "*** long file" > $OUT 14$DEBUGFS -R 'stat /file' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 15echo "*** short file" >> $OUT 16$DEBUGFS -R 'stat /shortfile' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 17echo >> $OUT 18 19echo "*** long dir" >> $OUT 20$DEBUGFS -R 'stat /dir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 21echo "*** short dir" >> $OUT 22$DEBUGFS -R 'stat /shortdir' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 23echo >> $OUT 24 25echo "*** long link" >> $OUT 26$DEBUGFS -R 'stat /link' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 27echo "*** short link" >> $OUT 28$DEBUGFS -R 'stat /shortlink' $TMPFILE 2>&1 | $CLEAN_OUTPUT >> $OUT 2>&1 29 30echo "*** end test" >> $OUT 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 41fi 42 43unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA ZIMAGE 44