]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test020-proxycache
ITS#3671 must release conn->c_mutex to allow blocked writers to exit
[openldap] / tests / scripts / test020-proxycache
index f1370aedb0fbb2652f2ded7d1c244ba338115346..a4eace2ca7bf7b5d9aec21e8ccdf289b3e087ed9 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-2005 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -23,6 +23,11 @@ if test $PROXYCACHE = pcacheno; then
        exit 0
 fi 
 
+if test $BACKLDAP = "ldapno" ; then 
+       echo "LDAP backend not available, test skipped"
+       exit 0
+fi 
+
 mkdir -p $TESTDIR $DBDIR1 $DBDIR2
 
 # Test proxy caching:
@@ -94,6 +99,12 @@ for i in 0 1 2 3 4 5; do
        sleep 5
 done
 
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
+
 echo "Making queries on the proxy cache..." 
 echo "Query 1: filter:(sn=Jon) attrs: all" 
 $LDAPSEARCH -x -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
@@ -145,7 +156,7 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-echo "Query 6: filter:(mail=*@example.com) cn sn title uid"  
+echo "Query 6: filter:(mail=*@mail.alumni.example.com) cn sn title uid"  
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \
        'mail=*@mail.alumni.example.com' cn sn title uid >> $SLAVEOUT 2>&1
 RC=$?