3 # exercise PCP dbpmda interface
5 # Copyright (c) 2013 Red Hat.
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
19 linux|solaris|freebsd
)
20 PMDADSO
=$PCP_PMDAS_DIR/sample
/pmda_sample.so
23 PMDADSO
=$PCP_PMDAS_DIR/sample
/pmda_sample.dylib
26 echo "Arrgh ... need DSO name customization for $PCP_PLATFORM"
31 status
=1 # failure is the default!
32 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
37 -e "s;$PMDADSO;PMDADSO;" \
38 -e "s;$PCP_PMDAS_DIR;\$PCP_PMDAS_DIR;" \
39 -e 's;pcp/lib/mips_[^.]*\.;pcp/lib/ISA.;' \
40 -e 's/parse error/Syntax error/' \
41 -e 's/syntax error/Syntax error/' \
43 -e '/pmResult/s/0x[^ ]*/ADDR/g' \
44 -e '/DSO Interface Version: /s/[5-9]/N/g' \
45 -e 's/[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]/TIMEZONE/g' \
46 -e 's/Permission denied/No permission to perform requested operation/' \
47 -e '/Error PDU/s/One-line/Oneline/'
49 # last sed substitution thanks to pv:937345 which changed the wording
50 # ... preserving the old form so QA passes
53 # real QA test starts here
55 $sudo TERM
=ansi dbpmda
-ie 2>&1 <<End-of-File | _filter
58 #a comment, this should be ignored
59 #test the debug and status commands
60 debug# a command with a trailing comment
64 debug appl0 timecontrol
71 open pipe /blah/this_file_should_not_exist
73 open dso /blah/this_file_should_not_exist blah_init 128
75 open pipe $PCP_PMDAS_DIR/sample/pmdasample -d 29
77 #test the desc command
81 #test the instance command
85 instance 29.2 "bin-100"
91 #test the timer command
97 #test the fetch command
101 fetch sample.bin 29.0.5
106 #test the profile command
120 profile 29.2 delete 200
126 #test the text command
132 #test the store command
136 fetch sample.write_me
141 store sample.write_me "Hello there"
142 fetch sample.write_me
143 store sample.string.write_me "Hello I'm here"
144 fetch sample.string.write_me
145 store sample.string.write_me '"hello world" to you too'
146 fetch sample.string.write_me
149 store sample.aggregate.write_me "foo bar"
150 store sample.event.records "foo bar"
151 #test the close and open commands
154 open dso $PMDADSO sample_init 30