1 # use current directory instead of /tmp becase tmpfs doesn't support DIO 2 rm -f $TMPFILE 3 TMPFILE=$(mktemp ./tmp-$test_name.XXXXXX) 4 5 stat -f $TMPFILE | grep -q "Type: tmpfs" 6 if [ $? = 0 ]; then 7 rm -f $TMPFILE 8 echo "$test_name: $test_description: skipped for tmpfs (no O_DIRECT)" 9 return 0 10 fi 11 12 $MKE2FS -q -F -o Linux -b 4096 -O mmp -E mmp_update_interval=1 $TMPFILE 100 >> $test_name.log 2>&1 13 status=$? 14 if [ "$status" != 0 ] ; then 15 echo "mke2fs -O mmp failed" > $test_name.failed 16 echo "$test_name: $test_description: failed" 17 return $status 18 fi 19 20 if test -x $E2IMAGE_EXE; then 21 22 ONE_PASS_ONLY=true 23 FSCK_OPT="-n -f" 24 IMAGE=$TMPFILE 25 SKIP_GUNZIP=true 26 PREP_CMD="$E2IMAGE_EXE -r $TMPFILE $TMPFILE.raw; \ 27 mv $TMPFILE.raw $TMPFILE" 28 29 . $cmd_dir/run_e2fsck 30 31 else 32 echo "$test_name: $test_description: skipped" 33 fi 34