docs: tweak formatting in pmrep(1) archive folio example
[pcp.git] / qa / 174
blob6c260640ffebb81a1fede78c1a920066cfe2aaee
1 #! /bin/sh
2 # PCP QA Test No. 174
3 # validate profile cacheing in dbpmda matches that in libpcp
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 environment, filters and checks
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 sampledso=$PCP_PMDAS_DIR/sample/pmda_sample.$DSO_SUFFIX
17 username=`id -u -n`
18 pipeargs=""
19 id pcp >/dev/null 2>&1 && pipeargs="-U $username"
21 _filter()
23 sed \
24 -e '/pmResult/s/ 0x.* numpmid/ ... numpmid/' \
25 -e '/^dbpmda> $/d' \
26 -e "s/ -U $username//g" \
27 -e "s;$sampledso;SAMPLEDSO;g" \
28 -e "s;$PCP_PMDAS_DIR;\$PCP_PMDAS_DIR;g"
31 # filter out GetPDUs and pmResult dumps
32 _filter_stderr()
34 # strange sed's are for endian differences in hex dumps
36 sed \
37 -e 's/ fd=[0-9][0-9]*/ fd=<n>/g' \
38 -e '/pmResult/,/numval: /d' \
39 -e '/ inst /d' \
40 -e '/ value /d' \
41 -e 's/^\[[0-9][0-9]*]/[PID]/' \
42 -e '/^000:/s/ 700\(.\) ......../ 700\1 XPID/' \
43 -e 's/ 1000000 201/ 1 1020000/' \
44 -e 's/ 1000000 6004007/ 1 7400006/' \
45 -e 's/ 1000000 1000000/ 1 1/' \
46 -e 's/ 1000000 2000000/ 1 2/' \
47 -e 's/ c8000000 90010000/ c8 190/' \
48 -e 's/ 0 c8000000/ 0 c8/' \
49 -e 's/ XPID 6004007/ XPID 7400006/' \
50 -e 's/ 1000000 0 2004007/ 1 0 7400002/' \
51 -e '/\(DSO init .*->\)0x[0-9a-f]*()/s//\1VADDR()/' \
52 -e '/DSO init .*->/s/pmda_interface=0x[0-9a-f][0-9a-f]*/pmda_interface=0xXXXX/' \
53 -e '/DSO has domain/s/pmda_interface=[5-9]/pmda_interface=X/' |
54 $PCP_AWK_PROG '
55 /pmGetPDU/ {gotGetPDU=1; next}
56 gotGetPDU==1 && $1 ~ /[0-9][0-9][0-9]:/ { next }
57 {gotGetPDU=0; print}'
60 trap "rm -f $tmp.*; exit" 0 1 2 3 15
62 # real QA test starts here
64 dbpmda -ie <<End-of-File 2>$tmp.stderr | _filter
65 debug 1
66 getdesc on
67 open pipe $PCP_PMDAS_DIR/sample/pmdasample $pipeargs -d 29
68 fetch 29.0.6
69 fetch 29.0.6
70 fetch 29.0.6
71 profile 29.2 none
72 profile 29.2 add 200
73 fetch 29.0.6
74 fetch 29.0.6
75 fetch 29.0.6
76 profile 29.2 add 400
77 fetch 29.0.6
78 fetch 29.0.6
79 fetch 29.0.6
80 open dso $sampledso sample_init 30
81 fetch 30.0.6
82 fetch 30.0.6
83 fetch 30.0.6
84 profile 30.2 none
85 profile 30.2 add 100
86 fetch 30.0.6
87 fetch 30.0.6
88 fetch 30.0.6
89 profile 30.2 add 300
90 fetch 30.0.6
91 fetch 30.0.6
92 fetch 30.0.6
93 End-of-File
95 echo
96 echo "PDUs sent ..."
97 _filter_stderr <$tmp.stderr
100 exit 0