qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 013
blob1ad0a2d7566514409ea3578a3e46c03db58da36b
1 #! /bin/sh
2 # PCP QA Test No. 013
3 # pmdumplog dumps core when fed a metadata file instead of a basename?
5 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard filters
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 _filter_trace()
18 sed \
19 -e '/chkLabel:/d' \
20 -e '/__pmLogChkLabel:/d' \
21 -e '/__pmLogLoadMeta:/d' \
22 -e '/__pmLogSetTime/d' \
23 -e '/__pmLogRead/d'
26 trap "rm -f $tmp.* /tmp/bogus.* /tmp/fungus.* /tmp/fungus /tmp/bogus; exit 0" 0 1 2 3 15
28 # real QA test starts here
29 echo "For PCP 1.1 Expect cannot open archive error message, and no core file ..."
30 echo "For PCP 2.0 -l tmparch/foo.meta is a synonym for -l src/foo, so this works ..."
32 $sudo rm -f /tmp/bogus.* /tmp/fungus.* /tmp/fungus
33 touch /tmp/bogus.verylongsuffix /tmp/fungus
34 for dir in /etc /sbin /bin /usr/sbin /usr/bin
36 [ ! -f $dir/init ] && continue
37 cp $dir/init /tmp/fungus
38 break
39 done
41 for bad in tmparch/foo.meta /tmp/fungus /tmp/bogus
43 echo
44 if [ -f $bad ]
45 then
46 echo "=== $bad: exists ==="
47 else
48 echo "=== $bad: does not exist ==="
50 $sudo rm -f core*
51 pmdumplog -D 128 -l $bad 2>$tmp.err >$tmp.out
53 _filter_pmdumplog <$tmp.out
54 if [ -s $tmp.err ]
55 then
56 # need sort 'cause "inspect file" diag order is not determinisitic
57 echo "[filtered and sorted stderr]"
58 _filter_trace <$tmp.err | LC_COLLATE=POSIX sort
60 _check_core
61 done