From 947f2cd6f9320566fe3f17fcf178ce643d54138c Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sun, 6 Dec 2009 23:13:22 +0000 Subject: [PATCH] Support back-null after all --- tests/scripts/test049-sync-config | 14 +-- tests/scripts/test050-syncrepl-multimaster | 12 +- tests/scripts/test052-memberof | 28 ++--- tests/scripts/test053-syncprov-glue | 30 ++--- tests/scripts/test057-memberof-refint | 34 ++--- tests/scripts/test058-syncrepl-asymmetric | 138 +++++++++++---------- 6 files changed, 126 insertions(+), 130 deletions(-) diff --git a/tests/scripts/test049-sync-config b/tests/scripts/test049-sync-config index a3db709da0..8c42d3ffc8 100755 --- a/tests/scripts/test049-sync-config +++ b/tests/scripts/test049-sync-config @@ -21,11 +21,6 @@ if test $SYNCPROV = syncprovno; then exit 0 fi -if test $BACKEND = null; then - echo "$BACKEND backend does not support cn=config, test skipped" - exit 0 -fi - PRODIR=$TESTDIR/pro CONDIR=$TESTDIR/con1 DBPRO=$PRODIR/db @@ -224,6 +219,9 @@ if test $RC != 0 ; then exit $RC fi +nullExclude="" nullOK="" +test $BACKEND = null && nullExclude="# " nullOK="OK" + if [ "$BACKENDTYPE" = mod ]; then $LDAPADD -D cn=config -H $URI1 -y $CONFIGPWF <>$TESTOUT 2>&1 dn: cn=module,cn=config @@ -243,10 +241,10 @@ fi $LDAPADD -D cn=config -H $URI1 -y $CONFIGPWF <>$TESTOUT 2>&1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND olcSuffix: $BASEDN -olcDbDirectory: ./db +${nullExclude}olcDbDirectory: ./db olcRootDN: $MANAGERDN olcRootPW: $PASSWD olcSyncRepl: rid=002 provider=$URI1 binddn="$MANAGERDN" bindmethod=simple @@ -304,7 +302,7 @@ for i in 0 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI2 \ -s base -b "cn=Ursula Hampster,ou=Alumni Association,ou=People,dc=example,dc=com" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi diff --git a/tests/scripts/test050-syncrepl-multimaster b/tests/scripts/test050-syncrepl-multimaster index 69ab45d113..ae754daeb9 100755 --- a/tests/scripts/test050-syncrepl-multimaster +++ b/tests/scripts/test050-syncrepl-multimaster @@ -21,11 +21,6 @@ if test $SYNCPROV = syncprovno; then exit 0 fi -if test $BACKEND = null; then - echo "$BACKEND backend does not support cn=config, test skipped" - exit 0 -fi - MMR=${MMR-4} if [ $MMR -gt 9 ]; then @@ -263,6 +258,9 @@ if test $RC != 0 ; then exit $RC fi +nullExclude="" +test $BACKEND = null && nullExclude="# " + echo "" > $TMP if [ "$BACKENDTYPE" = mod ]; then cat <> $TMP @@ -278,10 +276,10 @@ fi cat <> $TMP dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND olcSuffix: $BASEDN -olcDbDirectory: ./db +${nullExclude}olcDbDirectory: ./db olcRootDN: $MANAGERDN olcRootPW: $PASSWD EOF diff --git a/tests/scripts/test052-memberof b/tests/scripts/test052-memberof index 446bf61b6b..9c90618299 100755 --- a/tests/scripts/test052-memberof +++ b/tests/scripts/test052-memberof @@ -21,11 +21,6 @@ if test $MEMBEROF = memberofno; then exit 0 fi -if test $BACKEND = null; then - echo "$BACKEND backend does not support cn=config, test skipped" - exit 0 -fi - mkdir -p $TESTDIR $DBDIR1 $TESTDIR/confdir $SLAPPASSWD -g -n >$CONFIGPWF @@ -77,14 +72,10 @@ EOF fi fi -bdb_conf="" -case $BACKEND in bdb | hdb) -bdb_conf="olcDbCacheSize: 1000 -olcDbIndex: objectClass eq -olcDbIndex: cn pres,eq,sub -olcDbIndex: uid pres,eq,sub -olcDbIndex: sn pres,eq,sub -olcDbMode: 384" +bdbInclude="# " nullExclude="" +case $BACKEND in +bdb | hdb) bdbInclude="" ;; +null) nullExclude="# " ;; esac echo "Running ldapadd to build slapd config database..." @@ -112,14 +103,19 @@ olcObjectClasses: ( 1.3.6.1.4.1.4754.31.2.4 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND olcSuffix: $BASEDN olcRootDN: cn=Manager,$BASEDN olcRootPW:: c2VjcmV0 olcMonitoring: TRUE -olcDbDirectory: $TESTDIR/db.1.a/ -$bdb_conf +${nullExclude}olcDbDirectory: $TESTDIR/db.1.a/ +${bdbInclude}olcDbCacheSize: 1000 +${bdbInclude}olcDbIndex: objectClass eq +${bdbInclude}olcDbIndex: cn pres,eq,sub +${bdbInclude}olcDbIndex: uid pres,eq,sub +${bdbInclude}olcDbIndex: sn pres,eq,sub +${bdbInclude}olcDbMode: 384" dn: olcOverlay={0}memberof,olcDatabase={1}$BACKEND,cn=config objectClass: olcOverlayConfig diff --git a/tests/scripts/test053-syncprov-glue b/tests/scripts/test053-syncprov-glue index 0203d5d33b..38e9fdec3f 100755 --- a/tests/scripts/test053-syncprov-glue +++ b/tests/scripts/test053-syncprov-glue @@ -27,11 +27,6 @@ if test $SYNCPROV = syncprovno; then exit 0 fi -if test $BACKEND = null; then - echo "$BACKEND backend does not support cn=config, test skipped" - exit 0 -fi - PRODDIR=$TESTDIR/prod PRO2DIR=$TESTDIR/pro2 CONSDIR=$TESTDIR/cons @@ -244,12 +239,15 @@ EOF fi fi +nullExclude="" nullOK="" +test $BACKEND = null && nullExclude="# " nullOK="OK" + $LDAPADD -D cn=config -H $URI1 -y $CONFIGPWF <> $TESTOUT 2>&1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $PRODDIR/db +${nullExclude}olcDbDirectory: $PRODDIR/db olcSuffix: $BASEDN olcRootDN: $MANAGERDN olcRootPW: $PASSWD @@ -274,9 +272,9 @@ olcOverlay: {1}syncprov dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $PRODDIR/ou1 +${nullExclude}olcDbDirectory: $PRODDIR/ou1 olcSubordinate: TRUE olcSuffix: ou=ou1,$BASEDN olcRootDN: $MANAGERDN @@ -310,9 +308,9 @@ fi $LDAPADD -D cn=config -H $URI2 -y $CONFIGPWF <> $TESTOUT 2>&1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $PRO2DIR/db +${nullExclude}olcDbDirectory: $PRO2DIR/db olcSuffix: $BASEDN olcRootDN: $MANAGERDN olcRootPW: $PASSWD @@ -334,9 +332,9 @@ echo "Adding databases on consumer..." $LDAPADD -D cn=config -H $URI3 -y $CONFIGPWF <> $TESTOUT 2>&1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $CONSDIR/db +${nullExclude}olcDbDirectory: $CONSDIR/db olcSuffix: $BASEDN olcRootDN: $MANAGERDN @@ -432,7 +430,7 @@ for i in 0 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI3 \ -s base -b "ou=ou1,$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -468,7 +466,7 @@ for i in 0 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI3 \ -s base -b "ou=ou1,$BASEDN" \ '(description=Modify1)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -481,6 +479,7 @@ if test $RC != 0 ; then exit $RC fi +case $BACKEND in bdb | hdb) db_stat= for path in `echo "$PATH" | sed -e 's/:/ /g'`; do if test -f "$path/db_stat" && \ @@ -501,6 +500,7 @@ else echo "Glue lock bug not found :-)" lock_bug=0 fi +esac echo "Using ldapmodify to modify glue suffix on producer..." $LDAPADD -D "$MANAGERDN" -H $URI1 -w $PASSWD <> $TESTOUT 2>&1 diff --git a/tests/scripts/test057-memberof-refint b/tests/scripts/test057-memberof-refint index 669faa2455..badce284d1 100755 --- a/tests/scripts/test057-memberof-refint +++ b/tests/scripts/test057-memberof-refint @@ -27,11 +27,10 @@ if test $REFINT = refintno; then exit 0 fi -case $BACKEND in bdb | null) - # BDB lacks subtree rename, NULL lacks cn=config support - echo "Test does not support $BACKEND, test skipped" +if test $BACKEND = bdb; then + echo "$BACKEND backend does not support subtree rename, test skipped" exit 0 -esac +fi mkdir -p $TESTDIR $DBDIR1 $TESTDIR/confdir @@ -67,6 +66,12 @@ fi cat /dev/null > $TESTOUT +bdbInclude="# " nullExclude="" +case $BACKEND in +bdb | hdb) bdbInclude="" ;; +null) nullExclude="# " ;; +esac + if [ "$MEMBEROF" = memberofmod ]; then echo "Inserting memberof overlay on producer..." $LDAPADD -D cn=config -H $URI1 -y $CONFIGPWF < $TESTOUT 2>&1 @@ -85,29 +90,24 @@ EOF fi fi -bdb_conf="" -case $BACKEND in bdb | hdb) -bdb_conf="olcDbCacheSize: 1000 -olcDbIndex: objectClass eq -olcDbIndex: cn pres,eq,sub -olcDbIndex: uid pres,eq,sub -olcDbIndex: sn pres,eq,sub -olcDbMode: 384" -esac - echo "Running ldapadd to build slapd config database..." $LDAPADD -h $LOCALHOST -p $PORT1 -D 'cn=config' -w `cat $CONFIGPWF` \ >> $TESTOUT 2>&1 <> $TESTOUT 2>&1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $SMC_DIR/db +${nullExclude}olcDbDirectory: $SMC_DIR/db olcSuffix: $BASEDN olcRootDN: $MANAGERDN olcRootPW: $PASSWD @@ -425,45 +427,45 @@ olcSpCheckpoint: 3 1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $SMC_DIR/ou1 +${nullExclude}olcDbDirectory: $SMC_DIR/ou1 olcSubordinate: TRUE olcSuffix: ou=ou1,$BASEDN olcRootDN: $MANAGERDN dn: olcDatabase={2}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {2}$BACKEND -olcDbDirectory: $SMC_DIR/ou2 +${nullExclude}olcDbDirectory: $SMC_DIR/ou2 olcSubordinate: TRUE olcSuffix: ou=ou2,$BASEDN olcRootDN: $MANAGERDN dn: olcDatabase={3}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {3}$BACKEND -olcDbDirectory: $SMC_DIR/sm1ou1 +${nullExclude}olcDbDirectory: $SMC_DIR/sm1ou1 olcSubordinate: TRUE olcSuffix: ou=sm1ou1,$BASEDN olcRootDN: $UPDATEDN dn: olcDatabase={4}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {4}$BACKEND -olcDbDirectory: $SMC_DIR/sm1ou2 +${nullExclude}olcDbDirectory: $SMC_DIR/sm1ou2 olcSubordinate: TRUE olcSuffix: ou=sm1ou2,$BASEDN olcRootDN: $UPDATEDN dn: olcDatabase={5}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {5}$BACKEND -olcDbDirectory: $SMC_DIR/sm2ou1 +${nullExclude}olcDbDirectory: $SMC_DIR/sm2ou1 olcSubordinate: TRUE olcSuffix: ou=sm2ou1,$BASEDN olcRootDN: $UPDATEDN @@ -497,9 +499,9 @@ fi $LDAPADD -D cn=config -H $URI2 -y $CONFIGPWF <> $TESTOUT 2>&1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $SM1_DIR/db +${nullExclude}olcDbDirectory: $SM1_DIR/db olcSuffix: $BASEDN olcRootDN: $UPDATEDN @@ -514,18 +516,18 @@ olcOverlay: {1}syncprov dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $SM1_DIR/ou1 +${nullExclude}olcDbDirectory: $SM1_DIR/ou1 olcSubordinate: TRUE olcSuffix: ou=ou1,$BASEDN olcRootDN: $UPDATEDN dn: olcDatabase={2}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {2}$BACKEND -olcDbDirectory: $SM1_DIR/sm1ou1 +${nullExclude}olcDbDirectory: $SM1_DIR/sm1ou1 olcSubordinate: TRUE olcSuffix: ou=sm1ou1,$BASEDN olcRootDN: ou=sm1ou1,$BASEDN @@ -533,9 +535,9 @@ olcRootPW: $PASSWD dn: olcDatabase={3}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {3}$BACKEND -olcDbDirectory: $SM1_DIR/sm1ou2 +${nullExclude}olcDbDirectory: $SM1_DIR/sm1ou2 olcSubordinate: TRUE olcSuffix: ou=sm1ou2,$BASEDN olcRootDN: ou=sm1ou1,$BASEDN @@ -570,9 +572,9 @@ fi $LDAPADD -D cn=config -H $URI3 -y $CONFIGPWF <> $TESTOUT 2>&1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $SM2_DIR/db +${nullExclude}olcDbDirectory: $SM2_DIR/db olcSuffix: $BASEDN olcRootDN: $UPDATEDN @@ -588,27 +590,27 @@ olcSpCheckpoint: 1 1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $SM2_DIR/ou2 +${nullExclude}olcDbDirectory: $SM2_DIR/ou2 olcSubordinate: TRUE olcSuffix: ou=ou2,$BASEDN olcRootDN: $UPDATEDN dn: olcDatabase={2}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {2}$BACKEND -olcDbDirectory: $SM2_DIR/sm1ou1 +${nullExclude}olcDbDirectory: $SM2_DIR/sm1ou1 olcSubordinate: TRUE olcSuffix: ou=sm1ou1,$BASEDN olcRootDN: $UPDATEDN dn: olcDatabase={3}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {3}$BACKEND -olcDbDirectory: $SM2_DIR/sm2ou1 +${nullExclude}olcDbDirectory: $SM2_DIR/sm2ou1 olcSubordinate: TRUE olcSuffix: ou=sm2ou1,$BASEDN olcRootDN: ou=sm2ou1,$BASEDN @@ -616,9 +618,9 @@ olcRootPW: $PASSWD dn: olcDatabase={4}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {4}$BACKEND -olcDbDirectory: $SM2_DIR/sm2ou2 +${nullExclude}olcDbDirectory: $SM2_DIR/sm2ou2 olcSubordinate: TRUE olcSuffix: ou=sm2ou2,$BASEDN olcRootDN: ou=sm2ou1,$BASEDN @@ -720,9 +722,9 @@ echo "Adding database config on central search..." $LDAPADD -D cn=config -H $URI4 -y $CONFIGPWF <> $TESTOUT 2>&1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $SSC_DIR/db +${nullExclude}olcDbDirectory: $SSC_DIR/db olcSuffix: $BASEDN olcRootDN: $UPDATEDN @@ -738,9 +740,9 @@ echo "Adding database config on site1 search..." $LDAPADD -D cn=config -H $URI5 -y $CONFIGPWF <> $TESTOUT 2>&1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $SS1_DIR/db +${nullExclude}olcDbDirectory: $SS1_DIR/db olcSuffix: $BASEDN olcRootDN: $UPDATEDN @@ -756,9 +758,9 @@ echo "Adding database config on site2 search..." $LDAPADD -D cn=config -H $URI6 -y $CONFIGPWF <> $TESTOUT 2>&1 dn: olcDatabase={1}$BACKEND,cn=config objectClass: olcDatabaseConfig -objectClass: olc${BACKEND}Config +${nullExclude}objectClass: olc${BACKEND}Config olcDatabase: {1}$BACKEND -olcDbDirectory: $SS2_DIR/db +${nullExclude}olcDbDirectory: $SS2_DIR/db olcSuffix: $BASEDN olcRootDN: $UPDATEDN @@ -841,7 +843,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI2 \ -s base -b "ou=ou1,$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -860,7 +862,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI3 \ -s base -b "ou=ou1,$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -961,7 +963,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI1 \ -s base -b "ou=sm2ou1,$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1009,7 +1011,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI1 \ -s base -b "ou=sm1ou1,$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1082,7 +1084,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI4 \ -s base -b "$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1101,7 +1103,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI5 \ -s base -b "$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1120,7 +1122,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI6 \ -s base -b "$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1506,6 +1508,8 @@ ERRORS=`expr $ERRORS + $CSN_ERRORS` EOF +test $BACKEND = null && echo : > $TESTDIR/checkcsn.sh + chmod +x $TESTDIR/checkcsn.sh @@ -1540,7 +1544,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI4 \ -s base -b "ou=ou1,$BASEDN" \ "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1559,7 +1563,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI5 \ -s base -b "ou=ou1,$BASEDN" \ "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1578,7 +1582,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI6 \ -s base -b "ou=ou1,$BASEDN" \ "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1621,7 +1625,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI6 \ -s base -b "ou=ou2,$BASEDN" \ "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1690,7 +1694,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI5 \ -s base -b "ou=sm1ou1,$BASEDN" \ "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1709,7 +1713,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI3 \ -s base -b "ou=sm1ou1,$BASEDN" \ "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1779,7 +1783,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI5 \ -s base -b "ou=sm1ou2,$BASEDN" \ "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1836,7 +1840,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI1 \ -s base -b "ou=sm2ou1,$BASEDN" \ "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1855,7 +1859,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI6 \ -s base -b "ou=sm2ou1,$BASEDN" \ "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -1925,7 +1929,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI6 \ -s base -b "ou=sm2ou2,$BASEDN" \ "(description=Modify$MNUM)" 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -2055,7 +2059,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI3 \ -s base -b "$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -2074,7 +2078,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI6 \ -s base -b "$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -2126,7 +2130,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI1 \ -s base -b "ou=sm1ou2,$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -2172,7 +2176,7 @@ if test $RC != 0 ; then RESULT=`$LDAPSEARCH -H $URI1 \ -s base -b "ou=sm1ou2,$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -2192,7 +2196,7 @@ for i in 1 2 3 4 5; do RESULT=`$LDAPSEARCH -H $URI4 \ -s base -b "ou=sm1ou2,$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -2238,7 +2242,7 @@ if test $RC != 0 ; then RESULT=`$LDAPSEARCH -H $URI4 \ -s base -b "ou=sm1ou2,$BASEDN" \ '(objectClass=*)' 2>&1 | awk '/^dn:/ {print "OK"}'` - if test "x$RESULT" = "xOK" ; then + if test "x$RESULT$nullOK" = "xOK" ; then RC=0 break fi @@ -2352,11 +2356,11 @@ 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 = 32; then break; fi + if test $RC = $wantNoObj; then break; fi sleep $i done - if test $RC != 32; then + if test $RC != $wantNoObj; then if test $RC != 0; then echo "ldapsearch failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS @@ -2376,7 +2380,7 @@ EOF sleep $i done - if test $RC != 32; then + if test $RC != $wantNoObj; then echo "ERROR: Entry not removed on central search! (RC=$RC)" RACE_ERROR=1 break -- 2.39.5