3 # check dbpmda does the right thing when contexts are opened and
6 # Copyright (c) 2010 Ken McDonell. All Rights Reserved.
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
18 if [ $PCP_VER -lt 30600 ]
20 ln $seq.out
.1 $seq.out
22 ln $seq.out
.2 $seq.out
25 status
=0 # success is the default!
27 $sudo rm -rf $tmp.
* $seq.full
28 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
33 -e "s;$PCP_VAR_DIR;\$PCP_VAR_DIR;g" \
34 -e 's/\.'"$DSO_SUFFIX"'/.$DSO_SUFFIX/g' \
36 -e 's/[A-Z][a-z][a-z] [A-Z][a-z][a-z] *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9]$/DATE/' \
37 -e "s/`hostname`/LOCALHOST/" \
38 -e "s/ -U $username//g" \
39 -e '/pmResult/s/ from .*/ .../' \
40 -e 's/\(value.*\) 0x[0-9a-f][0-9a-f]*/\1/' \
41 -e 's/\(value.*\) [0-9][0-9]*\.[0-9]*e[-+][0-9][0-9]*/\1/' \
45 # real QA test starts here
46 pipeargs
="-d 29 -D appl1"
47 id pcp
>/dev
/null
2>&1 && pipeargs
="$pipeargs -U $username"
50 'fetch sample.percontext.pdu;close' \
51 'fetch sample.percontext.pdu;quit' \
52 'fetch sample.percontext.pdu;exit' \
53 'fetch sample.percontext.pdu' \
54 'fetch sample.percontext.pdu;fetch sample.percontext.pdu;fetch sample.percontext.pdu' \
57 echo "open pipe $PCP_VAR_DIR/pmdas/sample/pmdasample $pipeargs -l $tmp.log" >$tmp.cmd
58 echo "$cmds" |
tr ';' '\012' >>$tmp.cmd
60 dbpmda
-ei <$tmp.cmd
2>&1 | _filter
61 # let daemon PMDA exit and flush stdio buffer to $tmp.log
66 echo "open dso $PCP_VAR_DIR/pmdas/sample/pmda_sample.$DSO_SUFFIX sample_init 30" >$tmp.cmd
67 echo "$cmds" |
tr ';' '\012' >>$tmp.cmd
68 dbpmda
-D appl1
-ei <$tmp.cmd
2>&1 | _filter \