]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test038-retcode
Merge remote branch 'origin/mdb.master'
[openldap] / tests / scripts / test038-retcode
index 9a626383abe310936e21e9ea3401fd0a1b014d17..bc3c00979c55cfb837e3dbe7e7fd7e98859c832e 100755 (executable)
@@ -2,7 +2,7 @@
 # $Header$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2005 The OpenLDAP Foundation.
+## Copyright 1998-2012 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -50,6 +50,8 @@ if test $WAIT != 0 ; then
 fi
 KILLPIDS="$PID"
 
+sleep 1
+
 echo "Testing slapd searching..."
 for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
@@ -75,7 +77,7 @@ RC=$?
 if test $RC != 3 ; then
        echo "ldapsearch failed ($RC)!"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-       exit $RC
+       exit 1
 fi
 
 echo "Testing modify for unwillingToPerform..."
@@ -88,7 +90,7 @@ RC=$?
 if test $RC != 53 ; then
        echo "ldapmodify failed ($RC)!"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-       exit $RC
+       exit 1
 fi
 
 echo "Testing compare for success after sleep (2 s)..."
@@ -104,4 +106,7 @@ fi
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
+
+test $KILLSERVERS != no && wait
+
 exit 0