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
 
 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"
 
 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"
 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..."
 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..."
 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"
 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..."
 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..."
 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
 
 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"
 
 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"
 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..."
 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"
 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"
 
        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"
        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
 
 
        *)
                echo "Compare failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
-               exit $RC
+               exit 1
        ;;
 esac
 
 
 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..."
 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)..."
 
 0)
        echo "ldapmodify should have failed ($RC)!"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-       exit $RC
+       exit -1
        ;;
 50)
        echo "ldapmodify failed ($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)..."
 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)..."
 0)
        echo "ldapdelete should have failed ($RC)!"
        test $KILLSERVERS != no && kill -HUP $KILLPIDS
-       exit $RC
+       exit -1
        ;;
 50)
        echo "ldapdelete failed ($RC)"
 
        *)
                echo "Compare failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
-               exit $RC
+               exit 1
        ;;
 esac