zsh completions: minor tweaks
[pcp.git] / qa / 569
blob929a7dba75797c7debec28c5d279f68208de20b4
1 #!/bin/sh
2 # PCP QA Test No. 569
3 # exercise pmprobe, and pv 679693 in particular
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 status=1 # failure is the default!
17 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
19 _filter()
21 sed \
22 -e '/^sample\.many\./d' \
23 -e '/^sample\.bigid/d' \
24 -e '/sample\.byte_/d' \
25 -e '/sample\.kbyte_/d' \
26 -e '/sample\.dynamic\.meta/d' \
27 -e '/sample\.datasize/d' \
28 -e '/sample\.darkness/d' \
29 -e '/sample\.scramble/d' \
30 -e '/^sample\.mirage/s/ [0-9].*/ NUMVAL VAL or INST .../' \
31 -e '/^sample\.dynamic\./s/ [0-9].*/ NUMVAL VAL or INST .../' \
32 -e '/sample\.wrap\./{
33 s/ -*[0-9][0-9]*/ NUMBER/g
34 s/ NUMBER/ 1/
35 }' \
36 -e '/sample\.daemon_pid /{
37 s/ [0-9][0-9]*/ NUMBER/g
38 s/ NUMBER/ 1/
39 }' \
40 -e '/sample\.dupnames\.daemon_pid /{
41 s/ [0-9][0-9]*/ NUMBER/g
42 s/ NUMBER/ 1/
43 }' \
44 -e '/sample\.dupnames\.pid_daemon /{
45 s/ [0-9][0-9]*/ NUMBER/g
46 s/ NUMBER/ 1/
47 }' \
48 -e '/sample\..*\.write_me /{
49 s/ [0-9][0-9]*/ NUMBER/g
50 s/ ".*"/ "STRING"/g
51 s/ NUMBER/ 1/
52 }' \
53 -e '/sample\..*seconds /{
54 s/ [0-9][0-9.]*/ NUMBER/g
55 s/ NUMBER/ 1/
56 }' \
57 -e '/sample\.colour /{
58 s/ \([0-9]\)/ X\1/
59 s/ [0-9][0-9.]*/ NUMBER/g
60 s/ X/ /
61 }' \
62 -e '/sample\.drift /{
63 s/ [0-9][0-9.]*/ NUMBER/g
64 s/ NUMBER/ 1/
65 }' \
66 -e '/sample\.step/{
67 s/ [0-9][0-9.]*/ NUMBER/g
68 s/ NUMBER/ 1/
69 }' \
70 -e '/sample\..*pdu /{
71 s/ [0-9][0-9.]*/ NUMBER/g
72 s/ NUMBER/ 1/
73 }' \
74 -e '/sample\.rapid /{
75 s/ [0-9][0-9.]*/ NUMBER/g
76 s/ NUMBER/ 1/
77 }' \
78 -e '/sample\.dodgey\./{
79 s/ \([0-9]\)/ X\1/
80 s/ [0-9][0-9.]*/ NUMBER/g
81 s/ X/ /
82 }' \
83 -e '/sample\.magnitude /{
84 s/ [0-9][0-9.]*/ NUMBER/g
85 s/ NUMBER/ 1/
86 }' \
87 -e '/sample\.scale_step\./{
88 s/ [0-9][0-9.]*/ NUMBER/g
89 s/ NUMBER/ 1/
90 }' \
91 -e '/sample\.lights /s/ ".*"/ "STRING"/g' \
92 -e '/sample\.dupnames.two.lights /s/ ".*"/ "STRING"/g' \
93 -e '/sample\.sysinfo 1/d' \
94 -e '/sample\.secret\.foo\.bar\.max\.redirect/{
95 s/ [0-9][0-9.]*.*/ NUMBER .../g
96 }' \
97 -e '/sample\.event\.records/s/\[.*/[RECORDS]/' \
98 -e '/sample\.event\.highres_records/s/\[.*/[RECORDS]/' \
99 -e '/sample\.event\.no_indom_records/s/\[.*/[RECORDS]/' \
100 -e '/sample\.event\.reset_highres/{
101 s/ \([0-9]\)/ X\1/
102 s/ [0-9][0-9.]*/ NUMBER/g
103 s/ X/ /
104 }' \
105 -e '/sample\.event\.reset/{
106 s/ \([0-9]\)/ X\1/
107 s/ [0-9][0-9.]*/ NUMBER/g
108 s/ X/ /
109 }' \
110 | $PCP_AWK_PROG '
111 ( $1 == "sample.percontext.control.ctx" ||
112 $1 == "sample.percontext.control.active" ||
113 $1 == "sample.percontext.control.start" ||
114 $1 == "sample.percontext.control.end") &&
115 $3 ~ /^[0-9][0-9]*$/ { $3 = "NUMBER" }
116 { print }' \
117 | fold -w160
120 # sample.negative.ctr.m_32 old value=-9999 new value=-1000
121 _filter_store()
123 sed \
124 -e 's/old value=[^ ]* /old value=OLD /' \
125 # end
128 echo "=== reset ==="
129 # set sample.negative metrics to known initial values
131 for m in m_32 m_64 m_float m_double
133 for sem in ctr instant discrete
135 pmstore sample.negative.$sem.$m -10000 | _filter_store
136 done
137 done
139 # real QA test starts here
140 for arg in '' -i -I -v -iI -iv -iIv
142 echo
143 echo "=== $arg ==="
144 pmprobe $arg sample \
145 | _filter
146 done
148 # success, all done
149 status=0
150 exit