xref: /aosp_15_r20/external/e2fsprogs/tests/t_mmp_2off/script (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard WorkerFSCK_OPT=-yf
2*6a54128fSAndroid Build Coastguard Worker
3*6a54128fSAndroid Build Coastguard Worker$MKE2FS -q -F -o Linux -b 4096 -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 ^mmp $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 ^mmp failed" > $test_name.failed
15*6a54128fSAndroid Build Coastguard Worker	echo "$test_name: $test_description: failed"
16*6a54128fSAndroid Build Coastguard Worker	return $status
17*6a54128fSAndroid Build Coastguard Workerfi
18*6a54128fSAndroid Build Coastguard Worker
19*6a54128fSAndroid Build Coastguard Worker$FSCK $FSCK_OPT $TMPFILE >> $test_name.log 2>&1
20*6a54128fSAndroid Build Coastguard Workerstatus=$?
21*6a54128fSAndroid Build Coastguard Workerif [ "$status" = 0 ] ; then
22*6a54128fSAndroid Build Coastguard Worker	echo "$test_name: $test_description: ok"
23*6a54128fSAndroid Build Coastguard Worker	touch $test_name.ok
24*6a54128fSAndroid Build Coastguard Workerelse
25*6a54128fSAndroid Build Coastguard Worker	echo "e2fsck after MMP disable failed" > $test_name.failed
26*6a54128fSAndroid Build Coastguard Worker	echo "$test_name: $test_description: failed"
27*6a54128fSAndroid Build Coastguard Worker	return $status
28*6a54128fSAndroid Build Coastguard Workerfi
29*6a54128fSAndroid Build Coastguard Workerrm -f $TMPFILE
30