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