]> git.sur5r.net Git - openldap/blob - tests/scripts/test048-syncrepl-multiproxy
865b5ee4ccfdce9bc417bbe93cee94b14c8e8559
[openldap] / tests / scripts / test048-syncrepl-multiproxy
1 #! /bin/sh
2 # $OpenLDAP$
3 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 ##
5 ## Copyright 1998-2014 The OpenLDAP Foundation.
6 ## All rights reserved.
7 ##
8 ## Redistribution and use in source and binary forms, with or without
9 ## modification, are permitted only as authorized by the OpenLDAP
10 ## Public License.
11 ##
12 ## A copy of this license is available in the file LICENSE in the
13 ## top-level directory of the distribution or, alternatively, at
14 ## <http://www.OpenLDAP.org/license.html>.
15
16 echo "running defines.sh"
17 . $SRCDIR/scripts/defines.sh
18
19 if test $BACKLDAP = ldapno; then 
20         echo "LDAP backend not available, test skipped"
21         exit 0
22 fi 
23
24 if test $SYNCPROV = syncprovno; then 
25         echo "Syncrepl provider overlay not available, test skipped"
26         exit 0
27 fi 
28
29 if test $MONITORDB = no; then 
30         echo "Monitor backend not available, test skipped"
31         exit 0
32 fi 
33
34 if test $THREADS = threadsno ; then
35         echo "Need threads support, test skipped"
36         exit 0
37 fi
38
39 mkdir -p $TESTDIR $DBDIR1 $DBDIR2 $DBDIR3
40
41 #
42 # Test replication:
43 # - start master
44 # - start slave
45 # - populate over ldap
46 # - perform some modifies and deleted
47 # - attempt to modify the slave (referral or chain)
48 # - retrieve database over ldap and compare against expected results
49 #
50
51 echo "Starting master slapd on TCP/IP port $PORT1..."
52 . $CONFFILTER $BACKEND $MONITORDB < $PLSRMASTERCONF > $CONF1
53 $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &
54 MASTERPID=$!
55 if test $WAIT != 0 ; then
56     echo MASTERPID $MASTERPID
57     read foo
58 fi
59 KILLPIDS="$MASTERPID"
60
61 sleep 1
62
63 echo "Using ldapsearch to check that master slapd is running..."
64 for i in 0 1 2 3 4 5; do
65         $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
66                 '(objectClass=*)' > /dev/null 2>&1
67         RC=$?
68         if test $RC = 0 ; then
69                 break
70         fi
71         echo "Waiting 5 seconds for slapd to start..."
72         sleep 5
73 done
74
75 if test $RC != 0 ; then
76         echo "ldapsearch failed ($RC)!"
77         test $KILLSERVERS != no && kill -HUP $KILLPIDS
78         exit $RC
79 fi
80
81 echo "Using ldapadd to create the context prefix entry in the master..."
82 $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
83         $LDIFORDEREDCP > /dev/null 2>&1
84 RC=$?
85 if test $RC != 0 ; then
86         echo "ldapadd failed ($RC)!"
87         test $KILLSERVERS != no && kill -HUP $KILLPIDS
88         exit $RC
89 fi
90
91 echo "Starting P1 slave slapd on TCP/IP port $PORT2..."
92 . $CONFFILTER $BACKEND $MONITORDB < $RSLAVECONF > $CONF2
93 $SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING > $LOG2 2>&1 &
94 P1SLAVEPID=$!
95 if test $WAIT != 0 ; then
96     echo P1SLAVEPID $P1SLAVEPID
97     read foo
98 fi
99 KILLPIDS="$MASTERPID $P1SLAVEPID"
100
101 sleep 1
102
103 echo "Using ldapsearch to check that P1 slave slapd is running..."
104 for i in 0 1 2 3 4 5; do
105         $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \
106                 '(objectClass=*)' > /dev/null 2>&1
107         RC=$?
108         if test $RC = 0 ; then
109                 break
110         fi
111         echo "Waiting 5 seconds for slapd to start..."
112         sleep 5
113 done
114
115 if test $RC != 0 ; then
116         echo "ldapsearch failed ($RC)!"
117         test $KILLSERVERS != no && kill -HUP $KILLPIDS
118         exit $RC
119 fi
120
121 echo "Starting R1 slave slapd on TCP/IP port $PORT3..."
122 . $CONFFILTER $BACKEND $MONITORDB < $RSLAVECONF | sed -e 's;\.2\.\([^/]*\)$;.3.\1;' > $CONF3
123 $SLAPD -f $CONF3 -h $URI3 -d $LVL $TIMING > $LOG3 2>&1 &
124 R1SLAVEPID=$!
125 if test $WAIT != 0 ; then
126     echo R1SLAVEPID $R1SLAVEPID
127     read foo
128 fi
129 KILLPIDS="$MASTERPID $P1SLAVEPID $R1SLAVEPID"
130
131 sleep 1
132
133 echo "Using ldapsearch to check that R1 slave slapd is running..."
134 for i in 0 1 2 3 4 5; do
135         $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT3 \
136                 '(objectClass=*)' > /dev/null 2>&1
137         RC=$?
138         if test $RC = 0; then
139                 break
140         fi
141         echo "Waiting 5 seconds for slapd to start..."
142         sleep 5
143 done
144
145 if test $RC != 0 ; then
146         echo "ldapsearch failed ($RC)!"
147         test $KILLSERVERS != no && kill -HUP $KILLPIDS
148         exit $RC
149 fi
150
151 CHECK=1
152 echo "$CHECK > Using ldapadd to populate the master directory..."
153 $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \
154         $LDIFORDEREDNOCP > /dev/null 2>&1
155 RC=$?
156 if test $RC != 0 ; then
157         echo "ldapadd failed ($RC)!"
158         test $KILLSERVERS != no && kill -HUP $KILLPIDS
159         exit $RC
160 fi
161
162 echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
163 sleep $SLEEP1
164
165 #echo "Using ldapsearch to read all the entries from the master..."
166 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
167         '(objectClass=*)' > "${MASTEROUT}.1" 2>&1
168 RC=$?
169
170 if test $RC != 0 ; then
171         echo "ldapsearch failed at master ($RC)!"
172         test $KILLSERVERS != no && kill -HUP $KILLPIDS
173         exit $RC
174 fi
175
176 #echo "Using ldapsearch to read all the entries from the P1 slave..."
177 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
178         '(objectClass=*)' > "${SLAVEOUT}.1" 2>&1
179 RC=$?
180
181 if test $RC != 0 ; then
182         echo "ldapsearch failed at P1 slave ($RC)!"
183         test $KILLSERVERS != no && kill -HUP $KILLPIDS
184         exit $RC
185 fi
186
187 #echo "Filtering master results..."
188 $LDIFFILTER < "${MASTEROUT}.1" > $MASTERFLT
189 #echo "Filtering slave results..."
190 $LDIFFILTER < "${SLAVEOUT}.1" > $SLAVEFLT
191
192 echo "$CHECK < Comparing retrieved entries from master and P1 slave..."
193 $CMP $MASTERFLT $SLAVEFLT > $CMPOUT
194
195 if test $? != 0 ; then
196         echo "test failed - master and P1 slave databases differ"
197         test $KILLSERVERS != no && kill -HUP $KILLPIDS
198         exit 1
199 fi
200
201 #echo "Using ldapsearch to read all the entries from the R1 slave..."
202 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT3 \
203         '(objectClass=*)' > "${SLAVEOUT}.1" 2>&1
204 RC=$?
205
206 if test $RC != 0 ; then
207         echo "ldapsearch failed at R1 slave ($RC)!"
208         test $KILLSERVERS != no && kill -HUP $KILLPIDS
209         exit $RC
210 fi
211
212 #echo "Filtering slave results..."
213 $LDIFFILTER < "${SLAVEOUT}.1" > $SLAVEFLT
214
215 echo "$CHECK < Comparing retrieved entries from master and R1 slave..."
216 $CMP $MASTERFLT $SLAVEFLT > $CMPOUT
217
218 if test $? != 0 ; then
219         echo "test failed - master and R1 slave databases differ"
220         test $KILLSERVERS != no && kill -HUP $KILLPIDS
221         exit 1
222 fi
223
224 CHECK=`expr $CHECK + 1`
225 echo "$CHECK > Stopping the provider, sleeping $SLEEP2 seconds and restarting it..."
226 kill -HUP "$MASTERPID"
227 wait $MASTERPID
228 sleep $SLEEP2
229
230 echo "======================= RESTART =======================" >> $LOG1
231 $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >> $LOG1 2>&1 &
232 MASTERPID=$!
233 if test $WAIT != 0 ; then
234     echo MASTERPID $MASTERPID
235     read foo
236 fi
237 KILLPIDS="$MASTERPID $P1SLAVEPID $R1SLAVEPID"
238
239 sleep 1
240
241 echo "Using ldapsearch to check that master slapd is running..."
242 for i in 0 1 2 3 4 5; do
243         $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
244                 '(objectClass=*)' > /dev/null 2>&1
245         RC=$?
246         if test $RC = 0 ; then
247                 break
248         fi
249         echo "Waiting 5 seconds for slapd to start..."
250         sleep 5
251 done
252
253 if test $RC != 0 ; then
254         echo "ldapsearch failed ($RC)!"
255         test $KILLSERVERS != no && kill -HUP $KILLPIDS
256         exit $RC
257 fi
258
259 echo "Using ldapmodify to modify master directory..."
260
261 #
262 # Do some modifications
263 #
264
265 $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
266         $TESTOUT 2>&1 << EOMODS
267 dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example,dc=com
268 changetype: modify
269 add: drink
270 drink: Orange Juice
271 -
272 delete: sn
273 sn: Jones
274 -
275 add: sn
276 sn: Jones
277
278 dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
279 changetype: modify
280 replace: drink
281 drink: Iced Tea
282
283 dn: cn=ITD Staff,ou=Groups,dc=example,dc=com
284 changetype: modify
285 delete: uniquemember
286 uniquemember: cn=James A Jones 2, ou=Information Technology Division, ou=People, dc=example,dc=com
287 uniquemember: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
288 -
289 add: uniquemember
290 uniquemember: cn=Dorothy Stevens, ou=Alumni Association, ou=People, dc=example,dc=com
291 uniquemember: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example,dc=com
292
293 dn: cn=Bjorn Jensen,ou=Information Technology Division,ou=People,dc=example,dc
294  =com
295 changetype: modify
296 delete: cn
297 cn: Biiff Jensen
298
299 dn: cn=Gern Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
300 changetype: add
301 objectclass: OpenLDAPperson
302 cn: Gern Jensen
303 sn: Jensen
304 uid: gjensen
305 title: Chief Investigator, ITD
306 postaladdress: ITD $ 535 W. William St $ Ann Arbor, MI 48103
307 seealso: cn=All Staff, ou=Groups, dc=example,dc=com
308 drink: Coffee
309 homepostaladdress: 844 Brown St. Apt. 4 $ Ann Arbor, MI 48104
310 description: Very odd
311 facsimiletelephonenumber: +1 313 555 7557
312 telephonenumber: +1 313 555 8343
313 mail: gjensen@mailgw.example.com
314 homephone: +1 313 555 8844
315
316 dn: ou=Retired, ou=People, dc=example,dc=com
317 changetype: add
318 objectclass: organizationalUnit
319 ou: Retired
320
321 dn: cn=Rosco P. Coltrane, ou=Information Technology Division, ou=People, dc=example,dc=com
322 changetype: add
323 objectclass: OpenLDAPperson
324 cn: Rosco P. Coltrane
325 sn: Coltrane
326 uid: rosco
327 description: Fat tycoon
328
329 dn: cn=Rosco P. Coltrane, ou=Information Technology Division, ou=People, dc=example,dc=com
330 changetype: modrdn
331 newrdn: cn=Rosco P. Coltrane
332 deleteoldrdn: 1
333 newsuperior: ou=Retired, ou=People, dc=example,dc=com
334
335 dn: cn=James A Jones 2, ou=Information Technology Division, ou=People, dc=example,dc=com
336 changetype: delete
337 EOMODS
338
339 RC=$?
340 if test $RC != 0 ; then
341         echo "ldapmodify failed ($RC)!"
342         test $KILLSERVERS != no && kill -HUP $KILLPIDS
343         exit $RC
344 fi
345
346 echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
347 sleep $SLEEP1
348
349 #echo "Using ldapsearch to read all the entries from the master..."
350 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
351         '(objectClass=*)' > "${MASTEROUT}.2" 2>&1
352 RC=$?
353
354 if test $RC != 0 ; then
355         echo "ldapsearch failed at master ($RC)!"
356         test $KILLSERVERS != no && kill -HUP $KILLPIDS
357         exit $RC
358 fi
359
360 #echo "Using ldapsearch to read all the entries from the P1 slave..."
361 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
362         '(objectClass=*)' > "${SLAVEOUT}.2" 2>&1
363 RC=$?
364
365 if test $RC != 0 ; then
366         echo "ldapsearch failed at P1 slave ($RC)!"
367         test $KILLSERVERS != no && kill -HUP $KILLPIDS
368         exit $RC
369 fi
370
371 #echo "Filtering master results..."
372 $LDIFFILTER < "${MASTEROUT}.2" > $MASTERFLT
373 #echo "Filtering P1 slave results..."
374 $LDIFFILTER < "${SLAVEOUT}.2" > $SLAVEFLT
375
376 echo "$CHECK < Comparing retrieved entries from master and P1 slave..."
377 $CMP $MASTERFLT $SLAVEFLT > $CMPOUT
378
379 if test $? != 0 ; then
380         echo "test failed - master and P1 slave databases differ"
381         test $KILLSERVERS != no && kill -HUP $KILLPIDS
382         exit 1
383 fi
384
385 #echo "Using ldapsearch to read all the entries from the R1 slave..."
386 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT3 \
387         '(objectClass=*)' > "${SLAVEOUT}.2" 2>&1
388 RC=$?
389
390 if test $RC != 0 ; then
391         echo "ldapsearch failed at R1 slave ($RC)!"
392         test $KILLSERVERS != no && kill -HUP $KILLPIDS
393         exit $RC
394 fi
395
396 #echo "Filtering slave results..."
397 $LDIFFILTER < "${SLAVEOUT}.2" > $SLAVEFLT
398
399 echo "$CHECK < Comparing retrieved entries from master and R1 slave..."
400 $CMP $MASTERFLT $SLAVEFLT > $CMPOUT
401
402 if test $? != 0 ; then
403         echo "test failed - master and R1 slave databases differ"
404         test $KILLSERVERS != no && kill -HUP $KILLPIDS
405         exit 1
406 fi
407
408 CHECK=`expr $CHECK + 1`
409 echo "$CHECK > Stopping slaves to test recovery..."
410 kill -HUP $P1SLAVEPID $R1SLAVEPID
411 wait $P1SLAVEPID
412 wait $R1SLAVEPID
413
414 echo "Modifying more entries on the master..."
415 $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD >> \
416         $TESTOUT 2>&1 << EOMODS
417 dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
418 changetype: modify
419 add: description
420 description: r1 slave is down...
421
422 dn: cn=James T. Kirk, ou=Retired, ou=People, dc=example,dc=com
423 changetype: add
424 objectclass: OpenLDAPperson
425 sn: Kirk
426 uid: jtk
427 cn: James T. Kirk
428
429 dn: cn=Tiberius J. Hooker, ou=Retired, ou=People, dc=example,dc=com
430 changetype: add
431 objectclass: OpenLDAPperson
432 sn: Hooker
433 uid: tjh
434 cn: Tiberius J. Hooker
435
436 EOMODS
437
438 echo "Restarting P1 slave..."
439 echo "======================= RESTART =======================" >> $LOG3
440 $SLAPD -f $CONF2 -h $URI2 -d $LVL $TIMING >> $LOG2 2>&1 &
441 P1SLAVEPID=$!
442 if test $WAIT != 0 ; then
443     echo P1SLAVEPID $P1SLAVEPID
444     read foo
445 fi
446
447 echo "Restarting R1 slave..."
448 echo "======================= RESTART =======================" >> $LOG3
449 $SLAPD -f $CONF3 -h $URI3 -d $LVL $TIMING >> $LOG3 2>&1 &
450 R1SLAVEPID=$!
451 if test $WAIT != 0 ; then
452     echo R1SLAVEPID $R1SLAVEPID
453     read foo
454 fi
455 KILLPIDS="$MASTERPID $P1SLAVEPID $R1SLAVEPID"
456
457 echo "Waiting $SLEEP2 seconds for syncrepl to receive changes..."
458 sleep $SLEEP2
459
460 #echo "Using ldapsearch to read all the entries from the master..."
461 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
462         '(objectClass=*)' > "${MASTEROUT}.3" 2>&1
463 RC=$?
464
465 if test $RC != 0 ; then
466         echo "ldapsearch failed at master ($RC)!"
467         test $KILLSERVERS != no && kill -HUP $KILLPIDS
468         exit $RC
469 fi
470
471 #echo "Using ldapsearch to read all the entries from the P1 slave..."
472 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
473         '(objectClass=*)' > "${SLAVEOUT}.3" 2>&1
474 RC=$?
475
476 if test $RC != 0 ; then
477         echo "ldapsearch failed at slave ($RC)!"
478         test $KILLSERVERS != no && kill -HUP $KILLPIDS
479         exit $RC
480 fi
481
482 #echo "Filtering master results..."
483 $LDIFFILTER < "${MASTEROUT}.3" > $MASTERFLT
484 #echo "Filtering slave results..."
485 $LDIFFILTER < "${SLAVEOUT}.3" > $SLAVEFLT
486
487 echo "$CHECK < Comparing retrieved entries from master and P1 slave..."
488 $CMP $MASTERFLT $SLAVEFLT > $CMPOUT
489
490 if test $? != 0 ; then
491         echo "test failed - master and slave databases differ"
492         test $KILLSERVERS != no && kill -HUP $KILLPIDS
493         exit 1
494 fi
495
496 #echo "Using ldapsearch to read all the entries from the R1 slave..."
497 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT3 \
498         '(objectClass=*)' > "${SLAVEOUT}.3" 2>&1
499 RC=$?
500
501 if test $RC != 0 ; then
502         echo "ldapsearch failed at slave ($RC)!"
503         test $KILLSERVERS != no && kill -HUP $KILLPIDS
504         exit $RC
505 fi
506
507 #echo "Filtering slave results..."
508 $LDIFFILTER < "${SLAVEOUT}.3" > $SLAVEFLT
509
510 echo "$CHECK < Comparing retrieved entries from master and R1 slave..."
511 $CMP $MASTERFLT $SLAVEFLT > $CMPOUT
512
513 if test $? != 0 ; then
514         echo "test failed - master and slave databases differ"
515         test $KILLSERVERS != no && kill -HUP $KILLPIDS
516         exit 1
517 fi
518
519 CHECK=`expr $CHECK + 1`
520 echo "$CHECK > Try updating the P1 slave slapd..."
521 $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT2 -w $PASSWD > \
522         $TESTOUT 2>&1 << EOMODS
523 dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com
524 changetype: modify
525 add: description
526 description: This write must fail because directed to a shadow context,
527 description: unless the chain overlay is configured appropriately ;)
528
529 EOMODS
530
531 RC=$?
532 if test $RC != 0 ; then
533         echo "ldapmodify failed ($RC)!"
534         test $KILLSERVERS != no && kill -HUP $KILLPIDS
535         exit $RC
536 fi
537
538 echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
539 sleep $SLEEP1
540
541 #echo "Using ldapsearch to read all the entries from the master..."
542 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
543         '(objectClass=*)' > "${MASTEROUT}.4" 2>&1
544 RC=$?
545
546 if test $RC != 0 ; then
547         echo "ldapsearch failed at master ($RC)!"
548         test $KILLSERVERS != no && kill -HUP $KILLPIDS
549         exit $RC
550 fi
551
552 #echo "Using ldapsearch to read all the entries from the P1 slave..."
553 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
554 '(objectClass=*)' > "${SLAVEOUT}.4" 2>&1
555 RC=$?
556
557 if test $RC != 0 ; then
558         echo "ldapsearch failed at slave ($RC)!"
559         test $KILLSERVERS != no && kill -HUP $KILLPIDS
560         exit $RC
561 fi
562
563 #echo "Filtering master results..."
564 $LDIFFILTER < "${MASTEROUT}.4" > $MASTERFLT
565 #echo "Filtering slave results..."
566 $LDIFFILTER < "${SLAVEOUT}.4" > $SLAVEFLT
567
568 echo "$CHECK < Comparing retrieved entries from master and P1 slave..."
569 $CMP $MASTERFLT $SLAVEFLT > $CMPOUT
570
571 if test $? != 0 ; then
572         echo "test failed - master and P1 slave databases differ"
573         test $KILLSERVERS != no && kill -HUP $KILLPIDS
574         exit 1
575 fi
576
577 #echo "Using ldapsearch to read all the entries from the R1 slave..."
578 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT3 \
579 '(objectClass=*)' > "${SLAVEOUT}.4" 2>&1
580 RC=$?
581
582 if test $RC != 0 ; then
583         echo "ldapsearch failed at slave ($RC)!"
584         test $KILLSERVERS != no && kill -HUP $KILLPIDS
585         exit $RC
586 fi
587
588 #echo "Filtering slave results..."
589 $LDIFFILTER < "${SLAVEOUT}.4" > $SLAVEFLT
590
591 echo "$CHECK < Comparing retrieved entries from master and R1 slave..."
592 $CMP $MASTERFLT $SLAVEFLT > $CMPOUT
593
594 if test $? != 0 ; then
595         echo "test failed - master and R1 slave databases differ"
596         test $KILLSERVERS != no && kill -HUP $KILLPIDS
597         exit 1
598 fi
599
600 test $KILLSERVERS != no && kill -HUP $KILLPIDS
601
602 echo ">>>>> Test succeeded"
603
604 test $KILLSERVERS != no && wait
605
606 exit 0