Commit dc5d7f3b authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#9617 - Use valid exit values when an error occurs

parent 6463280d
Pipeline #3020 passed with stage
in 49 minutes and 3 seconds
......@@ -82,7 +82,7 @@ case $RC in
0)
echo " ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo " ldapmodify failed ($RC)!"
......
......@@ -107,7 +107,7 @@ $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
if test $? != 0 ; then
echo "comparison failed - modrdn operations did not complete correctly"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
......@@ -134,7 +134,7 @@ $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
if test $? != 0 ; then
echo "comparison failed - modrdn operations did not complete correctly"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
# Ensure that you cannot find the entry for which the rdn was deleted as
......@@ -153,7 +153,7 @@ $CMP $SEARCHOUT - < /dev/null > $CMPOUT
if test $? != 0 ; then
echo "failure: ldapsearch found attribute that was to be removed!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Using ldapsearch to retrieve all the entries..."
......@@ -178,7 +178,7 @@ $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
if test $? != 0 ; then
echo "comparison failed - modrdn operations did not complete correctly"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
# Test that you can use modrdn with an attribute value which was previously
......@@ -218,7 +218,7 @@ $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
if test $? != 0 ; then
echo "comparison failed - modrdn operations did not complete correctly"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Testing modrdn to another database (should fail with affectsMultipleDSAs)"
......@@ -229,7 +229,7 @@ case $RC in
0)
echo "ldapmodrdn succeeded, should have failed!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
71)
;;
......@@ -250,7 +250,7 @@ case $RC in
0)
echo "ldapmodrdn succeeded, should have failed!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
53)
;;
......
......@@ -122,7 +122,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -159,7 +159,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -183,7 +183,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -207,7 +207,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -249,7 +249,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -296,7 +296,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -344,7 +344,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -418,7 +418,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -456,7 +456,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -516,7 +516,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -539,7 +539,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -562,7 +562,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......@@ -604,7 +604,7 @@ case $RC in
0)
echo "ldapmodify should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapmodify failed ($RC)!"
......
......@@ -233,7 +233,7 @@ case $RC in
0)
echo "ldapwhoami should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapwhoami failed ($RC)!"
......@@ -256,7 +256,7 @@ case $RC in
0)
echo "ldapwhoami should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapwhoami failed ($RC)!"
......@@ -394,7 +394,7 @@ case $RC in
0)
echo "ldapwhoami should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapwhoami failed ($RC)!"
......@@ -417,7 +417,7 @@ case $RC in
0)
echo "ldapwhoami should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapwhoami failed ($RC)!"
......
......@@ -116,7 +116,7 @@ RC=$?
if test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
# ITS#6641/8057/8245
......@@ -140,7 +140,7 @@ RC=$?
if test $RC != $RCODEnorelax && test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Trying to bypass uniqueness as a normal user with ManageDSAIt..."
......@@ -163,7 +163,7 @@ RC=$?
if test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Bypassing uniqueness as an admin user..."
......@@ -216,7 +216,7 @@ RC=$?
if test $RC != 0 ; then
echo "Initial configuration is not reported correctly."
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Dynamically trying to add a URI with legacy attrs present...
......@@ -231,7 +231,7 @@ RC=$?
if test $RC != 80 ; then
echo "legacy and unique_uri allowed together"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Dynamically trying to add legacy ignored attrs with legacy attrs present...
......@@ -246,7 +246,7 @@ RC=$?
if test $RC != 80 ; then
echo "legacy attrs and legacy ignore attrs allowed together"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Verifying initial configuration intact...
......@@ -256,7 +256,7 @@ RC=$?
if test $RC != 0 ; then
echo "Initial configuration damaged by unsuccessful modifies."
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Dynamically removing legacy base...
......@@ -270,7 +270,7 @@ RC=$?
if test $RC != 0 ; then
echo "base removal failed"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Verifying base removal...
......@@ -289,7 +289,7 @@ RC=$?
if test $RC != 0 ; then
echo "Configuration damaged by base removal"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Adding a non-unique record..."
......@@ -312,7 +312,7 @@ RC=$?
if test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Trying a legacy base outside of the backend...
......@@ -327,7 +327,7 @@ RC=$?
if test $RC != 80 ; then
echo "out of backend scope base allowed"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Adding and removing attrs..."
......@@ -346,7 +346,7 @@ RC=$?
if test $RC != 0 ; then
echo "Unable to remove an attribute"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Verifying we removed the right attr..."
......@@ -369,7 +369,7 @@ RC=$?
if test $RC != $RCODEconstraint ; then
echo "olcUniqueAttribute single deletion hit the wrong value"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Removing legacy config and adding URIs...
......@@ -387,7 +387,7 @@ RC=$?
if test $RC != 0 ; then
echo "Reconfiguration to URIs failed"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Dynamically retrieving second configuration...
......@@ -406,7 +406,7 @@ RC=$?
if test $RC != 0 ; then
echo "Second configuration is not reported correctly."
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Adding a non-unique record..."
......@@ -429,7 +429,7 @@ RC=$?
if test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Dynamically trying to add legacy base
......@@ -444,7 +444,7 @@ RC=$?
if test $RC != 80 ; then
echo "legacy base allowed with URIs"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Dynamically trying to add legacy attrs
......@@ -459,7 +459,7 @@ RC=$?
if test $RC != 80 ; then
echo "legacy attributes allowed with URIs"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Dynamically trying to add legacy strictness
......@@ -474,7 +474,7 @@ RC=$?
if test $RC != 80 ; then
echo "legacy strictness allowed with URIs"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
#echo ----------------------
......@@ -490,7 +490,7 @@ RC=$?
if test $RC != 80 ; then
echo "bad filter allowed"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Verifying second configuration intact...
......@@ -500,7 +500,7 @@ RC=$?
if test $RC != 0 ; then
echo "Second configuration damaged by rejected modifies."
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
#echo ----------------------
......@@ -520,7 +520,7 @@ RC=$?
if test $RC != 0 ; then
echo "unable to reconfigure"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Dynamically retrieving third configuration...
......@@ -540,7 +540,7 @@ RC=$?
if test $RC != 0 ; then
echo "Third configuration is not reported correctly."
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Adding a record unique in both domains if filtered..."
......@@ -558,7 +558,7 @@ RC=$?
if test $RC != 0 ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Adding a record unique in all domains because of filter conditions "
......@@ -575,7 +575,7 @@ RC=$?
if test $RC != 0 ; then
echo "spurious unique error ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Sending an empty modification"
......@@ -590,7 +590,7 @@ RC=$?
if test $RC != 0 ; then
echo "spurious unique error ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Making a record non-unique"
......@@ -606,7 +606,7 @@ RC=$?
if test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
# ITS#6641/8057/8245
......@@ -623,7 +623,7 @@ RC=$?
if test $RC != $RCODEnorelax && test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Trying to bypass uniqueness as a normal user with ManageDSAIt..."
......@@ -639,7 +639,7 @@ RC=$?
if test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Bypassing uniqueness as an admin user..."
......@@ -688,7 +688,7 @@ RC=$?
if test $RC != 0 ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Making the record non-unique with modrdn..."
......@@ -699,7 +699,7 @@ RC=$?
if test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
# ITS#6641/8057/8245
......@@ -711,7 +711,7 @@ RC=$?
if test $RC != $RCODEnorelax && test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Trying to bypass uniqueness as a normal user with a ManageDSAIt control..."
......@@ -722,7 +722,7 @@ RC=$?
if test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Bypassing uniqueness as an admin user..."
......@@ -761,7 +761,7 @@ RC=$?
if test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
#echo ----------------------
......@@ -777,7 +777,7 @@ RC=$?
if test $RC != 0 ; then
echo "unable to reconfigure"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo Dynamically retrieving fourth configuration...
......@@ -795,7 +795,7 @@ RC=$?
if test $RC != 0 ; then
echo "Fourth configuration is not reported correctly."
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Adding a record unique in the ignore-domain..."
......@@ -814,7 +814,7 @@ RC=$?
if test $RC != 0 ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
echo "Adding a record non-unique in the ignore-domain..."
......@@ -833,7 +833,7 @@ RC=$?
if test $RC != $RCODEconstraint ; then
echo "unique check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
......
......@@ -95,7 +95,7 @@ case $RC in
0)
echo "ldapadd should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
10|68)
# Fine if we get alreadyExists or referrals
......@@ -116,7 +116,7 @@ case $RC in
0)
echo "ldapadd should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
10|68)
# Fine if we get alreadyExists or referrals
......@@ -177,7 +177,7 @@ RC=$?
if test $RC = 0 && test $BACKEND != null ; then
echo "ldapsearch should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
test $KILLSERVERS != no && kill -HUP $KILLPIDS
......
......@@ -491,7 +491,7 @@ case $RC,$BACKEND in
0,*)
echo "Search should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "Search failed ($RC)!"
......@@ -515,7 +515,7 @@ case $RC,$BACKEND in
0,*)
echo "Search should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "Search failed ($RC)!"
......@@ -673,7 +673,7 @@ case $RC,$BACKEND in
0,*)
echo "WhoAmI should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
51,*)
echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
......@@ -698,7 +698,7 @@ case $RC,$BACKEND in
0,*)
echo "WhoAmI should have failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
51,*)
echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
......@@ -715,7 +715,7 @@ RC=$?
#if test $RC != 6 ; then
# echo "Compare failed ($RC)!"
# test $KILLSERVERS != no && kill -HUP $KILLPIDS
# exit -1
# exit 1
#fi
case $RC,$BACKEND in
6,* | 5,null)
......
......@@ -81,7 +81,7 @@ if test $RC != 32 ; then
echo "ldapsearch should have failed with noSuchObject ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
if test $RC = 0 ; then
exit -1
exit 1
fi
exit $RC
fi
......@@ -95,7 +95,7 @@ RC=$?
if test $RC = 0 ; then
echo "ldapwhoami should have failed!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
# Populate ACIs
......
......@@ -194,7 +194,7 @@ RC=$?
if test $RC != 19 ; then
echo "valsort check failed ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
fi
$LDAPSEARCH -b "$VALSORTBASEDN" -H $URI1 \
......
......@@ -202,7 +202,7 @@ case $RC in
0)
echo "ldapcompare returned success ($RC)!"
test $KILLSERVERS != no && kill -HUP $KILLPIDS
exit -1
exit 1
;;
*)
echo "ldapcompare failed ($RC)!"
......@@ -230,7 +230,7 @@ case $RC in