ITS#6406: Return failure instead of $? when a program unexpectedly succeeded

This commit is contained in:
Hallvard Furuseth 2009-11-29 22:27:34 +00:00
parent 492b2cda2b
commit 33f9ebb92f
10 changed files with 24 additions and 24 deletions

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -726,7 +726,7 @@ case $RC,$BACKEND in
*)
echo "Compare failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
exit 1
;;
esac

View file

@ -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)..."

View file

@ -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)"

View file

@ -741,7 +741,7 @@ case $RC,$BACKEND in
*)
echo "Compare failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit $RC
exit 1
;;
esac