X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tests%2Fscripts%2Ftest038-retcode;h=bc3c00979c55cfb837e3dbe7e7fd7e98859c832e;hb=fc1396fa2e94ee2e752fd7c3ea5bb22f6592398a;hp=a1a0d38446da4ba8085be61feef0d4bb2aea958c;hpb=f86daac8c81c2ec9ab82ffee1271cb320ae0ca11;p=openldap diff --git a/tests/scripts/test038-retcode b/tests/scripts/test038-retcode index a1a0d38446..bc3c00979c 100755 --- a/tests/scripts/test038-retcode +++ b/tests/scripts/test038-retcode @@ -2,7 +2,7 @@ # $Header$ ## This work is part of OpenLDAP Software . ## -## 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 \ @@ -68,17 +70,17 @@ if test $RC != 0 ; then exit $RC fi -echo "Testing searching for timelimitExceeded..." +echo "Testing search for timelimitExceeded..." $LDAPSEARCH -b "cn=timelimitExceeded,ou=RetCodes,$BASEDN" \ -h $LOCALHOST -p $PORT1 '(objectClass=*)' >> $TESTOUT 2>&1 RC=$? if test $RC != 3 ; then echo "ldapsearch failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi -echo "Testing modifying for unwillingToPerform..." +echo "Testing modify for unwillingToPerform..." $LDAPMODIFY -D "$MANAGERDN" -w $PASSWD \ -h $LOCALHOST -p $PORT1 >> $TESTOUT 2>&1 << EOMODS dn: cn=unwillingToPerform,ou=RetCodes,$BASEDN @@ -88,10 +90,23 @@ RC=$? if test $RC != 53 ; then echo "ldapmodify failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit 1 +fi + +echo "Testing compare for success after sleep (2 s)..." +$LDAPCOMPARE -h $LOCALHOST -p $PORT1 \ + "cn=Success w/ Delay,ou=RetCodes,$BASEDN" "cn:foo" >> $TESTOUT 2>&1 +RC=$? +if test $RC != 0 ; then + echo "ldapcompare failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC fi test $KILLSERVERS != no && kill -HUP $KILLPIDS echo ">>>>> Test succeeded" + +test $KILLSERVERS != no && wait + exit 0