Whamcloud - gitweb
tests: use make rules to run tests in parallel
[tools/e2fsprogs.git] / tests / t_mmp_2off / script
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 $MKE2FS -q -F -o Linux -b 4096 -O mmp $TMPFILE 100 > $test_name.log 2>&1
14 status=$?
15 if [ "$status" != 0 ] ; then
16         echo "mke2fs -O mmp failed" > $test_name.failed
17         echo "$test_name: $test_description: failed"
18         return $status
19 fi
20
21 $TUNE2FS -O ^mmp $TMPFILE > $test_name.log 2>&1
22 status=$?
23 if [ "$status" != 0 ] ; then
24         echo "tune2fs -O ^mmp failed" > $test_name.failed
25         echo "$test_name: $test_description: failed"
26         return $status
27 fi
28
29 $FSCK $FSCK_OPT $TMPFILE > $test_name.log 2>&1
30 status=$?
31 if [ "$status" = 0 ] ; then
32         echo "$test_name: $test_description: ok"
33         touch $test_name.ok
34 else
35         echo "e2fsck after MMP disable failed" > $test_name.failed
36         echo "$test_name: $test_description: failed"
37         return $status
38 fi
39 rm -f $TMPFILE