]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test047-ldap
Merge remote branch 'origin/mdb.master'
[openldap] / tests / scripts / test047-ldap
index 66322df5496bdce0ea43e49e6baa87f2fcc74492..ea4827c4d000a51ec4cd422b57ee2ea238f7553f 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2009 The OpenLDAP Foundation.
+## Copyright 1998-2012 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -485,14 +485,14 @@ $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT3 \
        -b "$BASEDN" "(objectClass=*)" 1.1 \
        >> $TESTOUT 2>&1
 RC=$?
-case $RC in 
-       0)
+case $RC,$BACKEND in
+       4,* | 0,null)
+       ;;
+       0,*)
                echo "Search should have failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit -1
        ;;
-       4)
-       ;;
        *)
                echo "Search failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
@@ -509,14 +509,14 @@ $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT3 \
        -b "$BASEDN" -z 2 "(objectClass=*)" 1.1 \
        >> $TESTOUT 2>&1
 RC=$?
-case $RC in 
-       0)
+case $RC,$BACKEND in
+       4,* | 0,null)
+       ;;
+       0,*)
                echo "Search should have failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit -1
        ;;
-       4)
-       ;;
        *)
                echo "Search failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
@@ -680,13 +680,15 @@ RC=$?
 #      test $KILLSERVERS != no && kill -HUP $KILLPIDS
 #      exit $RC
 #fi
-case $RC in 
-       0)
+case $RC,$BACKEND in
+       0,null)
+       ;;
+       0,*)
                echo "WhoAmI should have failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit -1
        ;;
-       51)
+       51,*)
                echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
        ;;
        *)
@@ -703,13 +705,15 @@ RC=$?
 #      test $KILLSERVERS != no && kill -HUP $KILLPIDS
 #      exit $RC
 #fi
-case $RC in 
-       0)
+case $RC,$BACKEND in
+       0,null)
+       ;;
+       0,*)
                echo "WhoAmI should have failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit -1
        ;;
-       51)
+       51,*)
                echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
        ;;
        *)
@@ -726,16 +730,18 @@ RC=$?
 #      test $KILLSERVERS != no && kill -HUP $KILLPIDS
 #      exit -1
 #fi
-case $RC in 
-       6)
+case $RC,$BACKEND in
+       5,null)
        ;;
-       51)
+       6,*)
+       ;;
+       51,*)
                echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
        ;;
        *)
                echo "Compare failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
-               exit $RC
+               exit 1
        ;;
 esac