qa: revert some change to expected 244 outputs (from pmda-restart)
[pcp.git] / qa / 617
blob3cc5ac3be600f7a75b64e4edb6a7c4629acc5e92
1 #! /bin/sh
2 # PCP QA Test No. 617
3 # exercise PCP dbpmda interface
5 # Copyright (c) 2013 Red Hat.
6 # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved.
9 seq=`basename $0`
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
13 . ./common.filter
14 . ./common.check
15 . ./common.product
17 case "$PCP_PLATFORM"
19 linux|solaris|freebsd)
20 PMDADSO=$PCP_PMDAS_DIR/sample/pmda_sample.so
22 darwin)
23 PMDADSO=$PCP_PMDAS_DIR/sample/pmda_sample.dylib
26 echo "Arrgh ... need DSO name customization for $PCP_PLATFORM"
27 exit 1
28 esac
29 export PMDADSO
31 status=1 # failure is the default!
32 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
34 _filter()
36 sed \
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/' \
42 -e '/^dbpmda> $/d' \
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
56 help
57 status
58 #a comment, this should be ignored
59 #test the debug and status commands
60 debug# a command with a trailing comment
61 help debug
62 debug all
63 status
64 debug appl0 timecontrol
65 status
66 debug none
67 status
68 debug blah
69 debug 1 blah
70 debug blah fetch
71 open pipe /blah/this_file_should_not_exist
72 status
73 open dso /blah/this_file_should_not_exist blah_init 128
74 status
75 open pipe $PCP_PMDAS_DIR/sample/pmdasample -d 29
76 status
77 #test the desc command
78 desc
79 desc 29.0.6
80 desc sample.bin
81 #test the instance command
82 instance
83 instance 29.2
84 instance 29.2 300
85 instance 29.2 "bin-100"
86 instance 29.2 "bin
87 instance "bin
88 instance 30.3
89 instance 29
90 instance -1
91 #test the timer command
92 timer
93 timer on
94 status
95 timer off
96 status
97 #test the fetch command
98 getdesc on
99 fetch
100 fetch 29.0.6
101 fetch sample.bin 29.0.5
102 fetch blah
103 fetch 29
104 fetch 0.29
105 fetch 0.1.2
106 #test the profile command
107 profile
108 profile 29.2 none
109 status
110 fetch 29.0.6
111 profile 29.2 add 200
112 status
113 fetch 29.0.6
114 profile 29.2 add 250
115 status
116 fetch 29.0.6
117 profile 29.2 add 300
118 status
119 fetch 29.0.6
120 profile 29.2 delete 200
121 status
122 fetch 29.0.6
123 profile 29.2 all
124 status
125 fetch 29.0.6
126 #test the text command
127 text
128 text 29.0.6
129 text indom 29.2
130 text indom 29.5
131 text blah 29.2
132 #test the store command
133 store
134 store 29.0.36 "42"
135 store 29.0.36 '43'
136 fetch sample.write_me
137 store 29.0.36
138 store 29.0.36 "57.3"
139 store 29.0.36 '57.3'
140 store 20.0.36 4
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
147 store 29.0.20 "3"
148 store 0.0.0 "5"
149 store sample.aggregate.write_me "foo bar"
150 store sample.event.records "foo bar"
151 #test the close and open commands
152 close
153 status
154 open dso $PMDADSO sample_init 30
155 status
156 close
157 status
158 #other
159 blah
160 quit
161 End-of-File
163 status=0
164 exit