From: Hallvard Furuseth Date: Sun, 29 Nov 2009 22:27:34 +0000 (+0000) Subject: ITS#6406: Return failure instead of $? when a program unexpectedly succeeded X-Git-Tag: ACLCHECK_0~44 X-Git-Url: https://git.sur5r.net/?p=openldap;a=commitdiff_plain;h=33f9ebb92fdcff52eca383f5919903cc5ad0753d ITS#6406: Return failure instead of $? when a program unexpectedly succeeded --- diff --git a/tests/scripts/relay b/tests/scripts/relay index bf88c15167..825d2122f2 100755 --- a/tests/scripts/relay +++ b/tests/scripts/relay @@ -389,7 +389,7 @@ RC=$? if test $RC != 6 && test $RC,$BACKEND != 5,null ; then echo "Compare failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi test $KILLSERVERS != no && kill -HUP $KILLPIDS diff --git a/tests/scripts/test014-whoami b/tests/scripts/test014-whoami index c1dec3f287..8f90ed43fc 100755 --- a/tests/scripts/test014-whoami +++ b/tests/scripts/test014-whoami @@ -437,7 +437,7 @@ RC=$? if test $RC != 1 ; then echo "ldapwhoami failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi BINDDN="dc=example,dc=com" diff --git a/tests/scripts/test016-subref b/tests/scripts/test016-subref index 7cdee8668c..79d2eb6bab 100755 --- a/tests/scripts/test016-subref +++ b/tests/scripts/test016-subref @@ -87,7 +87,7 @@ RC=$? if test $RC != $RCODE ; then echo "ldapsearch: unexpected result ($RC)! (referral expected)" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi XREFDN="$REFDN" @@ -125,7 +125,7 @@ RC=$? if test $RC != $RCODE ; then echo "ldapsearch: unexpected result ($RC)! (referral expected)" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi echo "Testing one-level searching at $XREFDN..." @@ -134,7 +134,7 @@ RC=$? if test $RC != $RCODE ; then echo "ldapsearch: unexpected result ($RC)! (referral expected)" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi echo "Testing subtree searching at $XREFDN..." @@ -143,7 +143,7 @@ RC=$? if test $RC != $RCODE ; then echo "ldapsearch: unexpected result ($RC)! (referral expected)" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi XREFDN="uid=xxx,o=abc,$REFDN" @@ -153,7 +153,7 @@ RC=$? if test $RC != $RCODE ; then echo "ldapsearch: unexpected result ($RC)! (referral expected)" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi echo "Testing one-level searching at $XREFDN..." @@ -162,7 +162,7 @@ RC=$? if test $RC != $RCODE ; then echo "ldapsearch: unexpected result ($RC)! (referral expected)" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi echo "Testing subtree searching at $XREFDN..." @@ -171,7 +171,7 @@ RC=$? if test $RC != $RCODE ; then echo "ldapsearch: unexpected result ($RC)! (referral expected)" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi test $KILLSERVERS != no && kill -HUP $KILLPIDS diff --git a/tests/scripts/test017-syncreplication-refresh b/tests/scripts/test017-syncreplication-refresh index da4386b565..9de76e3888 100755 --- a/tests/scripts/test017-syncreplication-refresh +++ b/tests/scripts/test017-syncreplication-refresh @@ -307,7 +307,7 @@ RC=$? if test $RC != 10 ; then echo "ldapmodify should have returned referral ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi OPATTRS="entryUUID creatorsName createTimestamp modifiersName modifyTimestamp" diff --git a/tests/scripts/test028-idassert b/tests/scripts/test028-idassert index 59d45db3d8..7ad0f3ad80 100755 --- a/tests/scripts/test028-idassert +++ b/tests/scripts/test028-idassert @@ -119,7 +119,7 @@ RC=$? if test $RC != 1 ; then echo "ldapwhoami should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi AUTHZID="u:bjensen" @@ -129,7 +129,7 @@ RC=$? if test $RC != 1 ; then echo "ldapwhoami should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi echo "Testing ldapwhoami as proxy IT..." @@ -148,7 +148,7 @@ RC=$? if test $RC != 1 ; then echo "ldapwhoami should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi AUTHZID="u:bjorn" @@ -158,7 +158,7 @@ RC=$? if test $RC != 1 ; then echo "ldapwhoami should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi AUTHZID="dn:cn=Sandbox,ou=Admin,dc=example,dc=com" diff --git a/tests/scripts/test032-chain b/tests/scripts/test032-chain index 1e55453fa4..5f78156e00 100755 --- a/tests/scripts/test032-chain +++ b/tests/scripts/test032-chain @@ -161,7 +161,7 @@ for P in $PORT1 $PORT2 ; do if test $RC != 6 && test $RC,$BACKEND != 5,null ; then echo "ldapcompare failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi DN="ou=Other,$BASEDN" @@ -173,7 +173,7 @@ for P in $PORT1 $PORT2 ; do if test $RC != 6 && test $RC,$BACKEND != 5,null ; then echo "ldapcompare failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 fi done diff --git a/tests/scripts/test035-meta b/tests/scripts/test035-meta index d2ba331be5..0f3f7a3f9b 100755 --- a/tests/scripts/test035-meta +++ b/tests/scripts/test035-meta @@ -726,7 +726,7 @@ case $RC,$BACKEND in *) echo "Compare failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 ;; esac diff --git a/tests/scripts/test038-retcode b/tests/scripts/test038-retcode index 41f1ade7cd..ab536863a6 100755 --- a/tests/scripts/test038-retcode +++ b/tests/scripts/test038-retcode @@ -77,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..." @@ -90,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)..." diff --git a/tests/scripts/test046-dds b/tests/scripts/test046-dds index d0af563f1f..d77a459d6c 100755 --- a/tests/scripts/test046-dds +++ b/tests/scripts/test046-dds @@ -444,7 +444,7 @@ case $RC in 0) echo "ldapmodify should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit -1 ;; 50) echo "ldapmodify failed ($RC)" @@ -475,7 +475,7 @@ RC=$? if test $RC = 0 ; then echo "ldapexop should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit -1 fi echo "Trying to refresh the meeting as $JAJDN (should fail)..." @@ -486,7 +486,7 @@ RC=$? if test $RC = 0 ; then echo "ldapexop should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit -1 fi echo "Trying to delete the meeting as $BABSDN (should fail)..." @@ -500,7 +500,7 @@ case $RC in 0) echo "ldapdelete should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit -1 ;; 50) echo "ldapdelete failed ($RC)" diff --git a/tests/scripts/test047-ldap b/tests/scripts/test047-ldap index 492ec9cbc3..4052df856b 100755 --- a/tests/scripts/test047-ldap +++ b/tests/scripts/test047-ldap @@ -741,7 +741,7 @@ case $RC,$BACKEND in *) echo "Compare failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 ;; esac