xref: /aosp_15_r20/external/e2fsprogs/tests/m_mcsum_extjournal/script (revision 6a54128f25917bfc36a8a6e9d722c04a0b4641b6)
1*6a54128fSAndroid Build Coastguard WorkerFSCK_OPT=-fy
2*6a54128fSAndroid Build Coastguard WorkerOUT=$test_name.log
3*6a54128fSAndroid Build Coastguard Workerif [ -f $test_dir/expect.gz ]; then
4*6a54128fSAndroid Build Coastguard Worker	EXP=$test_name.tmp
5*6a54128fSAndroid Build Coastguard Worker	gunzip < $test_dir/expect.gz > $EXP1
6*6a54128fSAndroid Build Coastguard Workerelse
7*6a54128fSAndroid Build Coastguard Worker	EXP=$test_dir/expect
8*6a54128fSAndroid Build Coastguard Workerfi
9*6a54128fSAndroid Build Coastguard Worker
10*6a54128fSAndroid Build Coastguard Worker$MKE2FS -F -o Linux -b 1024 -O journal_dev,metadata_csum -T ext4 $TMPFILE 4096 2>&1 | sed -f $cmd_dir/filter.sed > $OUT
11*6a54128fSAndroid Build Coastguard Worker$DUMPE2FS -h $TMPFILE 2>&1 | grep 'Filesystem features:' >> $OUT
12*6a54128fSAndroid Build Coastguard Worker
13*6a54128fSAndroid Build Coastguard Workerrm -f $TMPFILE
14*6a54128fSAndroid Build Coastguard Worker
15*6a54128fSAndroid Build Coastguard Workercmp -s $OUT $EXP
16*6a54128fSAndroid Build Coastguard Workerstatus=$?
17*6a54128fSAndroid Build Coastguard Worker
18*6a54128fSAndroid Build Coastguard Workerif [ "$status" = 0 ] ; then
19*6a54128fSAndroid Build Coastguard Worker	echo "$test_name: $test_description: ok"
20*6a54128fSAndroid Build Coastguard Worker	touch $test_name.ok
21*6a54128fSAndroid Build Coastguard Workerelse
22*6a54128fSAndroid Build Coastguard Worker	echo "$test_name: $test_description: failed"
23*6a54128fSAndroid Build Coastguard Worker	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
24*6a54128fSAndroid Build Coastguard Worker	rm -f $test_name.tmp
25*6a54128fSAndroid Build Coastguard Workerfi
26*6a54128fSAndroid Build Coastguard Worker
27*6a54128fSAndroid Build Coastguard Workerunset IMAGE FSCK_OPT OUT EXP
28