| 1 |
FSCK_OPT=-yf |
| 2 |
|
| 3 |
$MKE2FS -q -F -o Linux -I 128 -b 1024 -O mmp $TMPFILE 100 > $test_name.log 2>&1 |
| 4 |
status=$? |
| 5 |
if [ "$status" != 0 ] ; then |
| 6 |
echo "mke2fs -O mmp failed" > $test_name.failed |
| 7 |
echo "$test_name: $test_description: failed" |
| 8 |
return $status |
| 9 |
fi |
| 10 |
|
| 11 |
$TUNE2FS -O project $TMPFILE >> $test_name.log 2>&1 |
| 12 |
status=$? |
| 13 |
if [ "$status" = 0 ] ; then |
| 14 |
echo "'tune2fs -O project' succeeded on small inode" > $test_name.failed |
| 15 |
echo "$test_name: $test_description: failed" |
| 16 |
return 1 |
| 17 |
fi |
| 18 |
$TUNE2FS -o bad_option $TMPFILE >> $test_name.log 2>&1 |
| 19 |
status=$? |
| 20 |
if [ "$status" = 0 ] ; then |
| 21 |
echo "'tune2fs -o bad_option' succeeded" > $test_name.failed |
| 22 |
echo "$test_name: $test_description: failed" |
| 23 |
return 1 |
| 24 |
fi |
| 25 |
$E2MMPSTATUS -i $TMPFILE >> $test_name.log 2>&1 |
| 26 |
$E2MMPSTATUS $TMPFILE >> $test_name.log 2>&1 |
| 27 |
status=$? |
| 28 |
if [ "$status" != 0 ] ; then |
| 29 |
echo "$TUNE2FS left MMP block in bad state" > $test_name.failed |
| 30 |
echo "$test_name: $test_description: failed" |
| 31 |
return $status |
| 32 |
fi |
| 33 |
|
| 34 |
$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1 |
| 35 |
status=$? |
| 36 |
if [ "$status" = 0 ] ; then |
| 37 |
echo "$test_name: $test_description: ok" |
| 38 |
touch $test_name.ok |
| 39 |
else |
| 40 |
echo "e2fsck after MMP disable failed" > $test_name.failed |
| 41 |
echo "$test_name: $test_description: failed" |
| 42 |
return $status |
| 43 |
fi |
| 44 |
rm -f $TMPFILE |