]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test058-syncrepl-asymmetric
Wait for central master to start after final restart.
[openldap] / tests / scripts / test058-syncrepl-asymmetric
index 51c1295c3d8f589032d6869dd594cfd2c737e24d..cd4ccebdccda1613bc967b088d3e6243b9a12166 100755 (executable)
 # environment variable RACE_TESTS can be set to the number of race test
 # iterations the script should perform.
 
-case "$BACKEND" in
-bdb|hdb)
-       ;;
-*)
+case "$BACKEND" in ldif | null)
+       # LDIF lacks ACL support, NULL lacks cn=config support
        echo "This test does not support the $BACKEND backend"
        exit 0;;
 esac
@@ -1643,7 +1641,7 @@ for i in 1 2 3 4 5; do
                "(description=Modify$NMUM)" 2>&1 | awk '/^dn:/ {print "NOK"}'`
        if test "x$RESULT" = "xNOK" ; then
                echo "Change was replicated to site1 search!"
-               test $KILLSERVERS != no && KILL -HUP $KILLPIDS
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit 1
        fi
        sleep 1
@@ -1656,7 +1654,7 @@ for i in 1 2 3 4 5; do
                "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "NOK"}'`
        if test "x$RESULT" = "xNOK" ; then
                echo "Change was replicated to central search!"
-               test $KILLSERVERS != no && KILL -HUP $KILLPIDS
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit 1
        fi
        sleep 1
@@ -1731,7 +1729,7 @@ for i in 1 2 3 4 5; do
                "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "NOK"}'`
        if test "x$RESULT" = "xNOK" ; then
                echo "Change was replicated to central search!"
-               test $KILLSERVERS != no && KILL -HUP $KILLPIDS
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit 1
        fi
        sleep 1
@@ -1744,7 +1742,7 @@ for i in 1 2 3 4 5; do
                "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "NOK"}'`
        if test "x$RESULT" = "xNOK" ; then
                echo "Change was replicated to central search!"
-               test $KILLSERVERS != no && KILL -HUP $KILLPIDS
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit 1
        fi
        sleep 1
@@ -1801,7 +1799,7 @@ for i in 1 2 3 4 5; do
                "(description=Modify$NMUM)" 2>&1 | awk '/^dn:/ {print "NOK"}'`
        if test "x$RESULT" = "xNOK" ; then
                echo "Change was replicated to site2 search!"
-               test $KILLSERVERS != no && KILL -HUP $KILLPIDS
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit 1
        fi
        sleep 1
@@ -1877,7 +1875,7 @@ for i in 1 2 3 4 5; do
                "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "NOK"}'`
        if test "x$RESULT" = "xNOK" ; then
                echo "Change was replicated to site2 search!"
-               test $KILLSERVERS != no && KILL -HUP $KILLPIDS
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit 1
        fi
        sleep 1
@@ -1890,7 +1888,7 @@ for i in 1 2 3 4 5; do
                "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "NOK"}'`
        if test "x$RESULT" = "xNOK" ; then
                echo "Change was replicated to site2 search!"
-               test $KILLSERVERS != no && KILL -HUP $KILLPIDS
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit 1
        fi
        sleep 1
@@ -1947,7 +1945,7 @@ for i in 1 2 3 4 5; do
                "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "NOK"}'`
        if test "x$RESULT" = "xNOK" ; then
                echo "Change was replicated to central search!"
-               test $KILLSERVERS != no && KILL -HUP $KILLPIDS
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit 1
        fi
        sleep 1
@@ -2354,11 +2352,16 @@ EOF
        for i in 1 2 3 4 5; do
                $LDAPSEARCH -s base -b "$SUB_DN" -H $URI1 > /dev/null 2>&1
                RC=$?
-               if test $RC != 0; then break; fi
+               if test $RC = 32; then break; fi
                sleep $i
        done
 
-       if test $RC = 0; then
+       if test $RC != 32; then
+               if test $RC != 0; then
+                       echo "ldapsearch failed ($RC)!"
+                       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+                       exit $RC
+               fi
                echo "ERROR: Entry not removed on central master!"
                RACE_ERROR=1
                break
@@ -2373,8 +2376,8 @@ EOF
                sleep $i
        done
 
-       if test $RC = 0; then
-               echo "ERROR: Entry not removed on central search!"
+       if test $RC != 32; then
+               echo "ERROR: Entry not removed on central search! (RC=$RC)"
                RACE_ERROR=1
                break
        fi