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