]>
Commit | Line | Data |
---|---|---|
a8a1ee12 DW |
1 | # use current directory instead of /tmp becase tmpfs doesn't support DIO |
2 | rm -f $TMPFILE | |
3 | TMPFILE=$(mktemp ./tmp-$test_name.XXXXXX) | |
4 | ||
5 | stat -f $TMPFILE | grep -q "Type: tmpfs" | |
6 | if [ $? = 0 ]; then | |
7 | rm -f $TMPFILE | |
8 | echo "$test_name: $test_description: skipped for tmpfs (no O_DIRECT)" | |
9 | return 0 | |
10 | fi | |
11 | gzip -dc < $test_dir/image.gz > $TMPFILE | |
12 | ||
63a801de | 13 | OUT=$test_name.log |
a8a1ee12 DW |
14 | EXP=$test_dir/expect |
15 | $FSCK -fy $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed > $OUT | |
16 | echo Exit status is $? >> $OUT | |
17 | ||
18 | rm -f $TMPFILE | |
19 | cmp -s $OUT $EXP | |
20 | status=$? | |
21 | ||
22 | if [ "$status" = 0 ] ; then | |
23 | echo "$test_name: $test_description: ok" | |
24 | touch $test_name.ok | |
25 | else | |
26 | echo "$test_name: $test_description: failed" | |
27 | diff $DIFF_OPTS $EXP $OUT > $test_name.failed | |
28 | rm -f $test_name.tmp | |
29 | fi | |
30 | unset OUT EXP |