1 FSCK_OPT=-yf 2 3 TMPFILE=$test_name.tmp 4 > $TMPFILE 5 6 stat -f $TMPFILE | grep -q "Type: tmpfs" 7 if [ $? = 0 ] ; then 8 rm -f $TMPFILE 9 echo "$test_name: $test_description: skipped for tmpfs (no O_DIRECT)" 10 return 0 11 fi 12 13 echo "make the test image ..." > $test_name.log 14 $MKE2FS -q -F -o Linux -b 4096 -O mmp -E mmp_update_interval=1 $TMPFILE 100 >> $test_name.log 2>&1 15 status=$? 16 if [ "$status" != 0 ] ; then 17 echo "mke2fs -O mmp failed" > $test_name.failed 18 echo "$test_name: $test_description: failed" 19 return $status 20 fi 21 22 # create a corrupted image 23 echo "modify the mmp sequence ..." >> $test_name.log 24 $DEBUGFS -w -R "set_mmp_value magic 0x12345678" $TMPFILE >> $test_name.log 2>&1 25 26 SKIP_GUNZIP=true 27 . $cmd_dir/run_e2fsck 28