qa: update 660 to generate index.html, fixing pcp-testsuite runs
[pcp.git] / qa / 639
blobad32dfb97220f0d117fd2a770bb4d07bbf66838f
1 #! /bin/sh
2 # PCP QA Test No. 639
3 # pmnsadd concurrency issues - pv #826904
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 filters
12 . ./common.product
13 . ./common.filter
14 . ./common.check
16 rm -f $seq.out
17 if [ $PCP_VER -lt 30600 ]
18 then
19 ln $seq.out.1 $seq.out || exit 1
20 else
21 ln $seq.out.2 $seq.out || exit 1
24 status=0 # success is the default!
25 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
27 _add()
29 while true
31 pmlock $tmp.root.lock && break
32 sleep 1
33 done
34 pmnsadd -n $tmp.root $1
35 rm -f $tmp.root.lock
38 cat <<End-of-File >$tmp.master
40 ///////////////////////////////////////////////////////////////////////////////
41 ///////////////////////////////////////////////////////////////////////////////
42 ///////////////////////////////////////////////////////////////////////////////
43 ///////////////////////////////////////////////////////////////////////////////
44 ///////////////////////////////////////////////////////////////////////////////
45 ///////////////////////////////////////////////////////////////////////////////
46 ///////////////////////////////////////////////////////////////////////////////
47 ///////////////////////////////////////////////////////////////////////////////
48 ///////////////////////////////////////////////////////////////////////////////
49 ///////////////////////////////////////////////////////////////////////////////
51 root {
52 one
53 two
54 keep1 1:0:1
55 keep2 2:0:2
58 ///////////////////////////////////////////////////////////////////////////////
59 ///////////////////////////////////////////////////////////////////////////////
60 ///////////////////////////////////////////////////////////////////////////////
61 ///////////////////////////////////////////////////////////////////////////////
62 ///////////////////////////////////////////////////////////////////////////////
63 ///////////////////////////////////////////////////////////////////////////////
64 ///////////////////////////////////////////////////////////////////////////////
65 ///////////////////////////////////////////////////////////////////////////////
66 ///////////////////////////////////////////////////////////////////////////////
67 ///////////////////////////////////////////////////////////////////////////////
70 one {
71 one
74 ///////////////////////////////////////////////////////////////////////////////
75 ///////////////////////////////////////////////////////////////////////////////
76 ///////////////////////////////////////////////////////////////////////////////
77 ///////////////////////////////////////////////////////////////////////////////
78 ///////////////////////////////////////////////////////////////////////////////
79 ///////////////////////////////////////////////////////////////////////////////
80 ///////////////////////////////////////////////////////////////////////////////
81 ///////////////////////////////////////////////////////////////////////////////
82 ///////////////////////////////////////////////////////////////////////////////
83 ///////////////////////////////////////////////////////////////////////////////
86 one.one {
87 one
90 ///////////////////////////////////////////////////////////////////////////////
91 ///////////////////////////////////////////////////////////////////////////////
92 ///////////////////////////////////////////////////////////////////////////////
93 ///////////////////////////////////////////////////////////////////////////////
94 ///////////////////////////////////////////////////////////////////////////////
95 ///////////////////////////////////////////////////////////////////////////////
96 ///////////////////////////////////////////////////////////////////////////////
97 ///////////////////////////////////////////////////////////////////////////////
98 ///////////////////////////////////////////////////////////////////////////////
99 ///////////////////////////////////////////////////////////////////////////////
102 one.one.one {
103 keep4 4:0:4
106 ///////////////////////////////////////////////////////////////////////////////
107 ///////////////////////////////////////////////////////////////////////////////
108 ///////////////////////////////////////////////////////////////////////////////
109 ///////////////////////////////////////////////////////////////////////////////
110 ///////////////////////////////////////////////////////////////////////////////
111 ///////////////////////////////////////////////////////////////////////////////
112 ///////////////////////////////////////////////////////////////////////////////
113 ///////////////////////////////////////////////////////////////////////////////
114 ///////////////////////////////////////////////////////////////////////////////
115 ///////////////////////////////////////////////////////////////////////////////
118 two {
119 keep3 3:0:3
123 ///////////////////////////////////////////////////////////////////////////////
124 ///////////////////////////////////////////////////////////////////////////////
125 ///////////////////////////////////////////////////////////////////////////////
126 ///////////////////////////////////////////////////////////////////////////////
127 ///////////////////////////////////////////////////////////////////////////////
128 ///////////////////////////////////////////////////////////////////////////////
129 ///////////////////////////////////////////////////////////////////////////////
130 ///////////////////////////////////////////////////////////////////////////////
131 ///////////////////////////////////////////////////////////////////////////////
132 ///////////////////////////////////////////////////////////////////////////////
134 End-of-File
136 cat <<End-of-File >$tmp.d1
137 root {
138 d1 1:1:1
140 End-of-File
142 cat <<End-of-File >$tmp.one.d2
143 one {
144 d2 2:1:2
146 End-of-File
148 cat <<End-of-File >$tmp.one.one.d3
149 one.one {
150 d3 3:1:3
152 End-of-File
154 cat <<End-of-File >$tmp.one.one.d6
155 one.one {
156 d6 6:1:6
158 End-of-File
160 cat <<End-of-File >$tmp.one.one.d7
161 one.one {
162 d7 7:1:7
164 End-of-File
166 cat <<End-of-File >$tmp.one.one.d8
167 one.one {
168 d8 8:1:8
170 End-of-File
172 cat <<End-of-File >$tmp.two.d4
173 two {
174 d4 4:1:4
176 End-of-File
178 cat <<End-of-File >$tmp.two.d9
179 two {
180 d9 9:1:9
182 End-of-File
184 cat <<End-of-File >$tmp.three.one.d5
185 three.one {
186 d5 5:1:5
188 End-of-File
190 # real QA test starts here
191 echo "Initial state ..."
192 pminfo -m -n $tmp.master
194 echo
195 echo "Serial additions ..."
196 echo "Serial additions ..." >$seq.full
197 cp $tmp.master $tmp.root
198 for m in $tmp.d1 $tmp.one.d2 $tmp.one.one.d3 $tmp.two.d4 $tmp.three.one.d5 \
199 $tmp.one.one.d6 $tmp.one.one.d7 $tmp.one.one.d8 $tmp.two.d9
201 pmnsadd -n $tmp.root $m 2>&1
202 done \
203 | tee -a $seq.full \
204 | grep ' leaf' \
205 | LC_COLLATE=POSIX sort -nr
206 echo
207 pminfo -m -n $tmp.root | LC_COLLATE=POSIX sort
209 echo
210 echo "Parallel additions ..."
211 echo "Parallel additions ..." >>$seq.full
212 cp $tmp.master $tmp.root
213 rm -f $tmp*.out
214 for m in $tmp.d1 $tmp.one.d2 $tmp.one.one.d3 $tmp.two.d4 $tmp.three.one.d5 \
215 $tmp.one.one.d6 $tmp.one.one.d7 $tmp.one.one.d8 $tmp.two.d9
217 _add $m >$m.out 2>&1 &
218 done
219 wait
221 cat $tmp*.out \
222 | grep ' leaf' \
223 | LC_COLLATE=POSIX sort -nr
224 echo
226 for f in $tmp*.out
228 echo >>$seq.full
229 echo "=== $f ===" >>$seq.full
230 cat $f >>$seq.full
231 done
233 pminfo -m -n $tmp.root | LC_COLLATE=POSIX sort
235 # success, all done
236 exit