]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test025-limits
add some failed binds (but don't log too much)
[openldap] / tests / scripts / test025-limits
index 812419d663c0ec24370cf92fe0b3b8896e7947f1..b5137080061e8945f31b8a2ae2f09ed21c4d12ee 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2004 The OpenLDAP Foundation.
+## Copyright 1998-2006 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -47,6 +47,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 \
@@ -84,7 +86,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        *)
@@ -107,7 +109,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        *)
@@ -130,13 +132,13 @@ case $RC in
                        if test "$COUNT" -gt "$SIZELIMIT" ; then
                                echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
                                test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                               exit $RC
+                               exit 1
                        fi
                        echo "...didn't bump into the requested size limit ($SIZELIMIT; got $COUNT entries)"
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -174,13 +176,13 @@ case $RC in
                        if test "$COUNT" -gt "$SIZELIMIT" ; then
                                echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
                                test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                               exit $RC
+                               exit 1
                        fi
                        echo "...didn't bump into the requested size limit ($SIZELIMIT; got $COUNT entries)"
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -219,7 +221,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        3)
@@ -248,7 +250,7 @@ case $RC in
                else
                         echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        4)
@@ -280,13 +282,13 @@ case $RC in
                        if test "$COUNT" -gt "$SIZELIMIT" ; then
                                echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
                                test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                               exit $RC
+                               exit 1
                        fi
                        echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -322,13 +324,13 @@ case $RC in
                        if test "$COUNT" -gt "$SIZELIMIT" ; then
                                echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
                                test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                               exit $RC
+                               exit 1
                        fi
                        echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -364,13 +366,13 @@ case $RC in
                        if test "$COUNT" -gt "$SIZELIMIT" ; then
                                echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
                                test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                               exit $RC
+                               exit 1
                        fi
                        echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -396,13 +398,13 @@ case $RC in
                        if test "$COUNT" -gt "$SIZELIMIT" ; then
                                echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
                                test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                               exit $RC
+                               exit 1
                        fi
                        echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -444,7 +446,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -479,7 +481,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        11)
@@ -508,7 +510,7 @@ case $RC in
                        echo "...error: did not expect ldapsearch success ($RC)!"
                fi
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
-               exit $RC
+               exit 1
        ;;
        11)
                echo "...bumped into unchecked administrative limit"
@@ -534,7 +536,7 @@ case $RC in
                        echo "...error: did not expect ldapsearch success ($RC)!"
                fi
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
-               exit $RC
+               exit 1
        ;;
        11)
                echo "...bumped into unchecked administrative limit"
@@ -559,7 +561,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -591,7 +593,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -623,7 +625,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -655,7 +657,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -687,7 +689,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -718,7 +720,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                       exit $RC
+                       exit 1
                fi
        ;;
        4)
@@ -781,7 +783,7 @@ case $RC in
                else
                         echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        *)
@@ -804,13 +806,13 @@ case $RC in
                         if test "$COUNT" -gt "$SIZELIMIT" ; then
                                 echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
                                 test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                                exit $RC
+                                exit 1
                         fi
                         echo "...didn't bump into the requested size limit ($SIZELIMIT; got $COUNT entries)"
                 else
                         echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        4)
@@ -849,7 +851,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        3)
@@ -878,7 +880,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                fi
        ;;
        4)
@@ -910,13 +912,13 @@ case $RC in
                         if test "$COUNT" -gt "$SIZELIMIT" ; then
                                 echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
                                 test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                                exit $RC
+                                exit 1
                         fi
                         echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
                 else
                         echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        4)
@@ -950,13 +952,13 @@ case $RC in
                         if test "$COUNT" -gt "$SIZELIMIT" ; then
                                 echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
                                 test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                                exit $RC
+                                exit 1
                         fi
                         echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
                 else
                         echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        4)
@@ -990,13 +992,13 @@ case $RC in
                         if test "$COUNT" -gt "$SIZELIMIT" ; then
                                 echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
                                 test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                                exit $RC
+                                exit 1
                         fi
                         echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
                 else
                         echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        4)
@@ -1034,13 +1036,13 @@ case $RC in
                         if test "$COUNT" -gt "$SIZELIMIT" ; then
                                 echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
                                 test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                                exit $RC
+                                exit 1
                         fi
                         echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
                 else
                         echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        4)
@@ -1082,7 +1084,7 @@ case $RC in
                 else
                         echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        4)
@@ -1117,7 +1119,7 @@ case $RC in
                 else
                         echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
 #      11)
@@ -1144,7 +1146,7 @@ case $RC in
                         echo "...error: did not expect ldapsearch success ($RC)!"
                 fi
                 test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                exit $RC
+                exit 1
        ;;
        11)
                echo "...bumped into unchecked administrative limit"
@@ -1173,7 +1175,7 @@ case $RC in
                else
                        echo "...error: did not expect ldapsearch success ($RC)!"
                         test $KILLSERVERS != no && kill -HUP $KILLPIDS
-                        exit $RC
+                        exit 1
                 fi
        ;;
        4)
@@ -1360,4 +1362,7 @@ esac
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
+
+test $KILLSERVERS != no && wait
+
 exit 0