]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10472 Check exit code of background jobs
authorOndřej Kuzník <ondra@mistotebe.net>
Thu, 2 Apr 2026 12:47:48 +0000 (13:47 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Fri, 1 May 2026 15:13:53 +0000 (15:13 +0000)
Also improve KILLPIDS tracking.

Waiting on multiple jobs and relying on wait exit code being != 0 if at
least one process returned != 0 might not be portable but is the best we
can do for now. We can address that in the future.

153 files changed:
contrib/slapd-modules/alias/tests/scripts/test001-config
contrib/slapd-modules/alias/tests/scripts/test002-add-delete
contrib/slapd-modules/alias/tests/scripts/test003-search
contrib/slapd-modules/ciboolean/tests/scripts/test001-ciboolean
contrib/slapd-modules/datamorph/tests/scripts/common.sh
contrib/slapd-modules/datamorph/tests/scripts/test001-config
contrib/slapd-modules/datamorph/tests/scripts/test002-add-delete
contrib/slapd-modules/datamorph/tests/scripts/test003-search
contrib/slapd-modules/datamorph/tests/scripts/test004-compare
contrib/slapd-modules/datamorph/tests/scripts/test005-modify
contrib/slapd-modules/datamorph/tests/scripts/test006-modrdn
contrib/slapd-modules/datamorph/tests/scripts/test007-transformed-replication
contrib/slapd-modules/datamorph/tests/scripts/test008-ignored-replication
contrib/slapd-modules/emptyds/tests/scripts/test001-emptyds
contrib/slapd-modules/resultstats/tests/scripts/test001-resultstats
contrib/slapd-modules/variant/tests/scripts/test001-config
contrib/slapd-modules/variant/tests/scripts/test002-add-delete
contrib/slapd-modules/variant/tests/scripts/test003-search
contrib/slapd-modules/variant/tests/scripts/test004-compare
contrib/slapd-modules/variant/tests/scripts/test005-modify
contrib/slapd-modules/variant/tests/scripts/test006-acl
contrib/slapd-modules/variant/tests/scripts/test007-subtypes
contrib/slapd-modules/variant/tests/scripts/test008-variant-replication
contrib/slapd-modules/variant/tests/scripts/test009-ignored-replication
contrib/slapd-modules/variant/tests/scripts/test010-limits
contrib/slapd-modules/variant/tests/scripts/test011-referral
contrib/slapd-modules/variant/tests/scripts/test012-crossdb
tests/data/regressions/its10248/its10248
tests/data/regressions/its10388/its10388
tests/data/regressions/its4184/its4184
tests/data/regressions/its4326/its4326
tests/data/regressions/its4336/its4336
tests/data/regressions/its4448/its4448
tests/data/regressions/its6794/its6794
tests/data/regressions/its7573/its7573
tests/data/regressions/its8427/its8427
tests/data/regressions/its8427/its8427-2
tests/data/regressions/its8444/its8444
tests/data/regressions/its8521/its8521
tests/data/regressions/its8616/its8616
tests/data/regressions/its8663/its8663
tests/data/regressions/its8721/its8721
tests/data/regressions/its8752/its8752
tests/data/regressions/its8800/its8800
tests/data/regressions/its9051/its9051
tests/data/regressions/its9282/its9282
tests/data/regressions/its9288/its9288
tests/data/regressions/its9338/its9338
tests/data/regressions/its9400/its9400
tests/data/regressions/its9468/its9468
tests/data/regressions/its9863/its9863
tests/data/regressions/its9888/its9888
tests/scripts/lloadd/test000-rootdse
tests/scripts/lloadd/test001-backend-issues
tests/scripts/lloadd/test002-load
tests/scripts/lloadd/test003-cnconfig
tests/scripts/lloadd/test004-monitor
tests/scripts/lloadd/test005-tls
tests/scripts/lloadd/test006-sasl
tests/scripts/lloadd/test007-coherence
tests/scripts/lloadd/test008-nod
tests/scripts/test000-rootdse
tests/scripts/test001-slapadd
tests/scripts/test002-populate
tests/scripts/test003-search
tests/scripts/test004-modify
tests/scripts/test005-modrdn
tests/scripts/test006-acls
tests/scripts/test007-slapmodify
tests/scripts/test008-concurrency
tests/scripts/test009-referral
tests/scripts/test010-passwd
tests/scripts/test011-glue-slapadd
tests/scripts/test012-glue-populate
tests/scripts/test013-language
tests/scripts/test014-whoami
tests/scripts/test015-xsearch
tests/scripts/test016-subref
tests/scripts/test017-syncreplication-refresh
tests/scripts/test018-syncreplication-persist
tests/scripts/test019-syncreplication-cascade
tests/scripts/test020-proxycache
tests/scripts/test021-certificate
tests/scripts/test022-ppolicy
tests/scripts/test023-refint
tests/scripts/test024-unique
tests/scripts/test025-limits
tests/scripts/test026-dn
tests/scripts/test027-emptydn
tests/scripts/test028-idassert
tests/scripts/test029-ldapglue
tests/scripts/test030-relay
tests/scripts/test031-component-filter
tests/scripts/test032-chain
tests/scripts/test033-glue-syncrepl
tests/scripts/test034-translucent
tests/scripts/test035-meta
tests/scripts/test036-meta-concurrency
tests/scripts/test037-manage
tests/scripts/test038-retcode
tests/scripts/test039-glue-ldap-concurrency
tests/scripts/test040-subtree-rename
tests/scripts/test041-aci
tests/scripts/test042-valsort
tests/scripts/test043-delta-syncrepl
tests/scripts/test044-dynlist
tests/scripts/test045-syncreplication-proxied
tests/scripts/test046-dds
tests/scripts/test047-ldap
tests/scripts/test048-syncrepl-multiproxy
tests/scripts/test049-sync-config
tests/scripts/test050-syncrepl-multiprovider
tests/scripts/test051-config-undo
tests/scripts/test052-memberof
tests/scripts/test053-syncprov-glue
tests/scripts/test054-syncreplication-parallel-load
tests/scripts/test055-valregex
tests/scripts/test056-monitor
tests/scripts/test057-memberof-refint
tests/scripts/test058-syncrepl-asymmetric
tests/scripts/test059-consumer-config
tests/scripts/test060-mt-hot
tests/scripts/test061-syncreplication-initiation
tests/scripts/test062-config-delete
tests/scripts/test063-delta-multiprovider
tests/scripts/test064-constraint
tests/scripts/test065-proxyauthz
tests/scripts/test066-autoca
tests/scripts/test067-tls
tests/scripts/test068-sasl-tls-external
tests/scripts/test069-delta-multiprovider-starttls
tests/scripts/test070-delta-multiprovider-ldaps
tests/scripts/test071-dirsync
tests/scripts/test072-dsee-sync
tests/scripts/test073-asyncmeta
tests/scripts/test074-asyncmeta-concurrency
tests/scripts/test075-dsee-persist
tests/scripts/test076-authid-rewrite
tests/scripts/test077-sasl-gssapi
tests/scripts/test078-persistent-sessionlog
tests/scripts/test079-proxy-timeout
tests/scripts/test080-hotp
tests/scripts/test081-totp
tests/scripts/test082-remoteauth
tests/scripts/test083-argon2
tests/scripts/test084-deref
tests/scripts/test085-homedir
tests/scripts/test086-delta-consumer-config
tests/scripts/test088-syncprov-glue-rwm
tests/scripts/test089-nestgroup
tests/scripts/test090-auditlog
tests/scripts/test091-asyncmeta-conttl
tests/scripts/test092-asyncmeta-nod

index e1ee0733eec705fd484ab27f5a670e9c26ded46b..1da4ae5c3f770b73b9505ef9fd8db333b817e1ff 100755 (executable)
@@ -243,6 +243,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index aa134b20a6c13592459d1b05f3799ec947b7165b..b3e8cb8b9c1dffaa68dd1679caefd988de3860ad 100755 (executable)
@@ -71,6 +71,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 2ef44d6f78e7815eed54d18d7dcd14e0d4f2e314..23ac99ace192d916d054ac68e2ab12e0e6cf6f7f 100755 (executable)
@@ -146,6 +146,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 104712f3e3919142f7009239bbc687895fbfdf57..75f085cb39af677cbd0dbd556c4ad022b5ac3240 100755 (executable)
@@ -235,6 +235,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 86444715048004042d50e86893a89ebc345de0fd..61290327f2d453cf81831b5a89e1370d92860457 100755 (executable)
@@ -117,7 +117,7 @@ else
 fi
 
 echo "Stopping slapd on TCP/IP port $PORT1..."
-kill -HUP $KILLPIDS
+kill -HUP $KILLPIDS && wait $KILLPIDS || exit $?
 KILLPIDS=""
 sleep $SLEEP0
 
index a25c24e0c28383407f2f2380845cc72978f0516e..a73deaebd7d4f550bbe6d81c102802a0b73007e1 100755 (executable)
@@ -59,7 +59,7 @@ if test $RC != 0 ; then
 fi
 
 echo "Stopping slapd on TCP/IP port $PORT1..."
-kill -HUP $KILLPIDS
+kill -HUP $KILLPIDS && wait $KILLPIDS || exit $?
 KILLPIDS=""
 sleep $SLEEP0
 echo "Starting slapd on TCP/IP port $PORT1..."
@@ -243,6 +243,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 5f6d9b1bc0010735f3663f793c69e6acdb03a047..01a1dca4c16c899b9f7413327c5485c33b83e8bc 100755 (executable)
@@ -142,6 +142,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 8dca0847dae582c580494566bcc6f27a70e16863..c07355fe020ed9d50190f0eceb132438e58ac4a0 100755 (executable)
@@ -101,6 +101,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index a1f09838018f7aa76cb8c8b36115fc56561a8867..e190332ba057d2fac055f253803e2a8d76be6af0 100755 (executable)
@@ -57,6 +57,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 597fcce1251c5d802831858907b88ee7a1d628d6..ecddff5bbc794ba86fcb3baec145e5993b19e1fe 100755 (executable)
@@ -84,6 +84,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 8914b1c4a13159db51ec317fd358cb8a66fe92b7..61cb741227b84be31ee28ceb8c4ae3554142e085 100755 (executable)
@@ -47,6 +47,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index a0942722e5e90b151589eff214261367bf7ee48f..ff32b953a4c1c987107266824b683c5346abfc25 100755 (executable)
@@ -291,6 +291,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 668250f0a699a0e95c78e36aeb9eab21e704c455..a242dc8048629cc8d00fc398f5dc9ee17cb91bde 100755 (executable)
@@ -294,6 +294,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index dc462b07a448803864daca323345d58eca719025..a19c7e88781c1bba8879c023a7a1f5f242260228 100755 (executable)
@@ -132,6 +132,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 4a0b9144cc6d69c9c2c9b41cf65370d54dbbb156..fee1d2c9164f2e59e27243b3361ce9a45aad3cf2 100755 (executable)
@@ -367,6 +367,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index de927dc057e81bcbd2c106542af9f0703bbf10eb..d693ad546080801799d456336a54184a2a085ae9 100755 (executable)
@@ -59,7 +59,7 @@ if test $RC != 0 ; then
 fi
 
 echo "Stopping slapd on TCP/IP port $PORT1..."
-kill -HUP $KILLPIDS
+kill -HUP $KILLPIDS && wait $KILLPIDS || exit $?
 KILLPIDS=""
 sleep $SLEEP0
 echo "Starting slapd on TCP/IP port $PORT1..."
@@ -210,6 +210,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 3a1fb83e693dfbbafb3a1f9bac53c5e428f370b7..38bb98ac925dc0854ca9607b6130e83621bbc7d6 100755 (executable)
@@ -108,6 +108,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 2bee3e5cfe9874ba58b3e86dabc8df2e9b508dcd..b0da1444a5f85a3e65a8d5f8a226748e0260bdda 100755 (executable)
@@ -108,6 +108,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index a10d51ace2466b431e5e397c66af23fb2c2a360f..87121a80bc1b6458353c056a3fb5bd12e324c059 100755 (executable)
@@ -58,6 +58,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 2cc94367b0a6a882385e8d1dfd63d2405b4492c6..24875ab5b452ffa8fe78cb1c307c9d4759071d0a 100755 (executable)
@@ -115,6 +115,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 444bdf48ed4e845a778027bff02199bfe96063a1..5c114966010ef34a8c73e1d593112ee73fe6d5da 100755 (executable)
@@ -318,6 +318,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index abff4d8f991cb1da39b1fc920c0ddc668671778c..3f95a73845549caa5e6e4caa141fc1dd31b40c06 100755 (executable)
@@ -62,6 +62,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 3014d62f3f88288869530666f56a8f85e3b1aa4f..f42384c74c80a3b630bcf8c93ff7d846d09db776 100755 (executable)
@@ -189,6 +189,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index e31f68187afe433f3b128bd17e062a870f0212ec..b82d544e419947c3da99670a90c500e61712f9c8 100755 (executable)
@@ -222,6 +222,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index bb47233a445514a02b8e5b257d421e84c3a4816b..a06eb6b31859243a5ea7b0c1a4ef3b9099446c5c 100755 (executable)
@@ -94,6 +94,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 32a304a37ea2c4169d77f4533d2bafa53a872c79..e86137d25b19f60b724e6d46c2fe458a44a81adf 100755 (executable)
@@ -164,6 +164,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index e37c3a310d3c63ace13e4cb9b176cbecb2ce8481..6f2747875808c1502b5fe5d1b86bf9e54d0c3389 100755 (executable)
@@ -85,6 +85,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index e07b0f5a65523408b39a29f4231dd98b74145756..a363924814907b5324ab8d224103d15a51da5a42 100755 (executable)
@@ -199,7 +199,7 @@ echo ">>>>> Test succeeded"
 
 if test $KILLSERVERS != no ; then
        kill -HUP $KILLPIDS
-       wait
+       wait $KILLPIDS || exit $?
 fi
 
 exit 0
index b6d9026ef3c4123e99928c2a33c657090e0b8caa..c9e60d54927f50dcb6063b4862faedbe8a3ac937 100755 (executable)
@@ -135,6 +135,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 87c53437ced7850c9c87aeec2bfd1155ff0b49a1..4dc82d7871291ee562d8f939bfa3f421f18663a3 100755 (executable)
@@ -85,6 +85,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index e23b79dbac4e5266ac9465cc2566cb7a01d0108d..236076779e5c76aaeb2760c6e86ce3ec3b9dd2bb 100755 (executable)
@@ -122,7 +122,7 @@ fi
 SLEEP=2
 echo "Stopping the server and sleeping $SLEEP seconds..."
 kill -HUP "$SERVERPID"
-wait $SERVERPID
+wait $SERVERPID || { kill -HUP $KILLPIDS; exit 1; }
 sleep $SLEEP
 KILLPIDS="$PROXYPID"
 
@@ -219,6 +219,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 7482f4982d091f672fdbc2cb56ee54ea77956b19..c7a17b647fcb77727ba5b216e431cdcdb61f468a 100755 (executable)
@@ -134,6 +134,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index b5176201da2d07c0629e436c877a28f09242d058..c41120644ead7f36cc1f5374c26a84d553e01a83 100755 (executable)
@@ -305,6 +305,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 6ac56d4bc5089ac66fd5b312e53ef2263896f55f..8ff806d0b7818d7873def2a7dc71fc9800e78007 100755 (executable)
@@ -79,6 +79,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index aa5914dffeb2600787ff6e717bc66034d123176a..bcc1e1c1e7ebea3f45ba1ebb2745bc5aa92719c7 100755 (executable)
@@ -122,6 +122,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 856f3013f308f31a94523dc4790df3c5125235ef..5f892c62db87a701e2c3105b75796522ab226c22 100755 (executable)
@@ -269,7 +269,7 @@ fi
 
 echo "Stopping the provider, sleeping $SLEEP2 seconds and restarting it..."
 kill -HUP "$MASTERPID"
-wait $MASTERPID
+wait $MASTERPID || { kill -HUP $KILLPIDS; exit 1; }
 sleep $SLEEP2
 
 echo "======================= RESTART =======================" >> $LOG1
@@ -331,6 +331,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 32b9a3bce4a42cdef1e8976510f7f2129b2d7c75..2bd02b07d702bfde326cab8d05e401b8dd56727d 100755 (executable)
@@ -390,6 +390,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 1fd72648181b6ab751d1e533b511c73d1e130e46..d43a0dfeea194c873219b81cfd93706659139ccc 100755 (executable)
@@ -323,6 +323,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 58096ba6ea9cbf26246345cd0425978c68b634cf..ca4cbb26c22d588aeacf80cd61e3ca17fa5be22a 100755 (executable)
@@ -342,6 +342,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 echo
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index c1288333473a7daf20877219cd9672a85b1be6ef..e1484f6b9017a3c1833fee65d6ad4a89b1b7e0c8 100755 (executable)
@@ -260,6 +260,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 echo
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 9ffd82724e55353746482fc07968052c19b6a920..8f3cf76e04fa017c40f649a07eac56486c23089f 100755 (executable)
@@ -280,6 +280,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 echo
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index c7aeb2da6bc492d18c8ba6b63fb1326d69709f3e..595181635766772c038070ee9e15e2b1d2dba66e 100755 (executable)
@@ -165,7 +165,7 @@ fi
 
 echo "Stopping backend and triggering quarantine..."
 kill -HUP $SERVERPID2
-wait $SERVERPID2
+wait $SERVERPID2 || { kill -HUP $KILLPIDS; exit 1; }
 KILLPIDS="$SERVERPID3 $PROXYPID"
 
 QUARANTINE_START=$(( `date +%s` ))
@@ -235,6 +235,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 04a4fe4bbb05a03f27d34368ce34272553e00add..575584a9d9c854ff93e36326f2f4fbc60c1e1b44 100755 (executable)
@@ -161,7 +161,7 @@ fi
 echo "Stopping slapd and reworking configuration for MPR..."
 
 kill -HUP $KILLPIDS
-wait $KILLPIDS
+wait $KILLPIDS || exit $?
 
 KILLPIDS=
 n=1
@@ -375,7 +375,7 @@ EOMODS
 done
 
 kill -HUP $KILLPIDS
-wait $KILLPIDS
+wait $KILLPIDS || exit $?
 
 echo "The next step of the test will perform $iterations random write operations and may take some time."
 echo "As this test is for a deadlock, it will take manual intervention to exit the test if one occurs."
@@ -508,6 +508,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 7f3ba3554fdbb3d553ff9bc8cf2e8455f44c83b7..f8ad75d58d732ba9a3439b0341b5ceed870fa372 100755 (executable)
@@ -142,7 +142,7 @@ echo "done"
 
 echo -n "Stopping MPR1 slapd..."
 kill -HUP $MPID
-wait $MPID
+wait $MPID || { kill -HUP $KILLPIDS; exit 1; }
 KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $MPID / /"`;
 sleep $SLEEP2
 echo "done"
@@ -227,6 +227,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index f2aad71634cd6d80270ae4ef33c9617a60cfc38d..0295ecae24f3274ce052a8423460911bafeb3ff6 100755 (executable)
@@ -191,6 +191,6 @@ else
     fi
 fi
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit $RC
index e1ca679fbe07c54f18208519b792040dde8fbefe..f2eeb7d1cee129152d2ed9f737e1a1d3cc553d80 100755 (executable)
@@ -166,7 +166,7 @@ fi
 
 echo -n "Stopping MMR1 slapd..."
 kill -HUP $MPID
-wait $MPID
+wait $MPID || { kill -HUP $KILLPIDS; exit 1; }
 KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $MPID / /"`;
 sleep $SLEEP2
 echo "done"
@@ -268,6 +268,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 8204d0a4d5ac2a85434e9efe450c33f7852286e2..b2fbfe40163cc3d7d689d49547611716e50f3523 100755 (executable)
@@ -139,7 +139,8 @@ fi
 # Restart the remote server to invalidate TCP connection between proxy and remote
 echo "Killing and Re-starting remote slapd server on TCP/IP port $PORT1..."
 kill -HUP $SERVERPID
-wait $SERVERPID
+wait $SERVERPID || { kill -HUP $KILLPIDS; exit 1; }
+KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $SERVERPID / /"`
 
 $SLAPD -f $CONF1 -h "$URI1" -d $LVL >> $LOG1 2>&1 &
 SERVERPID=$!
@@ -177,10 +178,24 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
+wait $LDAPSEARCHPID
+RC=$?
+
+KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $LDAPSEARCHPID / /"`
+case $RC in
+0|52)
+       ;;
+*)
+       echo "ldapmodify failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+       ;;
+esac
+
 test $KILLSERVERS != no && kill -HUP $KILLPIDS 2>/dev/null
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index f4faca1720c74343b481c637364616e2bd1859e4..00aad326c4dc78fe0050b07b2500a443523d0a0b 100755 (executable)
@@ -95,6 +95,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 7a43d3efc912563f730828d5b3ea65afdecc0fe3..c086a2807be2fdaca206baed1edb59249d3ba3b2 100755 (executable)
@@ -156,6 +156,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 7ff7069653406ebabbeccb1310be71b6ae181c48..bcc3f354c8144f2ba224938b9c0c3515cd0da04b 100755 (executable)
@@ -209,6 +209,7 @@ echo "Checking ldapsearch status"
 exec 3>&-
 wait $LDAPSEARCHPID
 RC=$?
+KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $LDAPSEARCHPID / /"`
 if test $RC != 52 ; then
        echo "Failure: expected ldapsearch to return error unavailable (52) from proxy but got $RC"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS 2>/dev/null
@@ -277,6 +278,7 @@ echo "Checking ldapsearch status"
 exec 3>&-
 wait $LDAPSEARCHPID
 RC=$?
+KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $LDAPSEARCHPID / /"`
 
 if test $RC != 0 ; then
        echo "ldapsearch failed ($RC)!"
@@ -342,6 +344,7 @@ echo "Checking ldapsearch status"
 exec 3>&-
 wait $LDAPSEARCHPID
 RC=$?
+KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $LDAPSEARCHPID / /"`
 if test $RC != 52 ; then
        echo "Failure: expected ldapsearch to return error unavailable (52) from proxy but got $RC"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS 2>/dev/null
@@ -406,6 +409,7 @@ echo "Checking ldapsearch status"
 exec 3>&-
 wait $LDAPSEARCHPID
 RC=$?
+KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $LDAPSEARCHPID / /"`
 if test $RC != 52 ; then
        echo "Failure: expected ldapsearch to return error unavailable (52) from proxy but got $RC"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS 2>/dev/null
@@ -417,6 +421,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS 2>/dev/null
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 78197e7d4ed8d5e885eb6bb0ab41a0b8abdf0f40..5f0237a4f4359f2439039c0153665f3b887792f1 100755 (executable)
@@ -190,7 +190,7 @@ fi
 
 echo "Stopping consumer to test recovery..."
 kill -HUP $CONSPID
-wait $CONSPID
+wait $CONSPID || { kill -HUP $KILLPIDS; exit 1; }
 
 KILLPIDS="$PROVPID"
 
@@ -299,6 +299,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS 2>/dev/null
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index abf740004e8ee18aad1c6a99c8595533c593e8c8..f4b7ffabc11d1bac3b0199ddfb59e04733642ab9 100755 (executable)
@@ -452,7 +452,7 @@ fi
 
 echo "Stopping provider and consumer"
 
-kill -HUP $KILLPIDS
+kill -HUP $KILLPIDS && wait $KILLPIDS || exit $?
 
 sleep 3
 
@@ -595,6 +595,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index b3ba8e9b955528f3fdddf184e0e884cc993f5301..92c58c1d836757da5e4b2e1521323a056fbdc6e8 100755 (executable)
@@ -113,6 +113,6 @@ else
     fi
 fi
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit $RC
index 0b2ad97964090af0561b88b45e8e4fb0614a1ed5..c675fae32331b5704b3e8bbd9bbe2befcd3ec8e0 100755 (executable)
@@ -214,6 +214,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 5fd74883e59aa0d95d9c6af4c3fad43f4276dead..cd8e7c2fe7a53bdf99e8ad097d68133e89ca13e8 100755 (executable)
@@ -170,6 +170,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 5066988e264b7f38afebeda64cc672b89cb92d34..c2fe171bb7cddeb19381dc5889dc318d2ae7059e 100755 (executable)
@@ -482,6 +482,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 41f96219cac40bf20dbe7909d6633bfebf3b2ef1..32afa8395e5214d377d6f3085e98ea2dfa991b1f 100755 (executable)
@@ -364,6 +364,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 7d0cad0eff7084a1fb47fd232528214a49d6858d..dc524f1658f51c2d8822dd19724b8397b730a860 100755 (executable)
@@ -267,6 +267,6 @@ else
     RC=0
 fi
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit $RC
index 1f54b18cbd3a1777885fd1592b452fd96718981b..758297d6287bd81e423127f4a9eb1286aa764ea6 100755 (executable)
@@ -247,6 +247,6 @@ else
     RC=0
 fi
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit $RC
index 519c63d31f9909dee76ef1a9196a000c29e86f51..351e1adf23412ab8b614ed464cb096bfe165612b 100755 (executable)
@@ -508,6 +508,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index efbead4527a35de288da4feb1c4cde65e3821a3f..188a2cec83533b590f9ec1c2b1dcb4a85f53491d 100755 (executable)
@@ -379,10 +379,10 @@ sleep $SLEEP0
 kill -HUP $PID3
 KILLPIDS=`echo " $KILLPIDS " | sed -e "s/ $PID3 / /"`
 
-wait "$PID3"
+wait "$PID3" || wait $?
 
 echo "Waiting for the syncrepl session to finish"
-wait "$SYNCPID1"
+wait "$SYNCPID1" || wait $?
 KILLPIDS=`echo " $KILLPIDS " | sed -e "s/ $SYNCPID1 / /"`
 
 $LDAPCOMPARE -H $URI5 "$CONN_INTER" olmConnectionState:dying >>$TESTOUT 2>&1
@@ -423,6 +423,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 5fc4e6a97a86fb29d34c1771eca90f2d3351b5a9..17ebdc1b0a9056656bc84c1a486c0577a118ced4 100755 (executable)
@@ -77,6 +77,6 @@ else
        fi
 fi
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit $RC
index 84b5229f0e327b838a69d1c186a0d8a11c691b34..538a2642d6b27bbe9e884c28e27bce9925b4f4a9 100755 (executable)
@@ -75,8 +75,8 @@ if test $BACKEND = ldif ; then
        echo "Skipping test of unordered slapadd (unsupported in ldif backend)"
 else
 
-kill -HUP $KILLPIDS
-wait
+kill -HUP $KILLPIDS || exit $?
+wait $KILLPIDS || exit $?
 rm -f $DBDIR1/*
 
 BASE2="ou=test,dc=example,dc=com"
@@ -141,6 +141,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 66aaea6d963ec2231646ec08fb54b3ff18b64824..92e649acc0f49e4f6a276cf9424e1957d827a058 100755 (executable)
@@ -78,6 +78,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 015ddf9d198e4c4177a99b9eec7e1b07ca07574f..cd645ab57e27cf532a1372d295b388efdc040954 100755 (executable)
@@ -150,6 +150,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 1614647a726bf93a9d0bb1f8d496c8c954def0b9..25c32b15f4d8073d4a93ea6183fb480a4c96b222 100755 (executable)
@@ -117,6 +117,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index e7e0d69c0ba4576b0a3bbfd6edc65bbae0507e37..9ebdd422811cb1df1f0e690f65c1dabad7cbbbcc 100755 (executable)
@@ -295,6 +295,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 4dd1a3f0166eff1e3be944580b7402fbdecb87f9..4f4c13f797919acc43be7f42b39d8e5d94b1eca3 100755 (executable)
@@ -926,6 +926,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 1b2fedfecd513da05020b56638cd6f6f17ad5df2..37498dc3b83d4035c2f7727fdbea2575f2eaa226 100755 (executable)
@@ -85,6 +85,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index c943b7454f1873893f5bf0930046806bcfd0cf9f..d7589caa4c97ef0c374138329c6c66eea861caa7 100755 (executable)
@@ -94,6 +94,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index f97f468c60180824311686c7b56ea20f9636e5cc..1e7af14ea91f281b8834408f09570fc7d719ade1 100755 (executable)
@@ -176,6 +176,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 5a8eacffd420f7069bb9d0faa9ac88a381ab8442..3a0389de12e9bd4170f1c12aa69c342b641e7bb6 100755 (executable)
@@ -184,6 +184,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 69710c30496059a32e615b919a9643ed8fd43016..69b565ff1ba76c1e2b99e21f189433c869709b6e 100755 (executable)
@@ -93,6 +93,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 99299473628d73a8b6c4b5e2cfbd266b839cd72b..0d0948842d6a1489458b13b299aae652cb250d7f 100755 (executable)
@@ -78,6 +78,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 6b2c350e3ad1c3a9434d1e53832363ade57ebddc..9d0d9470f9e1dce4fa77936c2b2cc531819a600e 100755 (executable)
@@ -112,6 +112,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 25e0cea255e514a851a2e264fee15d1e2fc3b6d4..2d5e595bb39913b84cfe2efa183afcfd9179145e 100755 (executable)
@@ -458,7 +458,7 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
 
index 396e8ef2d18b4363a268b64bff2bc20c400863f0..287628105f855ef07a99db422e2b2267d5690c50 100755 (executable)
@@ -267,6 +267,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 1521fa7c2973aab4c5ffc89bed8d797890a88b1e..0248bfc139039773d47418dbc48397cce19c3552 100755 (executable)
@@ -192,6 +192,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 5bcf9371fd5aae12a2232753b324a247817d8cc1..7fc0f38a120941cad1c9cc614edf80b5e754d1ae 100755 (executable)
@@ -351,6 +351,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 0b12face56695d4483e774f12b23f8e64fcbe00d..85f1123ec6607136a1e7b93b8b3fc67c8f75579f 100755 (executable)
@@ -156,7 +156,7 @@ fi
 
 echo "Stopping the provider, sleeping 10 seconds and restarting it..."
 kill -HUP "$PID"
-wait $PID
+wait $PID || { kill -HUP $KILLPIDS; exit 1; }
 sleep 10
 echo "RESTART" >> $LOG1
 $SLAPD -f $CONF1 -h $URI1 -d $LVL >> $LOG1 2>&1 &
@@ -365,7 +365,7 @@ fi
 
 echo "Stopping consumer to test recovery..."
 kill -HUP $CONSUMERPID
-wait $CONSUMERPID
+wait $CONSUMERPID || { kill -HUP $KILLPIDS; exit 1; }
 
 echo "Modifying more entries on the provider..."
 $LDAPMODIFY -v -D "$MANAGERDN" -H $URI1 -w $PASSWD >> \
@@ -543,6 +543,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 13514fcb51de126b14da886b09d260656d06b78d..008fa90b3679f493a93d9cea3998453aa839b35e 100755 (executable)
@@ -482,6 +482,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index e73a3f1c7cac741d350c3e06569c4a4c6e6ca29e..6191b714fafa6fe2e9897b60fcf4a36ac44ac08f 100755 (executable)
@@ -158,7 +158,7 @@ grep "query template" $LOG2 > /dev/null
 RC=$?
 if test $RC != 0 ; then
        echo "Debug messages unavailable, remaining test skipped..."
-       test $KILLSERVERS != no && kill -HUP $KILLPIDS && wait
+       test $KILLSERVERS != no && { kill -HUP $KILLPIDS && wait $KILLPIDS || exit $?; }
        exit 0
 fi
 
@@ -638,6 +638,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 67b1946cbc2f393ed3dbcf4d1f529d1b8e85bdd8..4b1118542e9aab36f9df80313101164a1fd81bbf 100755 (executable)
@@ -320,6 +320,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 78a8291cbf3e95b18d86797a1018963dca912c06..64bf34b86532cf2e9db6a8b2d234352544fce0a5 100755 (executable)
@@ -977,6 +977,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index db8c8d556847f7918d9c0d464fa271077f4815cc..7606918e87c241f855563252608222542ba3a0c4 100755 (executable)
@@ -271,6 +271,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 6d5e141b7a2333955b39bd3dc612cb06cc66c831..6a5d1890b968dbebce843fc8a6f189d1cf1f140d 100755 (executable)
@@ -866,6 +866,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 8a211111db4a43f50194e898e093fae61eadf015..8757eccabc67a594bc6b050ab7129c752abc5afb 100755 (executable)
@@ -751,7 +751,7 @@ esac
 
 if test $MAINDB != maindb ; then
                # only mdb currently supports pagedResults control
-               test $KILLSERVERS != no && kill -HUP $KILLPIDS && wait
+               test $KILLSERVERS != no && { kill -HUP $KILLPIDS && wait $KILLPIDS || exit $?; }
 
                echo ">>>>> Test succeeded"
                exit 0
@@ -1415,6 +1415,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 49dc022e549f2254a9eba81ce97deadb28c9adfc..decc43926d05903a7d69fa74daf6f4a5e0333a01 100755 (executable)
@@ -175,6 +175,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 150947a4a4b8be197f54c6f658ae0334df26aa4f..460ad73fe256233dd6f4666c867c9ff75934b823 100755 (executable)
@@ -75,8 +75,8 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-kill -HUP $KILLPIDS
-wait
+kill -HUP $KILLPIDS || exit $?
+wait $KILLPIDS || exit $?
 
 echo "Filtering ldapsearch results..."
 $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
@@ -170,6 +170,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 444f7725d27f9218c3a1097e730ae9f1befcdee3..b2c01b7cad274898f44fc570050bf21f6a6c2527 100755 (executable)
@@ -268,6 +268,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index c1de72042c7220cc365b9f13a40a09f7f812bcb7..c33e2999d0749e1f6a7912badc3de49ee63da52f 100755 (executable)
@@ -219,6 +219,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 1184ad62c50ca5183dbd4e0186d664b270c4ffec..0a4318b57798ea0e9853c3ed9e00e2769e25b14f 100755 (executable)
@@ -75,7 +75,7 @@ for RELAY in $RELAYS ; do
                first=0
        else
                echo ">>>>> waiting for things to exit"
-               test $KILLSERVERS != no && wait
+               test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
                echo ""
 
                mv -f $LOG1 $tmpfile
@@ -93,6 +93,6 @@ done
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 3718b5bd686caef18e10ebba1b076e4305864771..d64033df324b9be78d7993f1eb720c405cde821d 100755 (executable)
@@ -325,6 +325,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 99daaab85c335b486547bae126b84643217f742b..2d15dc7aba88ef01ceb8c09a9f9a76b7a004f4dd 100755 (executable)
@@ -335,6 +335,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 5b4eb21a1b886d2eb2306c8144053b88498b68b0..b2cc53a7f0ac842216f5862b92fc7ad4b4c85004 100755 (executable)
@@ -184,6 +184,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index bb100b644a327d6ba34615ae4d4cb89162e9879e..9485d1be9684ed17bfd8288c40430ff3177bd7ca 100755 (executable)
@@ -812,6 +812,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 6eb050355b9c5690a9576f1d1f00bdd3a2eb1d17..a3d2315d14355a746980d674d778cf7a068e5b6e 100755 (executable)
@@ -734,6 +734,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 69fb98bb7841fb85d2d0361b2cf2f5232a326523..cf29f213bbfc8fa3e06814f38cd11c2585365a15 100755 (executable)
@@ -220,6 +220,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 1c12e0d59f226957c5d258d1a808e1fec66496bc..359dc052f50f508ed594c2a23922840541ecb46a 100755 (executable)
@@ -214,6 +214,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 43a6ef99a7a424b0c51f3803ff8b90d37216f15e..72c5cfd9223509cfd92a47b8ce19e61cdea68b44 100755 (executable)
@@ -107,6 +107,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 6429aeda4ad0230be90cf80d3a743630bdaa8659..12df9a9507415ff71e59ef9d40d476f0f3984fd9 100755 (executable)
@@ -226,6 +226,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index bde4812da4f5f503d788be71e78321c7208415e7..57a07d36cb0178d767129fd1e8f6ceebf2fab4c0 100755 (executable)
@@ -204,6 +204,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 2147f99f20d066687a08c0753962c5bf6d8e1ee9..546ad947a7b51fa0fea4aff4b6cb9152558e9780 100755 (executable)
@@ -253,6 +253,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index cd449c963dffe842e1abf493bb0ed649791e08df..4951cc98adccda5f2fc7e7ff5f72b60697daf693 100755 (executable)
@@ -222,7 +222,7 @@ fi
 
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 echo ">>>>> Test succeeded"
 
index 1844563985d7e1a0765c3896f4833c978fd68946..33571cfa23e5b643e3ccfbdb2c1c63242d7d74df 100755 (executable)
@@ -131,7 +131,7 @@ sleep $SLEEP1
 
 echo "Stopping the provider, sleeping 10 seconds and restarting it..."
 kill -HUP "$PID"
-wait $PID
+wait $PID || { kill -HUP $KILLPIDS; exit 1; }
 sleep 10
 echo "RESTART" >> $LOG1
 $SLAPD -f $CONF1 -h $URI1 -d $LVL >> $LOG1 2>&1 &
@@ -299,7 +299,7 @@ fi
 
 echo "Stopping consumer to test recovery..."
 kill -HUP $CONSUMERPID
-wait $CONSUMERPID
+wait $CONSUMERPID || { kill -HUP $KILLPIDS; exit 1; }
 KILLPIDS="$PID"
 
 echo "Modifying more entries on the provider..."
@@ -408,7 +408,7 @@ fi
 
 echo "Stopping consumer to test recovery after logpurge expired..."
 kill -HUP $CONSUMERPID
-wait $CONSUMERPID
+wait $CONSUMERPID || { kill -HUP $KILLPIDS; exit 1; }
 KILLPIDS="$PID"
 
 echo "Modifying even more entries on the provider..."
@@ -534,6 +534,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 328fbc421b041d566217f30aed627ac405e65fa5..7f76f89fdf657053ec414f12b0dec103d8ea37c3 100755 (executable)
@@ -1119,6 +1119,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 8f935bfc2504d944fc4099c5ff1eebee386d32b0..74a11b9099940a3af574b822e6a76e4aa3c361bd 100755 (executable)
@@ -237,7 +237,7 @@ fi
 CHECK=`expr $CHECK + 1`
 echo "$CHECK > Stopping the provider, sleeping $SLEEP2 seconds and restarting it..."
 kill -HUP "$PROVIDERPID"
-wait $PROVIDERPID
+wait $PROVIDERPID || { kill -HUP $KILLPIDS; exit 1; }
 sleep $SLEEP2
 
 echo "======================= RESTART =======================" >> $LOG1
@@ -427,7 +427,7 @@ fi
 CHECK=`expr $CHECK + 1`
 echo "$CHECK > Stopping proxy to test recovery..."
 kill -HUP $PROXYPID
-wait $PROXYPID
+wait $PROXYPID || { kill -HUP $KILLPIDS; exit 1; }
 
 echo "Modifying more entries on the provider..."
 $LDAPMODIFY -v -D "$MANAGERDN" -H $URI1 -w $PASSWD >> \
@@ -623,7 +623,7 @@ fi
 CHECK=`expr $CHECK + 1`
 echo "$CHECK > Stopping consumer to test recovery..."
 kill -HUP $CONSUMERPID
-wait $CONSUMERPID
+wait $CONSUMERPID || { kill -HUP $KILLPIDS; exit 1; }
 
 echo "Modifying more entries on the provider..."
 $LDAPMODIFY -v -D "$MANAGERDN" -H $URI1 -w $PASSWD >> \
@@ -817,6 +817,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 8898fc12395f0ef531396d078d666befcfbc8160..cd300462e4a725b250dd90ca63dfa6aa3dec4fbe 100755 (executable)
@@ -570,6 +570,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index ae70315fad5625ded8d542b2736c9b7808f730d2..ba24af8096c82dec45b063ec086e2372da449340 100755 (executable)
@@ -749,6 +749,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index ca593de22f4efacf1e937c4afc144760cbd029a2..aa723be570017df1093d0f33bc8dedb3c9f9eff2 100755 (executable)
@@ -214,7 +214,7 @@ fi
 CHECK=`expr $CHECK + 1`
 echo "$CHECK > Stopping the provider, sleeping $SLEEP2 seconds and restarting it..."
 kill -HUP "$PROVIDERPID"
-wait $PROVIDERPID
+wait $PROVIDERPID || { kill -HUP $KILLPIDS; exit 1; }
 sleep $SLEEP2
 
 echo "======================= RESTART =======================" >> $LOG1
@@ -398,8 +398,8 @@ fi
 CHECK=`expr $CHECK + 1`
 echo "$CHECK > Stopping consumer to test recovery..."
 kill -HUP $P1CONSUMERPID $R1CONSUMERPID
-wait $P1CONSUMERPID
-wait $R1CONSUMERPID
+wait $P1CONSUMERPID || { kill -HUP $KILLPIDS; exit 1; }
+wait $R1CONSUMERPID || { kill -HUP $KILLPIDS; exit 1; }
 
 echo "Modifying more entries on the provider..."
 $LDAPMODIFY -v -D "$MANAGERDN" -H $URI1 -w $PASSWD >> \
@@ -591,6 +591,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 486057829a2506b26b94d8b41dfa55b9482351bf..f73b086bb4f249ba03dbc04dc89b734e97382c85 100755 (executable)
@@ -414,6 +414,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 389b9c0f5b445e170e1e59e0953c6f8b67c7d298..708dab24ffce7d1415ddd8964f14e245f96bd74c 100755 (executable)
@@ -639,7 +639,7 @@ kill -HUP $KILLPIDS
 
 # kill!
 # test $KILLSERVERS != no && wait
-wait
+wait $KILLPIDS || exit $?
 
 echo "Restarting servers..."
 KILLPIDS=""
@@ -789,6 +789,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 02edd9c56646759db6deed09796d3d12864d9570..fe4e9e3305c186b2202780d88a39f42814d6b221 100755 (executable)
@@ -112,6 +112,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 28a8cfdda2ae3a59a16e9cee7da544b3c5804f7f..affbd5025c393e71002d1705bb01258b43bcfaf2 100755 (executable)
@@ -514,6 +514,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index f3036c241dd9289983f021ef718c6e811bcd373f..a76188c90005ce196ac94a4ceb20f70123f50e31 100755 (executable)
@@ -509,7 +509,7 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-test $KILLSERVERS != no && kill -HUP $KILLPIDS
+test $KILLSERVERS != no && { kill -HUP $KILLPIDS && wait $KILLPIDS || exit $?; }
 test "$lock_bug" = 2   && exit 2
 
 echo ">>>>> Test succeeded"
index 5f402c9e35c45b1eecf23bb7e75219603abf59b9..822a225f7a0600a1fe6f9d3c205d7ef545c95bb2 100755 (executable)
@@ -118,6 +118,8 @@ C1PID=$!
 $LDAPADD -D "$MANAGERDN" -H $URI1 -w $PASSWD < \
        $MORELDIF > $TESTOUT2 2>&1 &
 C2PID=$!
+# These two are explicitly racing on certain entries, so can legitimately
+# exit != 0 under normal circumstances
 wait $C1PID $C2PID
 
 echo "Waiting $SLEEP1 seconds for syncrepl to receive changes..."
@@ -125,7 +127,7 @@ sleep $SLEEP1
 
 echo "Stopping the provider, sleeping 10 seconds and restarting it..."
 kill -HUP "$PID"
-wait $PID
+wait $PID || { kill -HUP $KILLPIDS; exit 1; }
 sleep 10
 echo "RESTART" >> $LOG1
 $SLAPD -f $CONF1 -h $URI1 -d $LVL >> $LOG1 2>&1 &
@@ -261,7 +263,7 @@ sleep $SLEEP1
 
 echo "Stopping consumer to test recovery..."
 kill -HUP $CONSUMERPID
-wait $CONSUMERPID
+wait $CONSUMERPID || { kill -HUP $KILLPIDS; exit 1; }
 
 echo "Modifying more entries on the provider..."
 $LDAPMODIFY -v -D "$MANAGERDN" -H $URI1 -w $PASSWD >> \
@@ -372,6 +374,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 1c3e5fa18a676774ef956e9b1be68ca4af76b1d5..3d21eccca3b9ab327ef7fc3c7a87a8c27c295b3b 100755 (executable)
@@ -112,6 +112,6 @@ esac
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 380b752028a7273621d918a5e65b9a3587b02a0c..a8af29aa663e087c59e0d83e2dc0711d72c793da 100755 (executable)
@@ -156,7 +156,7 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
 
index a380278513ca63456b8920f4897e75238b32c161..c970a4cfef63c5767e876f09d3f0101f5639d494 100755 (executable)
@@ -275,6 +275,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 11bc46da2f9d0c683d4e501211ad7c48ca2138d7..31284adce7465c48eccce9ad3134a223bbc0bca8 100755 (executable)
@@ -946,7 +946,7 @@ ERRORS=0
 # values unless the bug in ITS#5597 have been fixed.
 echo "Stopping site1 provider..."
 kill -HUP "$SM1_PID"
-wait "$SM1_PID"
+wait "$SM1_PID" || { kill -HUP $KILLPIDS; exit 1; }
 KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $SM1_PID / /"`;
 SM1_PID=
 
@@ -1293,7 +1293,7 @@ fi
 if test $CSN_ERRORS != 0 ; then
        echo "Stopping all servers to synchronize contextCSN..."
        kill -HUP  $KILLPIDS
-       for pid in $KILLPIDS ; do wait $pid ; done
+       for pid in $KILLPIDS ; do wait $pid || exit $? ; done
        KILLPIDS=
 
        echo "Restarting site1 provider slapd on TCP/IP port $PORT2..."
@@ -1379,7 +1379,7 @@ if test $CSN_ERRORS != 0 ; then
 
        echo "Stopping site1 and site2 provider..."
        kill -HUP  $SM1_PID $SM2_PID
-       for pid in $SM1_PID $SM2_PID ; do wait $pid ; done
+       for pid in $SM1_PID $SM2_PID ; do wait $pid || exit $? ; done
        KILLPIDS=" $SMC_PID"
 
        echo "Restarting site1 provider slapd on TCP/IP port $PORT2..."
@@ -2041,7 +2041,7 @@ echo "Checking contextCSN after modify of second backend on site2 provider..."
 # connection has been set up when site2 provider receives the database:
 echo "Stopping central provider and site2 servers to test start with empty db..."
 kill -HUP  $SMC_PID $SM2_PID $SS2_PID
-for pid in $SMC_PID $SM2_PID $SS2_PID; do wait $pid ; done
+for pid in $SMC_PID $SM2_PID $SS2_PID; do wait $pid || exit $? ; done
 KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $SMC_PID / /"`;
 KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $SM2_PID / /"`;
 KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $SS2_PID / /"`;
@@ -2219,7 +2219,7 @@ if test $RC != 0 ; then
 
        echo "Restarting central provider slapd on TCP/IP port $PORT1..."
        kill -HUP $SMC_PID
-       wait $SMC_PID
+       wait $SMC_PID || { kill -HUP $KILLPIDS; exit 1; }
        KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $SMC_PID / /"`;
 
        cd $SMC_DIR
@@ -2285,7 +2285,7 @@ if test $RC != 0 ; then
 
        echo "Restarting central search slapd on TCP/IP port $PORT4..."
        kill -HUP $SSC_PID
-       wait $SSC_PID
+       wait $SSC_PID || { kill -HUP $KILLPIDS; exit 1; }
        KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $SSC_PID / /"`;
 
        cd $SSC_DIR
@@ -2355,7 +2355,7 @@ while test $RACE_ERROR -eq 0 -a $RACE_NUM -lt $RACE_TESTS ; do
 
        echo "Stopping central provider..."
        kill -HUP $SMC_PID
-       wait $SMC_PID
+       wait $SMC_PID || { kill -HUP $KILLPIDS; exit 1; }
        KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $SMC_PID / /"`;
 
        MNUM=`expr $MNUM + 1`
@@ -2408,7 +2408,7 @@ EOF
 
        echo "Stopping central provider..."
        kill -HUP $SMC_PID
-       wait $SMC_PID
+       wait $SMC_PID || { kill -HUP $KILLPIDS; exit 1; }
        KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $SMC_PID / /"`;
 
        echo "Using ldapdelete to delete entry on site1 provider..."
@@ -2470,7 +2470,7 @@ else
        echo "No race errors found after $RACE_TESTS iterations"
 fi
 
-test $KILLSERVERS != no && kill -HUP $KILLPIDS
+test $KILLSERVERS != no && { kill -HUP $KILLPIDS && wait $KILLPIDS || exit $?; }
 
 if test $ERRORS -ne 0; then
        echo "Found $ERRORS errors"
index cf9aa4db2cd4056b94996e83ba73e42c27242b01..415be62d1e6aafe2dd304135200d406aef9a0b63 100755 (executable)
@@ -453,6 +453,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 91e82abbb1ab18f511af512290704dbe20c1dff0..b0f7e4c26a6ca52d488bd997c61aef8fde7f1169 100755 (executable)
@@ -292,7 +292,7 @@ if test $RC != 0 ; then
 fi
 
 
-test $KILLSERVERS != no && kill -HUP $KILLPIDS
+test $KILLSERVERS != no && { kill -HUP $KILLPIDS && wait $KILLPIDS || exit $?; }
 
 echo ">>>>> Test succeeded"
 
index 823d64f9ab9b858ffdf72ea325a0be0e03f1acc9..e2a0b21bc3db1b2e51534e8996a99f27d85c0f7c 100755 (executable)
@@ -353,7 +353,7 @@ while test $ERROR -eq 0 -a $RACE_NUM -lt $INITIATION_RACE_TESTS ; do
        echo "Stopping forwarders for add test"
        for pid in $FWD1_PID; do
                kill -HUP $pid
-               wait $pid
+               wait $pid || { kill -HUP $KILLPIDS; exit 1; }
                KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $pid / /"`;
        done
 
@@ -434,7 +434,7 @@ EOF
        echo "Stopping forwarders for add/delete test"
        for pid in $FWD1_PID; do
                kill -HUP $pid
-               wait $pid
+               wait $pid || { kill -HUP $KILLPIDS; exit 1; }
                KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $pid / /"`;
        done
 
@@ -561,7 +561,7 @@ EOF
        echo "Stopping forwarders for delete test"
        for pid in $FWD1_PID; do
                kill -HUP $pid
-               wait $pid
+               wait $pid || { kill -HUP $KILLPIDS; exit 1; }
                KILLPIDS=`echo "$KILLPIDS " | sed -e "s/ $pid / /"`;
        done
 
index cc453be32e72202a8578e3d5cfc47f2cc870d801..a938cce297a6bbb278c82ec38bb902cfac1ac785 100755 (executable)
@@ -178,6 +178,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 4465405ba28403ebe710f37e5262598c9ee7ace3..62303910a71fbe6fae0f8d87a313219fcd14fc5e 100755 (executable)
@@ -614,6 +614,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index c7277a27bba543e5b92233f6467fc675866ac0b9..6a5fa2dc4cd63336a33188d08bc019383d70bf6f 100755 (executable)
@@ -264,6 +264,6 @@ test $KILLSERVERS != no && kill -HUP $PID
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 4aa2b7b2d2150947c2be15c387cb9f6e24cdc878..f1c59006c2f20aefb433253b4baccd49c2ffaf16 100755 (executable)
@@ -250,6 +250,6 @@ echo "Test succeeded"
 
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index e254b1f307cfe312fd266490b6c753d178caf5d9..f2376754807bb77e3b796c11ff56a287e77e1a75 100755 (executable)
@@ -341,6 +341,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 5a26682f649dc2cd855c17e88ff2d486b6a5cf93..a16543e1f2bd00883c3dd9edc887aef793118f19 100755 (executable)
@@ -299,6 +299,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 echo ">>>>> Test succeeded"
 RC=0
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit $RC
index edd3323292dbd99a6ccecd0101ab959f918a6286..7a51ac74165f6b733c34b1c69ca857e21a7ce1c4 100755 (executable)
@@ -125,6 +125,6 @@ else
        RC=0
 fi
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit $RC
index b31ffeb3c77b44476389dc286d7267f41aa1c7e3..baf2113843e3f1fa8ecb1c67d69d4dc6e75210a0 100755 (executable)
@@ -576,6 +576,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index a76019724801c1db5da7f5a31a5e346f2878cca8..64d3c5001f4590e4d7293257a9f59225993b9dd6 100755 (executable)
@@ -572,6 +572,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 5ea72a3532eac1522889855c4956030cd369892a..42620d5b894f6c0a269e610a7049e648d421d7c0 100755 (executable)
@@ -372,6 +372,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 4c22b1076d648d64c55ea34283047b114edbe6b2..3f6c0b712e8d5540a0887f5f5b7e8e27f95b206b 100755 (executable)
@@ -326,6 +326,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 96dd07cb2b01bebdb9d0df2c3fbc2e1b37c827e8..9a40f7d16c624130c1b9c338a746ef39296e19af 100755 (executable)
@@ -615,6 +615,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index ee124bbd6c509e5475924a5eb6090e57af636f70..62e6efbd1e22503a57fe8234ac06b8f82e72890e 100755 (executable)
@@ -221,6 +221,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 952c7613a714b2968de9af0c3c1e3dc60bd23d89..23f53887c7b2063eb7cd253bfff739963653af20 100755 (executable)
@@ -155,7 +155,7 @@ fi
 
 echo "Stopping the provider, sleeping 10 seconds and restarting it..."
 kill -HUP "$PID"
-wait $PID
+wait $PID || { kill -HUP $KILLPIDS; exit 1; }
 sleep 10
 echo "RESTART" >> $LOG1
 dsadm start $DBDIR1
@@ -316,7 +316,7 @@ fi
 
 echo "Stopping consumer to test recovery..."
 kill -HUP $CONSUMERPID
-wait $CONSUMERPID
+wait $CONSUMERPID || { kill -HUP $KILLSERVERS; exit 1; }
 
 echo "Modifying more entries on the provider..."
 $LDAPMODIFY -v -D "$DSEEDN" -H $URI1 -w $DSEEPW >> \
@@ -416,6 +416,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 976af8c9dbfb6555f45a06743592b35e3a0848b0..68d8d435044242011cb2f4a7c6d33c96b7281e59 100755 (executable)
@@ -648,6 +648,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 04356a338d89e2b0030baef34f7344e6d5993315..f364bd24078e67700818c6d557e6a9aac703e2c1 100755 (executable)
@@ -255,6 +255,6 @@ else
        RC=0
 fi
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit $RC
index 1959e001d9f346d95958f73b307ff4a2c398068e..8755e17420d8e692d776af9fbd0047cff7911ed4 100755 (executable)
@@ -366,8 +366,8 @@ fi
 
 
 echo "Restarting servers..."
-kill -HUP $KILLPIDS
-wait
+kill -HUP $KILLPIDS || exit $?
+wait $KILLPIDS || exit $?
 KILLPIDS=""
 n=1
 while [ $n -le $MMR ]; do
@@ -647,6 +647,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 988d91c74c81b78132814a6c4d876382d5fd0236..bc8c3e946eecd76f2428757df3c2a3714542c97f 100755 (executable)
@@ -369,6 +369,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index cbaca3e552f058d4adae66ed75632117e67e574e..05893cc8b7729e10de88611e7f8bafbcea78d6a8 100755 (executable)
@@ -470,7 +470,7 @@ fi
 
 echo "Stopping provider..."
 kill -HUP $PROVIDERPID
-wait $PROVIDERPID
+wait $PROVIDERPID || { kill -HUP $KILLPIDS; exit 1; }
 KILLPIDS="$CONSUMERPID"
 
 echo "Testing that successful chaining is mandatory..."
@@ -503,6 +503,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index af9d63922d3ea5cf72f04e8bda51fbba44985409..9858e061c79cfa4f578e7b6b1da428861b352fc6 100755 (executable)
@@ -138,6 +138,6 @@ else
     echo ">>>>> Test succeeded"
 fi
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit $RC
index 40760a64a9a3f63211ea266fbfbf2164790d4540..8099eb1081ea210be7f7d5e23414b08f5eda2073 100755 (executable)
@@ -413,6 +413,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 42f0760ce6a1ccc30b335192aba75e4109d7555c..9e6a35659a5c9f7629cb31f1f87c05d09fe8260a 100755 (executable)
@@ -154,6 +154,6 @@ test $KILLSERVERS != no && kill -HUP $PID
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 1ba07bf746c3a0ddf9066bc9e17d5528d7a7b0be..29579b7c4c48642671722cb117221af683736961 100755 (executable)
@@ -87,7 +87,7 @@ fi
 
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 echo ">>>>> Test succeeded"
 
index 3451fa4d3389d647774ce140ab019e6b66953d16..f0d81329f80c1da6fd6105071d2e4b2b15cd333d 100755 (executable)
@@ -136,7 +136,7 @@ fi
 
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 echo ">>>>> Test succeeded"
 
index 0fd0d73eb033b32cafa8b62e0f616d3b445c2e21..6b1d089f4cb5bbc22f964a438fe09ba3b88a6844 100755 (executable)
@@ -596,6 +596,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 8e52b93182885b97f9476c0e8817faaeaf7c880b..62fafd244ea729dc74da255bd26da66c5f890311 100755 (executable)
@@ -568,7 +568,7 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-test $KILLSERVERS != no && kill -HUP $KILLPIDS
+test $KILLSERVERS != no && { kill -HUP $KILLPIDS && wait $KILLPIDS || exit $?; }
 
 echo ">>>>> Test succeeded"
 exit 0
index 42b56a261c563090efa1c1e6afd0f5375504d2f4..5d59c2277f085b1228fdae1e4130a9511d20cc44 100755 (executable)
@@ -429,7 +429,7 @@ echo ">>>>> Test succeeded (first half)"
 if [ "$MEMBEROF" = memberofno ]; then
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
-       test $KILLSERVERS != no && wait
+       test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
        exit 0
 fi
@@ -694,6 +694,6 @@ fi
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 95fa35d0dd0e2cb30cfa529d596a5b073b4a3f2b..2e344cce189fa45e5237d4c47cffe62d849d2a1f 100755 (executable)
@@ -349,7 +349,7 @@ EOF
        echo "Verifying entry was logged to named pipe..."
        sleep 1
        kill $CATPID 2>/dev/null
-       wait $CATPID 2>/dev/null
+       wait $CATPID 2>/dev/null || { kill -HUP $KILLSERVERS; exit 1; }
 
        if [ ! -f $TESTDIR/pipe.log ]; then
                echo "Named pipe log file was not created!"
@@ -414,6 +414,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 62be860ce17c0b2d3fc95f4d490f6a9c96671117..57d6347ef216a36b4b3a84bd77e99415f35faf76 100755 (executable)
@@ -341,6 +341,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0
index 3534a637c26961908faa2e6d1e44d00f597523e7..9fd11a32fb6ae0144806a8b54d2d7d1c3220916f 100755 (executable)
@@ -294,6 +294,6 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
 
-test $KILLSERVERS != no && wait
+test $KILLSERVERS != no && { wait $KILLPIDS || exit $?; }
 
 exit 0