1 if [ "$IMAGE"x = x ]; then
2 IMAGE=$test_dir/image.gz
5 if [ "$FSCK_OPT"x = x ]; then
9 if [ "$SECOND_FSCK_OPT"x = x ]; then
13 if [ "$OUT1"x = x ]; then
17 if [ "$OUT2"x = x ]; then
21 if [ "$EXP1"x = x ]; then
22 EXP1=$test_dir/expect.1
25 if [ "$EXP2"x = x ]; then
26 EXP2=$test_dir/expect.2
29 gunzip < $IMAGE > $TMPFILE
33 $FSCK $FSCK_OPT -N test_filesys $TMPFILE > $OUT1.new 2>&1
35 echo Exit status is $status >> $OUT1.new
36 sed -e '1d' $OUT1.new > $OUT1
39 if [ "$ONE_PASS_ONLY" != "true" ]; then
40 $FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1
42 echo Exit status is $status >> $OUT2.new
43 sed -e '1d' $OUT2.new > $OUT2
49 if [ "$SKIP_VERIFY" != "true" ] ; then
50 rm -f $test_name.ok $test_name.failed
53 if [ "$ONE_PASS_ONLY" != "true" ]; then
60 if [ "$status1" = 0 -a "$status2" = 0 ] ; then
65 diff -c $EXP1 $OUT1 > $test_name.failed
66 if [ "$ONE_PASS_ONLY" != "true" ]; then
67 diff -c $EXP2 $OUT2 >> $test_name.failed
72 if [ "$SKIP_CLEANUP" != "true" ] ; then
73 unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2 ONE_PASS_ONLY PREP_CMD