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 Workergunzip < $test_dir/image.gz > $TMPFILE 11*6a54128fSAndroid Build Coastguard Worker 12*6a54128fSAndroid Build Coastguard Workerecho "e2fsck external journal" > $OUT.new 13*6a54128fSAndroid Build Coastguard Worker$FSCK -fy -N test_filesys $TMPFILE >> $OUT.new 2>&1 14*6a54128fSAndroid Build Coastguard Workerstatus=$? 15*6a54128fSAndroid Build Coastguard Workerecho Exit status is $status >> $OUT.new 16*6a54128fSAndroid Build Coastguard Worker 17*6a54128fSAndroid Build Coastguard Workerecho "dumpe2fs external journal" >> $OUT.new 18*6a54128fSAndroid Build Coastguard Worker$DUMPE2FS $TMPFILE >> $OUT.new 2>&1 19*6a54128fSAndroid Build Coastguard Workersed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new > $OUT 20*6a54128fSAndroid Build Coastguard Workerrm -f $TMPFILE $OUT.new 21*6a54128fSAndroid Build Coastguard Worker 22*6a54128fSAndroid Build Coastguard Workercmp -s $OUT $EXP 23*6a54128fSAndroid Build Coastguard Workerstatus=$? 24*6a54128fSAndroid Build Coastguard Worker 25*6a54128fSAndroid Build Coastguard Workerif [ "$status" = 0 ] ; then 26*6a54128fSAndroid Build Coastguard Worker echo "$test_name: $test_description: ok" 27*6a54128fSAndroid Build Coastguard Worker touch $test_name.ok 28*6a54128fSAndroid Build Coastguard Workerelse 29*6a54128fSAndroid Build Coastguard Worker echo "$test_name: $test_description: failed" 30*6a54128fSAndroid Build Coastguard Worker diff $DIFF_OPTS $EXP $OUT > $test_name.failed 31*6a54128fSAndroid Build Coastguard Worker rm -f $test_name.tmp 32*6a54128fSAndroid Build Coastguard Workerfi 33*6a54128fSAndroid Build Coastguard Worker 34*6a54128fSAndroid Build Coastguard Workerunset IMAGE FSCK_OPT OUT EXP 35