pmrep: further zbxsend python3 fixes
[pcp.git] / qa / 901
blob3830a5b14c05b36254ed8dfd33d6e9ef8fcc0774
1 #!/bin/sh
2 # PCP QA Test No. 901
3 # Exercise pmUnpackHighResEventRecords and pmFreeHighResEventResult
5 # Copyright (c) 2014 Red Hat.
6 # Copyright (c) 2010 Ken McDonell. All Rights Reserved.
9 seq=`basename $0`
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
13 . ./common.product
14 . ./common.filter
15 . ./common.check
17 status=1 # failure is the default!
18 $sudo rm -rf $tmp.* $seq.full
19 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
21 _filter()
23 sed \
24 -e 's/[0-2][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/TIMESTAMP/g' \
25 -e 's/\[0103070f\.\.\.\]/[0f070301...]/g' \
26 -e '/pmHighResResult dump from/{
27 s/0x[0-9a-f][0-9a-f]*/ADDR/
28 s/amp: .* num/amp: TIMESTAMPS num/
29 }' \
30 | $PCP_AWK_PROG '
31 want == 1 { print " value [blob]"; want = 0; next }
32 $1 == "29.0.135" { want = 1 }
33 { print }'
36 # real QA test starts here
37 src/hrunpack 2>&1 | _filter
39 # success, all done
40 status=0
41 exit