Merge branch 'master' of git://git.pcp.io/pcp into qt
[pcp.git] / qa / 202
blobc271184312947cb220b17cae74f6918776e1f52f
1 #! /bin/sh
2 # PCP QA Test No. 202
3 # check EOL marker in pmlogmerge
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
16 #debug# tmp=`pwd`/tmp
17 rm -f $tmp.* $seq.full
19 _filter()
21 pmdumplog $1 \
22 | tee -a $seq.full \
23 | $PCP_AWK_PROG '
24 /\<mark\>/ { mark++; next }
25 /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\./ { rec++ }
26 END { printf "%d records",rec
27 if (mark) printf ", and %d marks",mark
28 print ""
30 pmdumplog $1 \
31 | $PCP_AWK_PROG >$1.stamp '
32 /\<mark\>/ { print $1 "-mark"; next }
33 /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\./ { print $1 }'
36 # real QA test starts here
37 rm -f $tmp.A.*
38 echo "log mandatory on 40 msec sample.milliseconds" \
39 | pmlogger -s 4 -l $tmp.log $tmp.A >>$seq.full 2>&1
40 echo
41 echo log.A
42 cat $tmp.log >>$seq.full
43 ls -l $tmp.A.* >>$seq.full
44 pmdumplog -l $tmp.A >>$seq.full
45 _filter $tmp.A
47 rm -f $tmp.B.*
48 echo "log mandatory on 50 msec sample.milliseconds" \
49 | pmlogger -s 6 -l $tmp.log $tmp.B >>$seq.full 2>&1
50 echo
51 echo log.B
52 cat $tmp.log >>$seq.full
53 ls -l $tmp.B.* >>$seq.full
54 pmdumplog -l $tmp.A >>$seq.full
55 _filter $tmp.B
57 rm -f $tmp.C.*
58 pmlogextract $tmp.A $tmp.B $tmp.C
59 echo
60 echo "log.C == pmlogextract log.A log.B"
61 _filter $tmp.C
63 echo
64 echo "mismatch timestamps"
65 cat $tmp.A.stamp $tmp.B.stamp \
66 | comm -3 - $tmp.C.stamp \
67 | sed -e 's/[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9]/timestamp/g'
69 echo
70 echo "pmval [no interpolate] ..."
71 pmval -U $tmp.C sample.milliseconds 2>&1 \
72 | tee -a $seq.full \
73 | $PCP_AWK_PROG '
74 /suspended/ { mark++; next }
75 /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\./ { rec++ }
76 END { printf "%d records",rec
77 if (mark) printf ", and %d marks",mark
78 print ""