blob: 02cc12a4280b4ad8002d527c35eeae2309e9e5e0 [file] [log] [blame]
JP Abgralle0ed7402014-03-19 19:08:39 -07001FSCK_OPT=-yf
2
3TMPFILE=$test_name.tmp
4> $TMPFILE
5
6stat -f $TMPFILE | grep -q "Type: tmpfs"
7if [ $? = 0 ] ; then
8 rm -f $TMPFILE
9 echo "$test_name: $test_description: skipped for tmpfs (no O_DIRECT)"
10 return 0
11fi
12
13echo "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
15status=$?
16if [ "$status" != 0 ] ; then
17 echo "mke2fs -O mmp failed" > $test_name.failed
18 echo "$test_name: $test_description: failed"
19 return $status
20fi
21
22# create a corrupted image
23echo "modify the mmp sequence ..." >> $test_name.log
24$DEBUGFS -w -R "set_mmp_value magic 0x12345678" $TMPFILE >> $test_name.log 2>&1
25
26SKIP_GUNZIP=true
27. $cmd_dir/run_e2fsck