qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 203
blob170c00af056b4ae1319e6ec14bbe3644a732ffac
1 #! /bin/sh
2 # PCP QA Test No. 203
3 # pmlogextract, then pmlogextract again (nested mark record processing)
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
15 trap "rm -f $tmp.*; exit" 0 1 2 3 15
17 # real QA test starts here
18 _filter()
20 pmdumplog $1 \
21 | $PCP_AWK_PROG '
22 /<mark>/ { mark++; next }
23 /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\./ { rec++ }
24 END { printf "%d records",rec
25 if (mark) printf ", and %d marks",mark
26 print ""
28 pmdumplog $1 \
29 | $PCP_AWK_PROG >$1.stamp '
30 /<mark>/ { print $1 "-mark"; next }
31 /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\./ { print $1 }'
34 # real QA test starts here
35 rm -f $tmp.A.*
36 echo "log mandatory on 20 msec sample.milliseconds" \
37 | pmlogger -s 4 $tmp.A >/dev/null 2>&1
38 echo
39 echo log.A
40 _filter $tmp.A
42 rm -f $tmp.B.*
43 echo "log mandatory on 25 msec sample.milliseconds" \
44 | pmlogger -s 5 $tmp.B >/dev/null 2>&1
45 echo
46 echo log.B
47 _filter $tmp.B
49 rm -f $tmp.C.*
50 pmlogextract $tmp.A $tmp.B $tmp.C
51 echo
52 echo "log.C == pmlogextract log.A log.B"
53 _filter $tmp.C
55 echo
56 echo "mismatch timestamps"
57 cat $tmp.A.stamp $tmp.B.stamp \
58 | comm -3 - $tmp.C.stamp \
59 | sed -e 's/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9]/timestamp/g'
61 echo
62 echo "pmval [no interpolate] ..."
63 rm -f $seq.full
64 pmval -U $tmp.C sample.milliseconds 2>&1 \
65 | tee $seq.full \
66 | $PCP_AWK_PROG '
67 /suspended/ { mark++; next }
68 /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\./ { rec++ }
69 END { printf "%d records",rec
70 if (mark) printf ", and %d marks",mark
71 print ""
74 rm -f $tmp.D.*
75 echo "log mandatory on 20 msec sample.milliseconds" \
76 | pmlogger -s 6 $tmp.D >/dev/null 2>&1
77 echo
78 echo log.D
79 _filter $tmp.D
81 rm -f $tmp.E.*
82 pmlogextract $tmp.C $tmp.D $tmp.E
83 echo
84 echo "log.E == pmlogextract log.C log.D"
85 _filter $tmp.E
87 echo
88 echo "mismatch timestamps"
89 cat $tmp.C.stamp $tmp.D.stamp \
90 | comm -3 - $tmp.E.stamp \
91 | sed -e 's/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9]/timestamp/g'
93 echo
94 echo "pmval [no interpolate] ..."
95 pmval -U $tmp.E sample.milliseconds 2>&1 \
96 | tee -a $seq.full \
97 | $PCP_AWK_PROG '
98 /suspended/ { mark++; next }
99 /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\./ { rec++ }
100 END { printf "%d records",rec
101 if (mark) printf ", and %d marks",mark
102 print ""