pmrep: update TODO, man page
[pcp.git] / qa / 285
blob5371347433dec0c5cc0440e8076e359528f5b40e
1 #! /bin/sh
2 # PCP QA Test No. 285
4 # Plan:
5 # 1. to show that the indom result for instance requests for
6 # pmLookupInDom and pmNameInDom calls should NOT be different
7 # for DSOs versus daemon agents.
8 # 2. to verify that opening a dso and then connecting to a daemon
9 # is viable.
10 # Note: qa/147 tests out doing a daemon and then a dso
12 # Method:
13 # 1. use dbpmda with the sampledso and sample daemon with appropriate
14 # instance requests
16 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
19 seq=`basename $0`
20 echo "QA output created by $seq"
22 # get standard filters
23 . ./common.product
24 . ./common.filter
25 . ./common.check
27 if [ $PCP_PLATFORM = irix ]
28 then
29 BINFMT=`/usr/pcp/bin/pmobjstyle`
30 sampledso=/var/pcp/lib/$BINFMT.pmda_sample.so
31 else
32 sampledso=$PCP_PMDAS_DIR/sample/pmda_sample.$DSO_SUFFIX
35 status=1 # failure is the default!
36 username=`id -u -n`
37 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
39 _filter()
41 sed \
42 -e '/^dbpmda> $/d' \
43 -e "s/ -U $username//g" \
44 -e "s;$sampledso;SAMPLEDSO;g" \
45 -e "s;$PCP_PMDAS_DIR;\$PCP_PMDAS_DIR;g"
48 pipeargs=""
49 id pcp >/dev/null 2>&1 && pipeargs="-U $username"
51 # real QA test starts here
53 # part 1.
55 echo "=== dso and daemon handle indom ops the same way? ==="
56 echo
57 dbpmda -ie <<EOF 2>&1 | _filter | tee $tmp.dso
58 open dso $sampledso sample_init 30
59 instance 30.1
60 instance 30.1 0
61 instance 30.1 "red"
62 EOF
64 echo
65 dbpmda -ie <<EOF 2>&1 | _filter | tee $tmp.daemon
66 open pipe $PCP_PMDAS_DIR/sample/pmdasample $pipeargs -d 30
67 instance 30.1
68 instance 30.1 0
69 instance 30.1 "red"
70 EOF
72 echo
73 echo "Differences ... expect none after the \"open\" processing"
74 diff $tmp.dso $tmp.daemon
76 # part 2.
78 echo
79 echo "=== IPC-PDU version botch for second PMDA? ==="
80 dbpmda -ie <<EOF 2>&1 | _filter
81 open dso $sampledso sample_init 30
82 open pipe $PCP_PMDAS_DIR/sample/pmdasample $pipeargs -d 29
83 EOF
85 # success, all done
86 status=0
87 exit