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