Merge branch 'master' of https://github.com/kmcdonell/pcp into kenj-merge
[pcp.git] / qa / 404
blobe43868337af4664b3d7df24819957fc717dfa61b
1 #!/bin/sh
2 # PCP QA Test No. 404
3 # exercise pmUnpackEventRecords() and pmFreeEventResult()
5 # Copyright (c) 2010 Ken McDonell. All Rights Reserved.
8 seq=`basename $0`
9 echo "QA output created by $seq"
11 # get standard environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 status=0 # success is the default!
17 $sudo rm -rf $tmp.* $seq.full
18 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
20 _filter()
22 sed \
23 -e 's/[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9]/TIMESTAMP/g' \
24 -e 's/\[0103070f\.\.\.\]/[0f070301...]/g' \
25 -e '/pmResult dump from/{
26 s/0x[0-9a-f][0-9a-f]*/ADDR/
27 s/amp: .* num/amp: TIMESTAMPS num/
28 }' \
29 | $PCP_AWK_PROG '
30 want == 1 { print " value [blob]"; want = 0; next }
31 $1 == "29.0.135" { want = 1 }
32 { print }'
35 # real QA test starts here
36 src/unpack 2>&1 | _filter
38 # success, all done
39 exit