xref: /aosp_15_r20/external/e2fsprogs/tests/m_mkfs_overhead/script (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard Workertest_description="test bg overhead calculation"
2*6a54128fSAndroid Build Coastguard Worker
3*6a54128fSAndroid Build Coastguard WorkerOUT=$test_name.log
4*6a54128fSAndroid Build Coastguard WorkerEXP=$test_dir/expect
5*6a54128fSAndroid Build Coastguard WorkerFS_SIZE=1024
6*6a54128fSAndroid Build Coastguard WorkerMKE2FS_OPTS="-o hurd -b 1024 -m 0 -g 256 -N 3745"
7*6a54128fSAndroid Build Coastguard Worker
8*6a54128fSAndroid Build Coastguard WorkerMKE2FS_SKIP_PROGRESS=true
9*6a54128fSAndroid Build Coastguard WorkerMKE2FS_SKIP_CHECK_MSG=true
10*6a54128fSAndroid Build Coastguard Workerexport MKE2FS_SKIP_PROGRESS MKE2FS_SKIP_CHECK_MSG
11*6a54128fSAndroid Build Coastguard Worker> $TMPFILE
12*6a54128fSAndroid Build Coastguard Worker
13*6a54128fSAndroid Build Coastguard Worker$MKE2FS -F -o Linux $MKE2FS_OPTS $TMPFILE $FS_SIZE 2>&1 |
14*6a54128fSAndroid Build Coastguard Worker	sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" > $OUT
15*6a54128fSAndroid Build Coastguard Worker
16*6a54128fSAndroid Build Coastguard Workerrm -f $TMPFILE
17*6a54128fSAndroid Build Coastguard Worker
18*6a54128fSAndroid Build Coastguard Workercmp -s $OUT $EXP
19*6a54128fSAndroid Build Coastguard Workerstatus1=$?
20*6a54128fSAndroid Build Coastguard Worker
21*6a54128fSAndroid Build Coastguard Workerif [ "$status1" = 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 "$test_name: $test_description: failed"
26*6a54128fSAndroid Build Coastguard Worker	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
27*6a54128fSAndroid Build Coastguard Workerfi
28*6a54128fSAndroid Build Coastguard Worker
29*6a54128fSAndroid Build Coastguard Workerunset OUT EXP DESCRIPTION FS_SIZE MKE2FS_OPTS MKE2FS_SKIP_PROGRESS
30