From ad4734a1b69a4126912013393dafb14f2cf2d0a6 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Mon, 19 Apr 2010 21:14:26 +0000 Subject: [PATCH] ITS#5810 --- CHANGES | 2 + tests/Makefile.in | 4 + tests/data/regressions/its4184/slapd.conf | 5 +- tests/data/regressions/its4337/config.out | 36 ++- tests/data/regressions/its4337/its4337 | 4 +- tests/data/regressions/its4448/its4448 | 4 +- tests/data/slapd-2db.conf | 4 +- tests/data/slapd-aci.conf | 2 +- tests/data/slapd-acl.conf | 2 +- tests/data/slapd-cache-master.conf | 2 +- tests/data/slapd-chain1.conf | 3 +- tests/data/slapd-chain2.conf | 2 +- tests/data/slapd-component.conf | 2 +- tests/data/slapd-config-undo.conf | 2 +- tests/data/slapd-dds.conf | 2 +- tests/data/slapd-deltasync-master.conf | 4 +- tests/data/slapd-deltasync-slave.conf | 3 +- tests/data/slapd-dn.conf | 2 +- tests/data/slapd-dynlist.conf | 2 +- tests/data/slapd-emptydn.conf | 4 +- tests/data/slapd-glue-syncrepl1.conf | 6 +- tests/data/slapd-glue-syncrepl2.conf | 6 +- tests/data/slapd-glue.conf | 6 +- tests/data/slapd-idassert.conf | 5 +- tests/data/slapd-ldapglue.conf | 2 +- tests/data/slapd-ldapgluegroups.conf | 2 +- tests/data/slapd-ldapgluepeople.conf | 3 +- tests/data/slapd-limits.conf | 3 +- tests/data/slapd-master.conf | 2 +- tests/data/slapd-meta-target1.conf | 3 +- tests/data/slapd-meta-target2.conf | 3 +- tests/data/slapd-ppolicy.conf | 2 +- tests/data/slapd-proxycache.conf | 2 +- tests/data/slapd-pw.conf | 3 +- tests/data/slapd-ref-slave.conf | 2 +- tests/data/slapd-referrals.conf | 2 +- tests/data/slapd-refint.conf | 2 +- tests/data/slapd-relay.conf | 3 +- tests/data/slapd-repl-slave-remote.conf | 3 +- tests/data/slapd-retcode.conf | 2 +- tests/data/slapd-schema.conf | 2 +- tests/data/slapd-syncrepl-master.conf | 2 +- tests/data/slapd-syncrepl-multiproxy.conf | 2 +- tests/data/slapd-syncrepl-slave-persist1.conf | 3 +- tests/data/slapd-syncrepl-slave-persist2.conf | 2 +- tests/data/slapd-syncrepl-slave-persist3.conf | 2 +- tests/data/slapd-syncrepl-slave-refresh1.conf | 3 +- tests/data/slapd-syncrepl-slave-refresh2.conf | 2 +- tests/data/slapd-translucent-local.conf | 3 +- tests/data/slapd-translucent-remote.conf | 3 +- tests/data/slapd-unique.conf | 2 +- tests/data/slapd-valregex.conf | 3 +- tests/data/slapd-valsort.conf | 2 +- tests/data/slapd-whoami.conf | 2 +- tests/data/slapd.conf | 3 +- tests/data/slapd2.conf | 2 +- tests/progs/Makefile.in | 7 +- tests/progs/ldif-filter.c | 244 ++++++++++++++++++ tests/run.in | 8 +- tests/scripts/acfilter.sh | 22 -- tests/scripts/conf.sh | 2 + tests/scripts/defines.sh | 2 +- tests/scripts/relay | 9 +- tests/scripts/sql-test000-read | 4 +- tests/scripts/sql-test001-concurrency | 4 +- tests/scripts/sql-test900-write | 4 +- tests/scripts/sql-test901-syncrepl | 12 +- tests/scripts/start-server | 4 +- tests/scripts/start-server-nolog | 4 +- tests/scripts/test001-slapadd | 4 +- tests/scripts/test002-populate | 4 +- tests/scripts/test003-search | 4 +- tests/scripts/test004-modify | 4 +- tests/scripts/test005-modrdn | 16 +- tests/scripts/test006-acls | 11 +- tests/scripts/test008-concurrency | 4 +- tests/scripts/test009-referral | 4 +- tests/scripts/test011-glue-slapadd | 6 +- tests/scripts/test012-glue-populate | 4 +- tests/scripts/test013-language | 4 +- tests/scripts/test014-whoami | 2 +- tests/scripts/test015-xsearch | 6 +- tests/scripts/test016-subref | 19 +- tests/scripts/test017-syncreplication-refresh | 6 +- tests/scripts/test018-syncreplication-persist | 9 +- tests/scripts/test019-syncreplication-cascade | 17 +- tests/scripts/test020-proxycache | 11 +- tests/scripts/test021-certificate | 4 +- tests/scripts/test023-refint | 7 +- tests/scripts/test024-unique | 15 +- tests/scripts/test025-limits | 5 + tests/scripts/test026-dn | 4 +- tests/scripts/test027-emptydn | 16 +- tests/scripts/test028-idassert | 24 +- tests/scripts/test029-ldapglue | 12 +- tests/scripts/test031-component-filter | 2 +- tests/scripts/test032-chain | 20 +- tests/scripts/test033-glue-syncrepl | 11 +- tests/scripts/test034-translucent | 13 +- tests/scripts/test035-meta | 44 ++-- tests/scripts/test036-meta-concurrency | 4 +- tests/scripts/test037-manage | 4 +- tests/scripts/test039-glue-ldap-concurrency | 4 +- tests/scripts/test040-subtree-rename | 11 +- tests/scripts/test041-aci | 11 +- tests/scripts/test042-valsort | 18 +- tests/scripts/test043-delta-syncrepl | 14 +- tests/scripts/test044-dynlist | 10 +- tests/scripts/test045-syncreplication-proxied | 30 +-- tests/scripts/test046-dds | 19 +- tests/scripts/test047-ldap | 46 ++-- tests/scripts/test048-syncrepl-multiproxy | 24 +- tests/scripts/test049-sync-config | 17 +- tests/scripts/test050-syncrepl-multimaster | 21 +- tests/scripts/test052-memberof | 26 +- .../test054-syncreplication-parallel-load | 9 +- tests/scripts/test055-valregex | 16 +- tests/scripts/test056-monitor | 10 +- tests/scripts/test057-memberof-refint | 30 ++- tests/scripts/test058-syncrepl-asymmetric | 147 ++++++----- 120 files changed, 803 insertions(+), 497 deletions(-) create mode 100644 tests/progs/ldif-filter.c delete mode 100755 tests/scripts/acfilter.sh diff --git a/CHANGES b/CHANGES index bd77ab2c0d..a95e301485 100644 --- a/CHANGES +++ b/CHANGES @@ -41,6 +41,8 @@ OpenLDAP 2.4.22 Engineering Fixed slapo-valsort REP_ENTRY flag handling (ITS#5340,ITS#6423) Fixed contrib/sha2 adds mechs for more hashes (ITS#6433) Fixed contrib/nssov to use nss-pam-ldapd (ITS#6488) + Build Environment + Added back-ldif, back-null test support (ITS#5810) Documentation admin24 avoid explicity moduleload statements (ITS#6486) admin24 broken link fixes (ITS#6493,ITS#6515) diff --git a/tests/Makefile.in b/tests/Makefile.in index be30220fdd..5efbfbc67a 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -53,6 +53,10 @@ sql-yes sql-mod: FORCE @echo "Initiating LDAP tests for SQL..." @$(RUN) -b sql sql-all +ldif test-ldif: FORCE + @echo "Initiating LDAP tests for LDIF..." + @$(RUN) -b ldif all + regressions: FORCE @echo "Testing (available) ITS regressions" @$(RUN) its-all diff --git a/tests/data/regressions/its4184/slapd.conf b/tests/data/regressions/its4184/slapd.conf index e44b929825..030cc9dd7c 100644 --- a/tests/data/regressions/its4184/slapd.conf +++ b/tests/data/regressions/its4184/slapd.conf @@ -38,7 +38,7 @@ database @BACKEND@ suffix "ou=Special,dc=example,dc=com" subordinate rootdn "cn=Manager,dc=example,dc=com" -directory @TESTDIR@/db.2.a +#~null~#directory @TESTDIR@/db.2.a # Indices to maintain #bdb#index default pres,eq @@ -52,7 +52,8 @@ database @BACKEND@ suffix "dc=example,dc=com" rootdn "cn=Manager,dc=example,dc=com" rootpw secret -directory @TESTDIR@/db.1.a +#null#bind on +#~null~#directory @TESTDIR@/db.1.a # Indices to maintain #bdb#index default pres,eq diff --git a/tests/data/regressions/its4337/config.out b/tests/data/regressions/its4337/config.out index 4fd555ff23..bdcbbe51b8 100644 --- a/tests/data/regressions/its4337/config.out +++ b/tests/data/regressions/its4337/config.out @@ -3,97 +3,127 @@ dn: olcDatabase={-1}frontend,cn=config objectClass: olcDatabaseConfig objectClass: olcFrontendConfig olcDatabase: {-1}frontend +olcAddContentAcl: FALSE olcLastMod: TRUE olcMaxDerefDepth: 0 olcReadOnly: FALSE olcSchemaDN: cn=Subschema +olcSyncUseSubentry: FALSE +olcMonitoring: FALSE dn: olcDatabase={0}config,cn=config objectClass: olcDatabaseConfig olcDatabase: {0}config +olcAccess: {0}to * by * none +olcAddContentAcl: TRUE olcLastMod: TRUE olcMaxDerefDepth: 15 olcReadOnly: FALSE olcRootDN: cn=config olcRootPW: config +olcSyncUseSubentry: FALSE +olcMonitoring: FALSE dn: olcDatabase={1}monitor,cn=config objectClass: olcDatabaseConfig olcDatabase: {1}monitor +olcAddContentAcl: FALSE olcLastMod: TRUE olcMaxDerefDepth: 15 olcReadOnly: FALSE +olcSyncUseSubentry: FALSE +olcMonitoring: FALSE # Searching databases __after__ append... dn: olcDatabase={-1}frontend,cn=config objectClass: olcDatabaseConfig objectClass: olcFrontendConfig olcDatabase: {-1}frontend +olcAddContentAcl: FALSE olcLastMod: TRUE olcMaxDerefDepth: 0 olcReadOnly: FALSE olcSchemaDN: cn=Subschema +olcSyncUseSubentry: FALSE +olcMonitoring: FALSE dn: olcDatabase={0}config,cn=config objectClass: olcDatabaseConfig olcDatabase: {0}config +olcAccess: {0}to * by * none +olcAddContentAcl: TRUE olcLastMod: TRUE olcMaxDerefDepth: 15 olcReadOnly: FALSE olcRootDN: cn=config olcRootPW: config +olcSyncUseSubentry: FALSE +olcMonitoring: FALSE dn: olcDatabase={1}monitor,cn=config objectClass: olcDatabaseConfig olcDatabase: {1}monitor +olcAddContentAcl: FALSE olcLastMod: TRUE olcMaxDerefDepth: 15 olcReadOnly: FALSE +olcSyncUseSubentry: FALSE +olcMonitoring: FALSE dn: olcDatabase={2}bdb,cn=config objectClass: olcDatabaseConfig objectClass: olcBdbConfig olcDatabase: {2}bdb -olcSuffix: dc=com olcDbDirectory: ./testrun/db.1.a +olcSuffix: dc=com # Searching databases __after__ insert... dn: olcDatabase={-1}frontend,cn=config objectClass: olcDatabaseConfig objectClass: olcFrontendConfig olcDatabase: {-1}frontend +olcAddContentAcl: FALSE olcLastMod: TRUE olcMaxDerefDepth: 0 olcReadOnly: FALSE olcSchemaDN: cn=Subschema +olcSyncUseSubentry: FALSE +olcMonitoring: FALSE dn: olcDatabase={0}config,cn=config objectClass: olcDatabaseConfig olcDatabase: {0}config +olcAccess: {0}to * by * none +olcAddContentAcl: TRUE olcLastMod: TRUE olcMaxDerefDepth: 15 olcReadOnly: FALSE olcRootDN: cn=config olcRootPW: config +olcSyncUseSubentry: FALSE +olcMonitoring: FALSE dn: olcDatabase={1}bdb,cn=config objectClass: olcDatabaseConfig objectClass: olcBdbConfig olcDatabase: {1}bdb -olcSuffix: dc=org olcDbDirectory: ./testrun/db.2.a +olcSuffix: dc=org dn: olcDatabase={2}monitor,cn=config objectClass: olcDatabaseConfig olcDatabase: {2}monitor +olcAddContentAcl: FALSE olcLastMod: TRUE olcMaxDerefDepth: 15 olcReadOnly: FALSE +olcSyncUseSubentry: FALSE +olcMonitoring: FALSE dn: olcDatabase={3}bdb,cn=config objectClass: olcDatabaseConfig objectClass: olcBdbConfig olcDatabase: {3}bdb -olcSuffix: dc=com olcDbDirectory: ./testrun/db.1.a +olcSuffix: dc=com diff --git a/tests/data/regressions/its4337/its4337 b/tests/data/regressions/its4337/its4337 index 4e98b3427a..1ef5892878 100755 --- a/tests/data/regressions/its4337/its4337 +++ b/tests/data/regressions/its4337/its4337 @@ -139,9 +139,9 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS LDIF=$ITSDIR/config.out echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/data/regressions/its4448/its4448 b/tests/data/regressions/its4448/its4448 index 410cb197e4..553b6eda95 100755 --- a/tests/data/regressions/its4448/its4448 +++ b/tests/data/regressions/its4448/its4448 @@ -308,9 +308,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $METACONCURRENCYOUT > $LDIFFLT +$LDIFFILTER < $METACONCURRENCYOUT > $LDIFFLT echo "Comparing filter output..." $BCMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/data/slapd-2db.conf b/tests/data/slapd-2db.conf index 76fcb9d266..e175ebf4ff 100644 --- a/tests/data/slapd-2db.conf +++ b/tests/data/slapd-2db.conf @@ -32,8 +32,8 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "cn=Everyone,ou=Groups,dc=example,dc=com" -directory @TESTDIR@/db.1.a subordinate +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq @@ -43,9 +43,9 @@ subordinate database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.b rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.b #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-aci.conf b/tests/data/slapd-aci.conf index 4d3105009d..78ca058781 100644 --- a/tests/data/slapd-aci.conf +++ b/tests/data/slapd-aci.conf @@ -43,9 +43,9 @@ access to dn="cn=Subschema" database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-acl.conf b/tests/data/slapd-acl.conf index aaef425f20..5c55753a68 100644 --- a/tests/data/slapd-acl.conf +++ b/tests/data/slapd-acl.conf @@ -43,9 +43,9 @@ access to * database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-cache-master.conf b/tests/data/slapd-cache-master.conf index a27a363d09..58f32533aa 100644 --- a/tests/data/slapd-cache-master.conf +++ b/tests/data/slapd-cache-master.conf @@ -33,9 +33,9 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-chain1.conf b/tests/data/slapd-chain1.conf index 42d8bf1670..2f395cd02e 100644 --- a/tests/data/slapd-chain1.conf +++ b/tests/data/slapd-chain1.conf @@ -51,9 +51,10 @@ chain-idassert-bind bindmethod=simple database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-chain2.conf b/tests/data/slapd-chain2.conf index c150ab4b87..0008fe54cf 100644 --- a/tests/data/slapd-chain2.conf +++ b/tests/data/slapd-chain2.conf @@ -40,9 +40,9 @@ argsfile @TESTDIR@/slapd.2.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.2.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-component.conf b/tests/data/slapd-component.conf index 721b13bc0b..b5f0717576 100644 --- a/tests/data/slapd-component.conf +++ b/tests/data/slapd-component.conf @@ -38,9 +38,9 @@ moduleload @DATADIR@/comp_libs/compmatch.la database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #hdb#index objectClass eq #ndb#dbname db_1 diff --git a/tests/data/slapd-config-undo.conf b/tests/data/slapd-config-undo.conf index edf0087b05..82b5af068c 100644 --- a/tests/data/slapd-config-undo.conf +++ b/tests/data/slapd-config-undo.conf @@ -7,9 +7,9 @@ include @SCHEMADIR@/core.schema database @BACKEND@ suffix "o=undo" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,o=undo" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-dds.conf b/tests/data/slapd-dds.conf index 37b8ebc816..e04d0a53a4 100644 --- a/tests/data/slapd-dds.conf +++ b/tests/data/slapd-dds.conf @@ -37,9 +37,9 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #bdb#index entryExpireTimestamp eq diff --git a/tests/data/slapd-deltasync-master.conf b/tests/data/slapd-deltasync-master.conf index 7bb358206d..12adf6c483 100644 --- a/tests/data/slapd-deltasync-master.conf +++ b/tests/data/slapd-deltasync-master.conf @@ -37,8 +37,8 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "cn=log" -directory @TESTDIR@/db.1.b rootdn "cn=Manager,dc=example,dc=com" +#~null~#directory @TESTDIR@/db.1.b #bdb#index objectClass eq #bdb#index entryUUID,entryCSN eq #hdb#index objectClass eq @@ -53,9 +53,9 @@ syncprov-nopresent true rootdn "cn=Manager,dc=example,dc=com" database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #bdb#index entryUUID,entryCSN eq diff --git a/tests/data/slapd-deltasync-slave.conf b/tests/data/slapd-deltasync-slave.conf index 7a60f8f1ba..c066248b4f 100644 --- a/tests/data/slapd-deltasync-slave.conf +++ b/tests/data/slapd-deltasync-slave.conf @@ -44,9 +44,10 @@ argsfile @TESTDIR@/slapd.2.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.2.a rootdn "cn=Replica,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-dn.conf b/tests/data/slapd-dn.conf index 73e898fc15..432c5c2afe 100644 --- a/tests/data/slapd-dn.conf +++ b/tests/data/slapd-dn.conf @@ -35,9 +35,9 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-dynlist.conf b/tests/data/slapd-dynlist.conf index 8b0fb800c7..83cd798f7b 100644 --- a/tests/data/slapd-dynlist.conf +++ b/tests/data/slapd-dynlist.conf @@ -40,9 +40,9 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-emptydn.conf b/tests/data/slapd-emptydn.conf index cf13d83fe2..4df2bf4ada 100644 --- a/tests/data/slapd-emptydn.conf +++ b/tests/data/slapd-emptydn.conf @@ -40,9 +40,9 @@ access to dn.exact="cn=Subschema" database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq @@ -65,9 +65,9 @@ access to dn.subtree="dc=example,dc=com" database @BACKEND@ suffix "" -directory @TESTDIR@/db.2.a rootdn "cn=Manager,c=US" rootpw secret +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-glue-syncrepl1.conf b/tests/data/slapd-glue-syncrepl1.conf index 9767544ddc..2e7793bd91 100644 --- a/tests/data/slapd-glue-syncrepl1.conf +++ b/tests/data/slapd-glue-syncrepl1.conf @@ -34,8 +34,8 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "ou=Information Technology Division,ou=People,dc=example,dc=com" subordinate -directory @TESTDIR@/db.1.a rootdn "cn=Manager 1,dc=example,dc=com" +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectclass eq #bdb#index uid pres,eq,sub #bdb#index cn,sn pres,eq,sub,subany @@ -52,8 +52,8 @@ overlay syncprov database @BACKEND@ suffix "ou=Groups,dc=example,dc=com" subordinate -directory @TESTDIR@/db.1.b rootdn "cn=Manager 1,dc=example,dc=com" +#~null~#directory @TESTDIR@/db.1.b #bdb#index objectclass eq #bdb#index uid pres,eq,sub #bdb#index cn,sn pres,eq,sub,subany @@ -83,9 +83,9 @@ updateref @URI2@ database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.c rootdn "cn=Manager 1,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.c #bdb#index objectclass eq #bdb#index uid pres,eq,sub #bdb#index cn,sn pres,eq,sub,subany diff --git a/tests/data/slapd-glue-syncrepl2.conf b/tests/data/slapd-glue-syncrepl2.conf index 76b597b1eb..a7950f75a3 100644 --- a/tests/data/slapd-glue-syncrepl2.conf +++ b/tests/data/slapd-glue-syncrepl2.conf @@ -34,8 +34,8 @@ argsfile @TESTDIR@/slapd.2.args database @BACKEND@ suffix "ou=Information Technology Division,ou=People,dc=example,dc=com" subordinate -directory @TESTDIR@/db.2.a rootdn "cn=Manager 2,dc=example,dc=com" +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectclass eq #bdb#index uid pres,eq,sub #bdb#index cn,sn pres,eq,sub,subany @@ -66,8 +66,8 @@ updateref @URI1@ database @BACKEND@ suffix "ou=Groups,dc=example,dc=com" subordinate -directory @TESTDIR@/db.2.b rootdn "cn=Manager 2,dc=example,dc=com" +#~null~#directory @TESTDIR@/db.2.b #bdb#index objectclass eq #bdb#index uid pres,eq,sub #bdb#index cn,sn pres,eq,sub,subany @@ -85,9 +85,9 @@ overlay syncprov database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.2.c rootdn "cn=Manager 2,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.2.c #bdb#index objectclass eq #bdb#index uid pres,eq,sub #bdb#index cn,sn pres,eq,sub,subany diff --git a/tests/data/slapd-glue.conf b/tests/data/slapd-glue.conf index 9706c9d5ec..6004434b17 100644 --- a/tests/data/slapd-glue.conf +++ b/tests/data/slapd-glue.conf @@ -33,8 +33,8 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "ou=Information Technology Division,ou=People,dc=example,dc=com" subordinate -directory @TESTDIR@/db.1.a rootdn "cn=Manager, dc=example,dc=com" +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectclass eq #bdb#index uid pres,eq,sub #bdb#index cn,sn pres,eq,sub,subany @@ -47,8 +47,8 @@ rootdn "cn=Manager, dc=example,dc=com" database @BACKEND@ suffix "ou=Groups,dc=example,dc=com" subordinate -directory @TESTDIR@/db.1.b rootdn "cn=Manager, dc=example,dc=com" +#~null~#directory @TESTDIR@/db.1.b #bdb#index objectclass eq #bdb#index uid pres,eq,sub #bdb#index cn,sn pres,eq,sub,subany @@ -60,9 +60,9 @@ rootdn "cn=Manager, dc=example,dc=com" database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.c rootdn "cn=Manager, dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.c #bdb#index objectclass eq #bdb#index uid pres,eq,sub #bdb#index cn,sn pres,eq,sub,subany diff --git a/tests/data/slapd-idassert.conf b/tests/data/slapd-idassert.conf index be4dfc3f53..ad5acf67e0 100644 --- a/tests/data/slapd-idassert.conf +++ b/tests/data/slapd-idassert.conf @@ -59,9 +59,10 @@ access to * database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq @@ -77,9 +78,9 @@ access to dn.exact="cn=Proxy,ou=Admin,dc=example,dc=com" database @BACKEND@ suffix "dc=example,dc=it" -directory @TESTDIR@/db.2.a rootdn "cn=Manager,dc=example,dc=it" rootpw secret +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-ldapglue.conf b/tests/data/slapd-ldapglue.conf index 8827a12bc0..14e582bca6 100644 --- a/tests/data/slapd-ldapglue.conf +++ b/tests/data/slapd-ldapglue.conf @@ -68,9 +68,9 @@ uri "@URI2@" # root database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-ldapgluegroups.conf b/tests/data/slapd-ldapgluegroups.conf index 327c211691..e82fe51cc6 100644 --- a/tests/data/slapd-ldapgluegroups.conf +++ b/tests/data/slapd-ldapgluegroups.conf @@ -50,9 +50,9 @@ access to * # people branch database @BACKEND@ suffix "ou=Groups,dc=example,dc=com" -directory @TESTDIR@/db.3.a rootdn "cn=Manager,ou=Groups,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.3.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-ldapgluepeople.conf b/tests/data/slapd-ldapgluepeople.conf index 51284f237e..3ea70571b2 100644 --- a/tests/data/slapd-ldapgluepeople.conf +++ b/tests/data/slapd-ldapgluepeople.conf @@ -51,9 +51,10 @@ access to * # people branch database @BACKEND@ suffix "ou=People,dc=example,dc=com" -directory @TESTDIR@/db.2.a rootdn "cn=Manager,ou=People,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-limits.conf b/tests/data/slapd-limits.conf index 0a9bed9312..4b3223f293 100644 --- a/tests/data/slapd-limits.conf +++ b/tests/data/slapd-limits.conf @@ -33,9 +33,10 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a + # Need quality indices on "uid" to check "unchecked" limits... #bdb#index objectClass eq #bdb#index uid eq diff --git a/tests/data/slapd-master.conf b/tests/data/slapd-master.conf index c99173b2cc..c8cc258166 100644 --- a/tests/data/slapd-master.conf +++ b/tests/data/slapd-master.conf @@ -35,9 +35,9 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #hdb#index objectClass eq #ndb#dbname db_1 diff --git a/tests/data/slapd-meta-target1.conf b/tests/data/slapd-meta-target1.conf index 514c2415cc..278cc8936c 100644 --- a/tests/data/slapd-meta-target1.conf +++ b/tests/data/slapd-meta-target1.conf @@ -38,9 +38,10 @@ sockbuf_max_incoming 4194303 database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-meta-target2.conf b/tests/data/slapd-meta-target2.conf index da5924b1df..bd590c9207 100644 --- a/tests/data/slapd-meta-target2.conf +++ b/tests/data/slapd-meta-target2.conf @@ -43,9 +43,10 @@ idletimeout 5 database @BACKEND@ suffix "ou=Meta,dc=example,dc=com" -directory @TESTDIR@/db.2.a rootdn "cn=Manager,ou=Meta,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-ppolicy.conf b/tests/data/slapd-ppolicy.conf index 900ed7e586..9ff4f2e5df 100644 --- a/tests/data/slapd-ppolicy.conf +++ b/tests/data/slapd-ppolicy.conf @@ -33,9 +33,9 @@ include @SCHEMADIR@/ppolicy.schema database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #hdb#index objectClass eq #ndb#dbname db_1 diff --git a/tests/data/slapd-proxycache.conf b/tests/data/slapd-proxycache.conf index 25a294f61d..14b60e5d01 100644 --- a/tests/data/slapd-proxycache.conf +++ b/tests/data/slapd-proxycache.conf @@ -57,7 +57,7 @@ pcachebind (&(objectclass=person)(uid=)) 1 @BTTR@ sub "ou=Alumni Association,ou #bdb#cachesize 20 #hdb#cachesize 20 -directory @TESTDIR@/db.2.a +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid,mail pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-pw.conf b/tests/data/slapd-pw.conf index da75ea3bbe..2e2a81658c 100644 --- a/tests/data/slapd-pw.conf +++ b/tests/data/slapd-pw.conf @@ -33,9 +33,10 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-ref-slave.conf b/tests/data/slapd-ref-slave.conf index 0c8d7e6ab2..ce3c805321 100644 --- a/tests/data/slapd-ref-slave.conf +++ b/tests/data/slapd-ref-slave.conf @@ -38,9 +38,9 @@ database @BACKEND@ #hdb#cachesize 0 suffix "o=University of Mich,c=US" -directory @TESTDIR@/db.2.a rootdn "cn=Manager,o=University of Mich,c=US" rootpw secret +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-referrals.conf b/tests/data/slapd-referrals.conf index 89f125edaa..a1e6232b85 100644 --- a/tests/data/slapd-referrals.conf +++ b/tests/data/slapd-referrals.conf @@ -32,9 +32,9 @@ argsfile @TESTDIR@/slapd.args database @BACKEND@ suffix "c=us" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,c=us" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #hdb#index objectClass eq #ndb#dbname db_1 diff --git a/tests/data/slapd-refint.conf b/tests/data/slapd-refint.conf index b364349d4e..232856ba0b 100644 --- a/tests/data/slapd-refint.conf +++ b/tests/data/slapd-refint.conf @@ -36,9 +36,9 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "o=refint" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,o=refint" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-relay.conf b/tests/data/slapd-relay.conf index 4af63c64fa..7ff3dd5858 100644 --- a/tests/data/slapd-relay.conf +++ b/tests/data/slapd-relay.conf @@ -41,9 +41,10 @@ argsfile @TESTDIR@/slapd.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #hdb#index objectClass eq #ndb#dbname db_1 diff --git a/tests/data/slapd-repl-slave-remote.conf b/tests/data/slapd-repl-slave-remote.conf index 280aad9a38..2b28fff9e7 100644 --- a/tests/data/slapd-repl-slave-remote.conf +++ b/tests/data/slapd-repl-slave-remote.conf @@ -50,13 +50,14 @@ access to * database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.2.a rootdn "cn=Replica,dc=example,dc=com" rootpw secret # HACK: use the RootDN of the monitor database as UpdateDN so ACLs apply # without the need to write the UpdateDN before starting replication updatedn "cn=Monitor" updateref @URI1@ +#null#bind on +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #bdb#index entryUUID pres,eq diff --git a/tests/data/slapd-retcode.conf b/tests/data/slapd-retcode.conf index 00164fc68c..3710fe2667 100644 --- a/tests/data/slapd-retcode.conf +++ b/tests/data/slapd-retcode.conf @@ -37,9 +37,9 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-schema.conf b/tests/data/slapd-schema.conf index 80bafcc529..29674f3c45 100644 --- a/tests/data/slapd-schema.conf +++ b/tests/data/slapd-schema.conf @@ -46,7 +46,7 @@ rootdse @DATADIR@/rootdse.ldif database @BACKEND@ suffix "o=OpenLDAP Project,l=Internet" -directory @TESTDIR@/db.1.a +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #hdb#index objectClass eq #ndb#dbname db_1_a diff --git a/tests/data/slapd-syncrepl-master.conf b/tests/data/slapd-syncrepl-master.conf index b9b4079a34..69c39df50e 100644 --- a/tests/data/slapd-syncrepl-master.conf +++ b/tests/data/slapd-syncrepl-master.conf @@ -35,9 +35,9 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #bdb#index entryUUID,entryCSN eq diff --git a/tests/data/slapd-syncrepl-multiproxy.conf b/tests/data/slapd-syncrepl-multiproxy.conf index 6a16df7608..e4d2c3dbca 100644 --- a/tests/data/slapd-syncrepl-multiproxy.conf +++ b/tests/data/slapd-syncrepl-multiproxy.conf @@ -37,9 +37,9 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #bdb#index entryUUID,entryCSN eq diff --git a/tests/data/slapd-syncrepl-slave-persist1.conf b/tests/data/slapd-syncrepl-slave-persist1.conf index 9dfe728054..681d34d320 100644 --- a/tests/data/slapd-syncrepl-slave-persist1.conf +++ b/tests/data/slapd-syncrepl-slave-persist1.conf @@ -44,9 +44,10 @@ argsfile @TESTDIR@/slapd.4.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.4.a rootdn "cn=Replica,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.4.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #bdb#index entryUUID,entryCSN eq diff --git a/tests/data/slapd-syncrepl-slave-persist2.conf b/tests/data/slapd-syncrepl-slave-persist2.conf index 6f9617362e..6412cd5383 100644 --- a/tests/data/slapd-syncrepl-slave-persist2.conf +++ b/tests/data/slapd-syncrepl-slave-persist2.conf @@ -21,9 +21,9 @@ argsfile @TESTDIR@/slapd.5.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.5.a rootdn "cn=Replica,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.5.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #bdb#index entryUUID,entryCSN eq diff --git a/tests/data/slapd-syncrepl-slave-persist3.conf b/tests/data/slapd-syncrepl-slave-persist3.conf index 716865baa0..9413aa899e 100644 --- a/tests/data/slapd-syncrepl-slave-persist3.conf +++ b/tests/data/slapd-syncrepl-slave-persist3.conf @@ -33,9 +33,9 @@ argsfile @TESTDIR@/slapd.6.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.6.a rootdn "cn=Replica,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.6.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #bdb#index entryUUID,entryCSN eq diff --git a/tests/data/slapd-syncrepl-slave-refresh1.conf b/tests/data/slapd-syncrepl-slave-refresh1.conf index 1cfec880fa..ecf4033c50 100644 --- a/tests/data/slapd-syncrepl-slave-refresh1.conf +++ b/tests/data/slapd-syncrepl-slave-refresh1.conf @@ -35,9 +35,10 @@ argsfile @TESTDIR@/slapd.2.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.2.a rootdn "cn=Replica,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #bdb#index entryUUID,entryCSN eq diff --git a/tests/data/slapd-syncrepl-slave-refresh2.conf b/tests/data/slapd-syncrepl-slave-refresh2.conf index 9ad159cb97..a26d3fc3e3 100644 --- a/tests/data/slapd-syncrepl-slave-refresh2.conf +++ b/tests/data/slapd-syncrepl-slave-refresh2.conf @@ -33,9 +33,9 @@ argsfile @TESTDIR@/slapd.3.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.3.a rootdn "cn=Replica,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.3.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #bdb#index entryUUID,entryCSN eq diff --git a/tests/data/slapd-translucent-local.conf b/tests/data/slapd-translucent-local.conf index 9adc4292f9..f197680531 100644 --- a/tests/data/slapd-translucent-local.conf +++ b/tests/data/slapd-translucent-local.conf @@ -41,9 +41,10 @@ argsfile @TESTDIR@/slapd.2.args database @BACKEND@ suffix "o=translucent" -directory @TESTDIR@/db.2.a rootdn "o=translucent" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-translucent-remote.conf b/tests/data/slapd-translucent-remote.conf index 66e33babaa..ff48569df2 100644 --- a/tests/data/slapd-translucent-remote.conf +++ b/tests/data/slapd-translucent-remote.conf @@ -36,9 +36,10 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "o=translucent" -directory @TESTDIR@/db.1.a rootdn "o=translucent" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-unique.conf b/tests/data/slapd-unique.conf index 7a4a69554d..901064ebd9 100644 --- a/tests/data/slapd-unique.conf +++ b/tests/data/slapd-unique.conf @@ -36,9 +36,9 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "o=unique" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,o=unique" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-valregex.conf b/tests/data/slapd-valregex.conf index 742d647542..14755004e3 100644 --- a/tests/data/slapd-valregex.conf +++ b/tests/data/slapd-valregex.conf @@ -43,9 +43,10 @@ access to * database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-valsort.conf b/tests/data/slapd-valsort.conf index 69bf61e02c..1382bb0693 100644 --- a/tests/data/slapd-valsort.conf +++ b/tests/data/slapd-valsort.conf @@ -34,9 +34,9 @@ argsfile @TESTDIR@/slapd.1.args database @BACKEND@ suffix "o=valsort" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,o=valsort" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd-whoami.conf b/tests/data/slapd-whoami.conf index 54b39aefc3..6eeef2e7a1 100644 --- a/tests/data/slapd-whoami.conf +++ b/tests/data/slapd-whoami.conf @@ -53,9 +53,9 @@ access to * database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/data/slapd.conf b/tests/data/slapd.conf index 2c0135c5e2..6dddda7d1a 100644 --- a/tests/data/slapd.conf +++ b/tests/data/slapd.conf @@ -38,9 +38,10 @@ sockbuf_max_incoming 4194303 database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.1.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#null#bind on +#~null~#directory @TESTDIR@/db.1.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #bdb#checkpoint 1024 5 diff --git a/tests/data/slapd2.conf b/tests/data/slapd2.conf index 9bd47f5d27..e49f251b5c 100644 --- a/tests/data/slapd2.conf +++ b/tests/data/slapd2.conf @@ -33,9 +33,9 @@ argsfile @TESTDIR@/slapd.2.args database @BACKEND@ suffix "dc=example,dc=com" -directory @TESTDIR@/db.2.a rootdn "cn=Manager,dc=example,dc=com" rootpw secret +#~null~#directory @TESTDIR@/db.2.a #bdb#index objectClass eq #bdb#index cn,sn,uid pres,eq,sub #hdb#index objectClass eq diff --git a/tests/progs/Makefile.in b/tests/progs/Makefile.in index 717485779f..a08e57f729 100644 --- a/tests/progs/Makefile.in +++ b/tests/progs/Makefile.in @@ -14,11 +14,11 @@ ## . PROGRAMS = slapd-tester slapd-search slapd-read slapd-addel slapd-modrdn \ - slapd-modify slapd-bind + slapd-modify slapd-bind ldif-filter SRCS = slapd-common.c \ slapd-tester.c slapd-search.c slapd-read.c slapd-addel.c \ - slapd-modrdn.c slapd-modify.c slapd-bind.c + slapd-modrdn.c slapd-modify.c slapd-bind.c ldif-filter.c LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries @@ -54,3 +54,6 @@ slapd-modify: slapd-modify.o $(OBJS) $(XLIBS) slapd-bind: slapd-bind.o $(OBJS) $(XLIBS) $(LTLINK) -o $@ slapd-bind.o $(OBJS) $(LIBS) +ldif-filter: ldif-filter.o $(XLIBS) + $(LTLINK) -o $@ ldif-filter.o $(LIBS) + diff --git a/tests/progs/ldif-filter.c b/tests/progs/ldif-filter.c new file mode 100644 index 0000000000..e6d66b1ec9 --- /dev/null +++ b/tests/progs/ldif-filter.c @@ -0,0 +1,244 @@ +/* ldif-filter -- clean up LDIF testdata from stdin */ +/* $OpenLDAP$ */ +/* This work is part of OpenLDAP Software . + * + * Copyright 2009-2010 The OpenLDAP Foundation. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted only as authorized by the OpenLDAP + * Public License. + * + * A copy of this license is available in file LICENSE in the + * top-level directory of the distribution or, alternatively, at + * . + */ + +#include "portable.h" + +#include +#include +#include +#include +#include + +#define DEFAULT_SPECS "ndb=a,null=n" + +typedef struct { char *val; size_t len, alloc; } String; +typedef struct { String *val; size_t len, alloc; } Strings; + +/* Flags and corresponding program options */ +enum { SORT_ATTRS = 1, SORT_ENTRIES = 2, NO_OUTPUT = 4, DUMMY_FLAG = 8 }; +static const char spec_options[] = "aen"; /* option index = log2(enum flag) */ + +static const char *progname = "ldif-filter"; +static const String null_string = { NULL, 0, 0 }; + +static void +usage( void ) +{ + fprintf( stderr, "\ +Usage: %s [-b backend] [-s spec[,spec]...]\n\ +Filter standard input by first matching '[]=[a][e][n]':\n\ + - Remove LDIF comments.\n\ + - 'a': Sort attributes in entries.\n\ + - 'e': Sort any entries separated by just one empty line.\n\ + - 'n': Output nothing.\n\ + defaults to the $BACKEND environment variable.\n\ +Use specs '%s' if no spec on the command line applies.\n", + progname, DEFAULT_SPECS ); + exit( EXIT_FAILURE ); +} + +/* Return flags from "backend=flags" in spec; nonzero if backend found */ +static unsigned +get_flags( const char *backend, const char *spec ) +{ + size_t len = strlen( backend ); + unsigned flags = DUMMY_FLAG; + const char *tmp; + + while ( '=' != *(spec += strncmp( spec, backend, len ) ? 0 : len) ) { + if ( (spec = strchr( spec, ',' )) == NULL ) { + return 0; + } + ++spec; + } + while ( *++spec && *spec != ',' ) { + if ( (tmp = strchr( spec_options, *spec )) == NULL ) { + usage(); + } + flags |= 1U << (tmp - spec_options); + } + return flags; +} + +#define APPEND(s /* String or Strings */, data, count, isString) do { \ + size_t slen = (s)->len, salloc = (s)->alloc, sz = sizeof *(s)->val; \ + if ( salloc <= slen + (count) ) { \ + (s)->alloc = salloc += salloc + ((count)|7) + 1; \ + (s)->val = xrealloc( (s)->val, sz * salloc ); \ + } \ + memcpy( (s)->val + slen, data, sz * ((count) + !!(isString)) ); \ + (s)->len = slen + (count); \ +} while (0) + +static void * +xrealloc( void *ptr, size_t len ) +{ + if ( (ptr = realloc( ptr, len )) == NULL ) { + perror( progname ); + exit( EXIT_FAILURE ); + } + return ptr; +} + +static int +cmp( const void *s, const void *t ) +{ + return strcmp( ((const String *) s)->val, ((const String *) t)->val ); +} + +static void +sort_strings( Strings *ss, size_t offset ) +{ + qsort( ss->val + offset, ss->len - offset, sizeof(*ss->val), cmp ); +} + +/* Build entry ss[n] from attrs ss[n...], and free the attrs */ +static void +build_entry( Strings *ss, size_t n, unsigned flags, size_t new_len ) +{ + String *vals = ss->val, *e = &vals[n]; + size_t end = ss->len; + char *ptr; + + if ( flags & SORT_ATTRS ) { + sort_strings( ss, n + 1 ); + } + e->val = xrealloc( e->val, e->alloc = new_len + 1 ); + ptr = e->val + e->len; + e->len = new_len; + ss->len = ++n; + for ( ; n < end; free( vals[n++].val )) { + ptr = strcpy( ptr, vals[n].val ) + vals[n].len; + } + assert( ptr == e->val + new_len ); +} + +/* Flush entries to stdout and free them */ +static void +flush_entries( Strings *ss, const char *sep, unsigned flags ) +{ + size_t i, end = ss->len; + const char *prefix = ""; + + if ( flags & SORT_ENTRIES ) { + sort_strings( ss, 0 ); + } + for ( i = 0; i < end; i++, prefix = sep ) { + if ( printf( "%s%s", prefix, ss->val[i].val ) < 0 ) { + perror( progname ); + exit( EXIT_FAILURE ); + } + free( ss->val[i].val ); + } + ss->len = 0; +} + +static void +filter_stdin( unsigned flags ) +{ + char line[256]; + Strings ss = { NULL, 0, 0 }; /* entries + attrs of partial entry */ + size_t entries = 0, attrs_totlen = 0, line_len; + const char *entry_sep = "\n", *sep = ""; + int comment = 0, eof = 0, eol, prev_eol = 1; /* flags */ + String *s; + + /* LDIF = Entries ss[..entries-1] + sep + attrs ss[entries..] + line */ + for ( ; !eof || ss.len || *sep; prev_eol = eol ) { + if ( eof || (eof = !fgets( line, sizeof(line), stdin ))) { + strcpy( line, prev_eol ? "" : *sep ? sep : "\n" ); + } + line_len = strlen( line ); + eol = (line_len == 0 || line[line_len - 1] == '\n'); + + if ( *line == ' ' ) { /* continuation line? */ + prev_eol = 0; + } else if ( prev_eol ) { /* start of logical line? */ + comment = (*line == '#'); + } + if ( comment || (flags & NO_OUTPUT) ) { + continue; + } + + /* Collect attrs for partial entry in ss[entries...] */ + if ( !prev_eol && attrs_totlen != 0 ) { + goto grow_attr; + } else if ( line_len > (*line == '\r' ? 2 : 1) ) { + APPEND( &ss, &null_string, 1, 0 ); /* new attr */ + grow_attr: + s = &ss.val[ss.len - 1]; + APPEND( s, line, line_len, 1 ); /* strcat to attr */ + attrs_totlen += line_len; + continue; + } + + /* Empty line - consume sep+attrs or entries+sep */ + if ( attrs_totlen != 0 ) { + entry_sep = sep; + if ( entries == 0 ) + fputs( sep, stdout ); + build_entry( &ss, entries++, flags, attrs_totlen ); + attrs_totlen = 0; + } else { + flush_entries( &ss, entry_sep, flags ); + fputs( sep, stdout ); + entries = 0; + } + sep = "\r\n" + 2 - line_len; /* sep = copy(line) */ + } + + free( ss.val ); +} + +int +main( int argc, char **argv ) +{ + const char *backend = getenv( "BACKEND" ), *specs = "", *tmp; + unsigned flags; + int i; + + if ( argc > 0 ) { + progname = (tmp = strrchr( argv[0], '/' )) ? tmp+1 : argv[0]; + } + + while ( (i = getopt( argc, argv, "b:s:" )) != EOF ) { + switch ( i ) { + case 'b': + backend = optarg; + break; + case 's': + specs = optarg; + break; + default: + usage(); + } + } + if ( optind < argc ) { + usage(); + } + if ( backend == NULL ) { + backend = ""; + } + + flags = get_flags( backend, specs ); + filter_stdin( flags ? flags : get_flags( backend, DEFAULT_SPECS )); + if ( fclose( stdout ) == EOF ) { + perror( progname ); + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} diff --git a/tests/run.in b/tests/run.in index b0eaf3f48b..5b7620f52b 100644 --- a/tests/run.in +++ b/tests/run.in @@ -23,9 +23,13 @@ EGREP_CMD="@EGREP@" export SRCDIR TOPSRCDIR LN_S EGREP_CMD -# backends +# backends known to ./run -b (used to deduce $BACKENDTYPE) AC_bdb=@BUILD_BDB@ AC_hdb=@BUILD_HDB@ +AC_ldif=yes +AC_null=@BUILD_NULL@ + +# other backends AC_ldap=ldap@BUILD_LDAP@ AC_meta=meta@BUILD_META@ AC_monitor=@BUILD_MONITOR@ @@ -63,7 +67,7 @@ if test "${AC_meta}" = "metamod" && test "${AC_LIBS_DYNAMIC}" = "static" ; then AC_meta="metano" fi -export AC_bdb AC_hdb AC_ldap AC_meta AC_monitor AC_relay AC_sql \ +export AC_bdb AC_hdb AC_ldap AC_meta AC_monitor AC_null AC_relay AC_sql \ AC_accesslog AC_dds AC_dynlist AC_memberof AC_pcache AC_ppolicy \ AC_refint AC_retcode AC_rwm AC_unique AC_syncprov AC_translucent \ AC_valsort \ diff --git a/tests/scripts/acfilter.sh b/tests/scripts/acfilter.sh deleted file mode 100755 index 3985c1ff7f..0000000000 --- a/tests/scripts/acfilter.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /bin/sh -# $OpenLDAP$ -## This work is part of OpenLDAP Software . -## -## Copyright 1998-2010 The OpenLDAP Foundation. -## All rights reserved. -## -## Redistribution and use in source and binary forms, with or without -## modification, are permitted only as authorized by the OpenLDAP -## Public License. -## -## A copy of this license is available in the file LICENSE in the -## top-level directory of the distribution or, alternatively, at -## . -# -# Strip comments, sort attributes. Requires GNU awk -# -if [ "$BACKEND" != ndb ]; then -grep -v '^#' -else -grep -v '^#'| awk 'BEGIN{FS="\n";RS=""} {j=0; for (i=1; i<=NF; i++){ if ($i ~ /^ /){ x[j] = x[j] "\n" $i; } else { j++; x[j] = $i } } print x[1]; delete x[1]; j=asort(x); for (i=1; i<=j; i++){ print x[i]; } delete x; print "" }' -fi diff --git a/tests/scripts/conf.sh b/tests/scripts/conf.sh index 712a752a49..11530114a1 100755 --- a/tests/scripts/conf.sh +++ b/tests/scripts/conf.sh @@ -33,6 +33,8 @@ else fi sed -e "s/@BACKEND@/${BACKEND}/" \ -e "s/^#${BACKEND}#//" \ + -e "/^#~/s/^#[^#]*~${BACKEND}~[^#]*#/#omit: /" \ + -e "s/^#~[^#]*~#//" \ -e "s/@RELAY@/${RELAY}/" \ -e "s/^#relay-${RELAY}#//" \ -e "s/^#${BACKENDTYPE}#//" \ diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index 189c62e105..48d8c9a3e9 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -163,7 +163,6 @@ TOOLARGS="-x $LDAP_TOOLARGS" TOOLPROTO="-P 3" # cmds -LDIFFILTER=$SRCDIR/scripts/acfilter.sh CONFFILTER=$SRCDIR/scripts/conf.sh MONITORDATA=$SRCDIR/scripts/monitor_data.sh @@ -192,6 +191,7 @@ LDAPWHOAMI="$CLIENTDIR/ldapwhoami $TOOLARGS" LDAPCOMPARE="$CLIENTDIR/ldapcompare $TOOLARGS" LDAPEXOP="$CLIENTDIR/ldapexop $TOOLARGS" SLAPDTESTER=$PROGDIR/slapd-tester +LDIFFILTER=$PROGDIR/ldif-filter LVL=${SLAPD_DEBUG-0x4105} LOCALHOST=localhost BASEPORT=${SLAPD_BASEPORT-9010} diff --git a/tests/scripts/relay b/tests/scripts/relay index b3a158b397..d6581eaeb8 100755 --- a/tests/scripts/relay +++ b/tests/scripts/relay @@ -344,9 +344,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $RELAYOUT > $LDIFFLT +$LDIFFILTER < $RELAYOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -386,11 +386,10 @@ $LDAPCOMPARE -h $LOCALHOST -p $PORT1 \ "cn=Added User,ou=Alumni Association,ou=People,$BASEDN" \ "seeAlso:cn=All Staff,ou=Groups,$BASEDN" >> $TESTOUT 2>&1 RC=$? -if test $RC != 6 ; then +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 - diff --git a/tests/scripts/sql-test000-read b/tests/scripts/sql-test000-read index dadd7536b5..2c25159500 100755 --- a/tests/scripts/sql-test000-read +++ b/tests/scripts/sql-test000-read @@ -550,9 +550,9 @@ case $RC in esac echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif..." -. $LDIFFILTER < $SQLREAD > $LDIFFLT +$LDIFFILTER < $SQLREAD > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/sql-test001-concurrency b/tests/scripts/sql-test001-concurrency index aef934c347..fdf9d71ff1 100755 --- a/tests/scripts/sql-test001-concurrency +++ b/tests/scripts/sql-test001-concurrency @@ -79,7 +79,7 @@ if test $RC != 0 ; then fi echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $SEARCHOUT > $LDIFFLT +$LDIFFILTER < $SEARCHOUT > $LDIFFLT if test "${RDBMSWRITE}" != "yes"; then echo "write test disabled for ${RDBMS}; set SLAPD_USE_SQLWRITE=yes to enable" @@ -124,7 +124,7 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/sql-test900-write b/tests/scripts/sql-test900-write index 2c27a4aa8d..8eb6c3c12f 100755 --- a/tests/scripts/sql-test900-write +++ b/tests/scripts/sql-test900-write @@ -549,9 +549,9 @@ EOMODS fi echo "Filtering ldapsearch results..." - . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT + $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering modified ldif..." - . $LDIFFILTER < $SQLWRITE > $LDIFFLT + $LDIFFILTER < $SQLWRITE > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/sql-test901-syncrepl b/tests/scripts/sql-test901-syncrepl index d59855f98b..b2cfc2e1c2 100755 --- a/tests/scripts/sql-test901-syncrepl +++ b/tests/scripts/sql-test901-syncrepl @@ -122,9 +122,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results from master..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering ldapsearch results from slave..." -. $LDIFFILTER < $SEARCHOUT2 > $SEARCHFLT2 +$LDIFFILTER < $SEARCHOUT2 > $SEARCHFLT2 echo "Comparing filter output..." $CMP $SEARCHFLT $SEARCHFLT2 > $CMPOUT @@ -620,9 +620,9 @@ EOMODS fi echo "Filtering ldapsearch results..." - . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT + $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering modified ldif..." - . $LDIFFILTER < $SQLWRITE > $LDIFFLT + $LDIFFILTER < $SQLWRITE > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -668,9 +668,9 @@ EOMODS fi echo "Filtering ldapsearch results from master..." - . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT + $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering ldapsearch results from slave..." - . $LDIFFILTER < $SEARCHOUT2 > $SEARCHFLT2 + $LDIFFILTER < $SEARCHOUT2 > $SEARCHFLT2 echo "Comparing filter output..." $CMP $SEARCHFLT $SEARCHFLT2 > $CMPOUT diff --git a/tests/scripts/start-server b/tests/scripts/start-server index b4d893c462..df16fde0d8 100755 --- a/tests/scripts/start-server +++ b/tests/scripts/start-server @@ -48,9 +48,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/start-server-nolog b/tests/scripts/start-server-nolog index 65e3cc3bb1..272aefbdfe 100755 --- a/tests/scripts/start-server-nolog +++ b/tests/scripts/start-server-nolog @@ -48,9 +48,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test001-slapadd b/tests/scripts/test001-slapadd index 0d18ffa180..6314323fdf 100755 --- a/tests/scripts/test001-slapadd +++ b/tests/scripts/test001-slapadd @@ -58,9 +58,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test002-populate b/tests/scripts/test002-populate index be8c9f99ef..84a37b9d6a 100755 --- a/tests/scripts/test002-populate +++ b/tests/scripts/test002-populate @@ -65,9 +65,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test003-search b/tests/scripts/test003-search index c4b54bb212..d5675ca0fc 100755 --- a/tests/scripts/test003-search +++ b/tests/scripts/test003-search @@ -133,9 +133,9 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS LDIF=$SEARCHOUTMASTER echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test004-modify b/tests/scripts/test004-modify index e28fa073df..ad8507c504 100755 --- a/tests/scripts/test004-modify +++ b/tests/scripts/test004-modify @@ -216,9 +216,9 @@ fi LDIF=$MODIFYOUTMASTER echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test005-modrdn b/tests/scripts/test005-modrdn index 2e3af58d2c..a8995a24d8 100755 --- a/tests/scripts/test005-modrdn +++ b/tests/scripts/test005-modrdn @@ -98,9 +98,9 @@ fi LDIF=$MODRDNOUTMASTER1 echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -125,9 +125,9 @@ fi LDIF=$MODRDNOUTMASTER2 echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -169,9 +169,9 @@ fi LDIF=$MODRDNOUTMASTER0 echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -209,9 +209,9 @@ fi LDIF=$MODRDNOUTMASTER3 echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test006-acls b/tests/scripts/test006-acls index 86644a7915..c3ce8dc04e 100755 --- a/tests/scripts/test006-acls +++ b/tests/scripts/test006-acls @@ -13,11 +13,8 @@ ## top-level directory of the distribution or, alternatively, at ## . -case "$BACKEND" in -bdb|hdb) - ;; -*) - echo "Test does not support $BACKEND backend" +case "$BACKEND" in ldif | null) + echo "$BACKEND backend does not support access controls, test skipped" exit 0 esac @@ -652,9 +649,9 @@ fi LDIF=$ACLOUTMASTER echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test008-concurrency b/tests/scripts/test008-concurrency index a154084a71..208550004d 100755 --- a/tests/scripts/test008-concurrency +++ b/tests/scripts/test008-concurrency @@ -82,9 +82,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test009-referral b/tests/scripts/test009-referral index 6f98e25f6d..bedad1f95e 100755 --- a/tests/scripts/test009-referral +++ b/tests/scripts/test009-referral @@ -163,9 +163,9 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS LDIF=$SEARCHOUTMASTER echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test011-glue-slapadd b/tests/scripts/test011-glue-slapadd index e89506dafe..d41e789241 100755 --- a/tests/scripts/test011-glue-slapadd +++ b/tests/scripts/test011-glue-slapadd @@ -56,9 +56,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER -s ldif=e < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIFGLUED > $LDIFFLT +$LDIFFILTER -s ldif=e < $LDIFGLUED > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -70,6 +70,7 @@ if test $? != 0 ; then exit 1 fi +if test $BACKEND != null ; then echo "Testing sizelimit..." $LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT1 -s one -z 2 > $SEARCHOUT 2>&1 RC=$? @@ -86,6 +87,7 @@ if test $RC = 0 ; then test $KILLSERVERS != no && kill -HUP $KILLPIDS exit 1 fi +fi test $KILLSERVERS != no && kill -HUP $KILLPIDS diff --git a/tests/scripts/test012-glue-populate b/tests/scripts/test012-glue-populate index 461b902fcb..b13feb0532 100755 --- a/tests/scripts/test012-glue-populate +++ b/tests/scripts/test012-glue-populate @@ -65,9 +65,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER -s ldif=e < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIFGLUED > $LDIFFLT +$LDIFFILTER -s ldif=e < $LDIFGLUED > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test013-language b/tests/scripts/test013-language index 6307c3ed7c..db7e7396a6 100755 --- a/tests/scripts/test013-language +++ b/tests/scripts/test013-language @@ -99,9 +99,9 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering language ldif ..." -. $LDIFFILTER < $LDIFLANGOUT > $LDIFFLT +$LDIFFILTER < $LDIFLANGOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test014-whoami b/tests/scripts/test014-whoami index b58d322652..c8c3019753 100755 --- a/tests/scripts/test014-whoami +++ b/tests/scripts/test014-whoami @@ -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" diff --git a/tests/scripts/test015-xsearch b/tests/scripts/test015-xsearch index 4b49d04b46..6a6149c650 100755 --- a/tests/scripts/test015-xsearch +++ b/tests/scripts/test015-xsearch @@ -229,10 +229,10 @@ LDIF=$SEARCHOUTMASTER LDIF2=$SEARCHOUTX echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT -. $LDIFFILTER < $LDIF2 >> $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF2 >> $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test016-subref b/tests/scripts/test016-subref index 952f33d102..05afbe0620 100755 --- a/tests/scripts/test016-subref +++ b/tests/scripts/test016-subref @@ -14,6 +14,7 @@ ## . RCODE=10 +test $BACKEND = null && RCODE=0 echo "running defines.sh" . $SRCDIR/scripts/defines.sh @@ -87,7 +88,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 +126,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 +135,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 +144,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 +154,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 +163,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,16 +172,16 @@ 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 LDIF=$SEARCHOUTMASTER echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering expected LDIF for comparison..." -. $LDIFFILTER < $REFERRALOUT > $LDIFFLT +$LDIFFILTER < $REFERRALOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test017-syncreplication-refresh b/tests/scripts/test017-syncreplication-refresh index 3b7fab7b05..cc213e26fe 100755 --- a/tests/scripts/test017-syncreplication-refresh +++ b/tests/scripts/test017-syncreplication-refresh @@ -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" @@ -337,9 +337,9 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS echo "Filtering producer results..." -. $LDIFFILTER < $MASTEROUT > $MASTERFLT +$LDIFFILTER < $MASTEROUT > $MASTERFLT echo "Filtering consumer results..." -. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT +$LDIFFILTER < $SLAVEOUT > $SLAVEFLT echo "Comparing retrieved entries from producer and consumer..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT diff --git a/tests/scripts/test018-syncreplication-persist b/tests/scripts/test018-syncreplication-persist index 86077d450e..9b1059885c 100755 --- a/tests/scripts/test018-syncreplication-persist +++ b/tests/scripts/test018-syncreplication-persist @@ -13,11 +13,6 @@ ## top-level directory of the distribution or, alternatively, at ## . -if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" && test "$BACKEND" != "ldif"; then - echo "Test does not support $BACKEND" - exit 0 -fi - echo "running defines.sh" . $SRCDIR/scripts/defines.sh @@ -383,9 +378,9 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS echo "Filtering producer results..." -. $LDIFFILTER < $MASTEROUT > $MASTERFLT +$LDIFFILTER < $MASTEROUT > $MASTERFLT echo "Filtering consumer results..." -. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT +$LDIFFILTER < $SLAVEOUT > $SLAVEFLT echo "Comparing retrieved entries from producer and consumer..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT diff --git a/tests/scripts/test019-syncreplication-cascade b/tests/scripts/test019-syncreplication-cascade index 975a82ad44..369fe79eca 100755 --- a/tests/scripts/test019-syncreplication-cascade +++ b/tests/scripts/test019-syncreplication-cascade @@ -13,11 +13,6 @@ ## top-level directory of the distribution or, alternatively, at ## . -if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then - echo "Test does not support $BACKEND" - exit 0 -fi - echo "running defines.sh" . $SRCDIR/scripts/defines.sh @@ -433,17 +428,17 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS echo "Filtering master ldapsearch results..." -. $LDIFFILTER < $MASTEROUT > $MASTERFLT +$LDIFFILTER < $MASTEROUT > $MASTERFLT echo "Filtering R1 slave ldapsearch results..." -. $LDIFFILTER < $SERVER2OUT > $SERVER2FLT +$LDIFFILTER < $SERVER2OUT > $SERVER2FLT echo "Filtering R2 slave ldapsearch results..." -. $LDIFFILTER < $SERVER3OUT > $SERVER3FLT +$LDIFFILTER < $SERVER3OUT > $SERVER3FLT echo "Filtering P1 slave ldapsearch results..." -. $LDIFFILTER < $SERVER4OUT > $SERVER4FLT +$LDIFFILTER < $SERVER4OUT > $SERVER4FLT echo "Filtering P2 slave ldapsearch results..." -. $LDIFFILTER < $SERVER5OUT > $SERVER5FLT +$LDIFFILTER < $SERVER5OUT > $SERVER5FLT echo "Filtering P3 slave ldapsearch results..." -. $LDIFFILTER < $SERVER6OUT > $SERVER6FLT +$LDIFFILTER < $SERVER6OUT > $SERVER6FLT echo "Comparing retrieved entries from master and R1 slave..." $CMP $MASTERFLT $SERVER2FLT > $CMPOUT diff --git a/tests/scripts/test020-proxycache b/tests/scripts/test020-proxycache index 98da6938f5..a0b0e25e31 100755 --- a/tests/scripts/test020-proxycache +++ b/tests/scripts/test020-proxycache @@ -33,6 +33,13 @@ if test $BACKLDAP = "ldapno" ; then exit 0 fi +if test $BACKEND = ldif ; then + # The (mail=example.com*) queries hit a sizelimit, so which + # entry is returned depends on the ordering in the backend. + echo "Test does not support $BACKEND backend, test skipped" + exit 0 +fi + mkdir -p $TESTDIR $DBDIR1 $DBDIR2 # Test proxy caching: @@ -455,9 +462,9 @@ else fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif..." -. $LDIFFILTER < $PROXYCACHEOUT > $LDIFFLT +$LDIFFILTER < $PROXYCACHEOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test021-certificate b/tests/scripts/test021-certificate index 1cd55b9c6b..9881701d20 100755 --- a/tests/scripts/test021-certificate +++ b/tests/scripts/test021-certificate @@ -307,9 +307,9 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS LDIF=$CERTIFICATETLS echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test023-refint b/tests/scripts/test023-refint index a9eea73b2f..3f3cd25fb5 100755 --- a/tests/scripts/test023-refint +++ b/tests/scripts/test023-refint @@ -13,11 +13,6 @@ ## top-level directory of the distribution or, alternatively, at ## . -if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then - echo "Test does not support $BACKEND" - exit 0 -fi - echo "running defines.sh" . $SRCDIR/scripts/defines.sh @@ -194,7 +189,7 @@ if test $RC != 0 ; then exit $RC fi -if test $BACKEND = "hdb" ; then +if test $BACKEND != "bdb" ; then $LDAPMODIFY -v -D "$REFINTDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \ $TESTOUT 2>&1 << EDEL version: 1 diff --git a/tests/scripts/test024-unique b/tests/scripts/test024-unique index fa8353793f..fa94e62e65 100755 --- a/tests/scripts/test024-unique +++ b/tests/scripts/test024-unique @@ -21,6 +21,9 @@ if test $UNIQUE = uniqueno; then exit 0 fi +RCODEconstraint=19 +test $BACKEND = null && RCODEconstraint=0 + mkdir -p $TESTDIR $DBDIR1 $SLAPPASSWD -g -n >$CONFIGPWF @@ -107,7 +110,7 @@ employeeType: contractor givenName: Bill EOTUNIQ2 RC=$? -if test $RC != 19 ; then +if test $RC != $RCODEconstraint ; then echo "unique check failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 @@ -223,7 +226,7 @@ employeeType: contractor givenName: Bill EOTUNIQ2 RC=$? -if test $RC != 19 ; then +if test $RC != $RCODEconstraint ; then echo "unique check failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 @@ -280,7 +283,7 @@ employeeType: contractor givenName: Bill EOTUNIQ2 RC=$? -if test $RC != 19 ; then +if test $RC != $RCODEconstraint ; then echo "olcUniqueAttribtue single deletion hit the wrong value" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 @@ -340,7 +343,7 @@ employeeType: contractor givenName: Bill EOTUNIQ2 RC=$? -if test $RC != 19 ; then +if test $RC != $RCODEconstraint ; then echo "unique check failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 @@ -505,7 +508,7 @@ cn: elvis EOF RC=$? -if test $RC != 19 ; then +if test $RC != $RCODEconstraint ; then echo "unique check failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 @@ -577,7 +580,7 @@ description: left the building EOF RC=$? -if test $RC != 19 ; then +if test $RC != $RCODEconstraint ; then echo "unique check failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 diff --git a/tests/scripts/test025-limits b/tests/scripts/test025-limits index 3a7e4d5a0e..7fa4049a75 100755 --- a/tests/scripts/test025-limits +++ b/tests/scripts/test025-limits @@ -18,6 +18,11 @@ echo "running defines.sh" . $SRCDIR/scripts/defines.sh +if test $BACKEND = null; then + echo "Limits irrelevant to $BACKEND backend, test skipped" + exit 0 +fi + mkdir -p $TESTDIR $DBDIR1 echo "Running slapadd to build slapd database..." diff --git a/tests/scripts/test026-dn b/tests/scripts/test026-dn index 62e25ad822..3c27e3f570 100755 --- a/tests/scripts/test026-dn +++ b/tests/scripts/test026-dn @@ -160,9 +160,9 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original data..." -. $LDIFFILTER < $DNOUT > $LDIFFLT +$LDIFFILTER < $DNOUT > $LDIFFLT echo "Comparing ldapsearch results against original..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test027-emptydn b/tests/scripts/test027-emptydn index c87120096a..ff1b3d09ab 100755 --- a/tests/scripts/test027-emptydn +++ b/tests/scripts/test027-emptydn @@ -78,12 +78,12 @@ fi kill -HUP $KILLPIDS wait -LDIFOUT=$EMPTYDNOUT1 - echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT +echo "Filtering expected results..." +$LDIFFILTER < $EMPTYDNOUT1 > $LDIFFLT echo "Comparing ldapsearch results against original..." -$CMP $SEARCHFLT $LDIFOUT > $CMPOUT +$CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "comparison failed - empty DN write operations did not complete correctly" @@ -154,12 +154,12 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS -LDIFOUT=$EMPTYDNOUT2 - echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT +echo "Filtering expected results..." +$LDIFFILTER < $EMPTYDNOUT2 > $LDIFFLT echo "Comparing ldapsearch results against original..." -$CMP $SEARCHFLT $LDIFOUT > $CMPOUT +$CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "comparison failed - empty DN write operations did not complete correctly" diff --git a/tests/scripts/test028-idassert b/tests/scripts/test028-idassert index 876af226bd..8eac6f199b 100755 --- a/tests/scripts/test028-idassert +++ b/tests/scripts/test028-idassert @@ -106,7 +106,7 @@ AUTHZID="u:it/jaj" echo "Testing ldapwhoami as proxy US, $AUTHZID..." $LDAPWHOAMI -h $LOCALHOST -p $PORT1 -D "cn=proxy US,ou=Admin,dc=example,dc=com" -w proxy -e\!"authzid=$AUTHZID" RC=$? -if test $RC != 0 ; then +if test $RC != 0 && test $BACKEND != null ; then echo "ldapwhoami failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC @@ -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,14 +158,14 @@ 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" echo "Testing ldapwhoami as proxy IT, $AUTHZID..." $LDAPWHOAMI -h $LOCALHOST -p $PORT1 -D "cn=proxy IT,ou=Admin,dc=example,dc=com" -w proxy -e\!"authzid=$AUTHZID" RC=$? -if test $RC != 0 ; then +if test $RC != 0 && test $BACKEND != null ; then echo "ldapwhoami failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC @@ -198,19 +198,19 @@ $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASE" \ -D "$ID" -w jaj > $SEARCHOUT 2>&1 RC=$? -if test $RC != 0 ; then +if test $RC != 0 && test $BACKEND != null ; then echo "ldapsearch failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER -s ldif=e < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $IDASSERTOUT > $LDIFFLT +$LDIFFILTER -s ldif=e < $IDASSERTOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT - + if test $? != 0 ; then echo "comparison failed - search with identity assertion didn't succeed" test $KILLSERVERS != no && kill -HUP $KILLPIDS @@ -232,9 +232,9 @@ if test $USE_SASL != "no" ; then fi echo "Filtering ldapsearch results..." - . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT + $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." - . $LDIFFILTER < $IDASSERTOUT > $LDIFFLT + $LDIFFILTER < $IDASSERTOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test029-ldapglue b/tests/scripts/test029-ldapglue index 6e62fd96e2..a21e4b8a4a 100755 --- a/tests/scripts/test029-ldapglue +++ b/tests/scripts/test029-ldapglue @@ -149,9 +149,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER -s ldif=e < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDAPGLUEOUT > $LDIFFLT +$LDIFFILTER -s ldif=e < $LDAPGLUEOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -174,9 +174,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDAPGLUEANONYMOUSOUT > $LDIFFLT +$LDIFFILTER < $LDAPGLUEANONYMOUSOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -202,9 +202,9 @@ if test $USE_SASL != "no" ; then fi echo "Filtering ldapsearch results..." - . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT + $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." - . $LDIFFILTER < $LDAPGLUEOUT > $LDIFFLT + $LDIFFILTER < $LDAPGLUEOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test031-component-filter b/tests/scripts/test031-component-filter index 1247a1e21d..617a18e43d 100755 --- a/tests/scripts/test031-component-filter +++ b/tests/scripts/test031-component-filter @@ -314,7 +314,7 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Comparing filter output..." $CMP $SEARCHFLT $COMPSEARCHOUT > $CMPOUT diff --git a/tests/scripts/test032-chain b/tests/scripts/test032-chain index 27dd5664e3..61326124d5 100755 --- a/tests/scripts/test032-chain +++ b/tests/scripts/test032-chain @@ -116,9 +116,9 @@ for P in $PORT1 $PORT2 ; do fi echo "Filtering ldapsearch results..." - . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT + $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." - . $LDIFFILTER < $CHAINOUT > $LDIFFLT + $LDIFFILTER < $CHAINOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -140,9 +140,9 @@ for P in $PORT1 $PORT2 ; do fi echo "Filtering ldapsearch results..." - . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT + $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." - . $LDIFFILTER < $CHAINREFOUT > $LDIFFLT + $LDIFFILTER < $CHAINREFOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -158,10 +158,10 @@ for P in $PORT1 $PORT2 ; do > $TESTOUT 2>&1 RC=$? - if test $RC != 6 ; then + 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" @@ -170,10 +170,10 @@ for P in $PORT1 $PORT2 ; do > $TESTOUT 2>&1 RC=$? - if test $RC != 6 ; then + 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 @@ -269,9 +269,9 @@ for P in $PORT1 $PORT2 ; do fi echo "Filtering ldapsearch results..." - . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT + $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." - . $LDIFFILTER < $CHAINMODOUT > $LDIFFLT + $LDIFFILTER < $CHAINMODOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test033-glue-syncrepl b/tests/scripts/test033-glue-syncrepl index 797c789af9..af3bab615b 100755 --- a/tests/scripts/test033-glue-syncrepl +++ b/tests/scripts/test033-glue-syncrepl @@ -13,11 +13,6 @@ ## top-level directory of the distribution or, alternatively, at ## . -case $BACKEND in bdb | hdb | ldif) : ;; *) - echo "Test does not support $BACKEND backend, test skipped" - exit 0 -esac - echo "running defines.sh" . $SRCDIR/scripts/defines.sh @@ -137,7 +132,7 @@ echo "Waiting $SLEEP1 seconds for shadow subtrees to sync..." sleep $SLEEP1 echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $GLUESYNCOUT > $LDIFFLT +$LDIFFILTER < $GLUESYNCOUT > $LDIFFLT for P in $PORT1 $PORT2 ; do echo "Using ldapsearch to read all the entries from port $P..." @@ -152,7 +147,7 @@ for P in $PORT1 $PORT2 ; do fi echo "Filtering ldapsearch results..." - . $LDIFFILTER < "${SEARCHOUT}.${P}" > $SEARCHFLT + $LDIFFILTER < "${SEARCHOUT}.${P}" > $SEARCHFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -178,7 +173,7 @@ sleep 1 $LDAPSEARCH -H $URI2 -b "$BABSDN" > $TESTOUT 2>&1 RC=$? -if test $RC = 0 ; then +if test $RC = 0 && test $BACKEND != null ; then echo "ldapsearch should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 diff --git a/tests/scripts/test034-translucent b/tests/scripts/test034-translucent index 3561be344c..9233d85180 100755 --- a/tests/scripts/test034-translucent +++ b/tests/scripts/test034-translucent @@ -156,8 +156,8 @@ if test $RC != 0 ; then exit $RC fi -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT -. $LDIFFILTER < $LDIFTRANSLUCENTDATA > $LDIFFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $LDIFTRANSLUCENTDATA > $LDIFFLT $CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then @@ -185,7 +185,7 @@ $LDAPADD -v -v -v -D "$TRANSLUCENTROOT" -H $URI2 \ -w $PASSWD < $LDIFTRANSLUCENTADD > $TESTOUT 2>&1 RC=$? -if test $RC != 32 ; then +if test $RC != 32 && test $RC,$BACKEND != 0,null ; then echo "ldapadd failed ($RC), expected NO SUCH OBJECT!" grep "$FAILURE" $TESTOUT test $KILLSERVERS != no && kill -HUP $KILLPIDS @@ -198,7 +198,7 @@ $LDAPMODRDN -D "$TRANSLUCENTROOT" -H $URI2 -w $PASSWD > \ $TESTOUT 2>&1 'uid=fred,ou=users,o=translucent' 'uid=someguy' RC=$? -if test $RC != 32 ; then +if test $RC != 32 && test $RC,$BACKEND != 0,null ; then echo "ldapmodrdn failed ($RC), expected NO SUCH OBJECT!" grep "$FAILURE" $TESTOUT test $KILLSERVERS != no && kill -HUP $KILLPIDS @@ -244,8 +244,9 @@ if test $RC != 0 ; then exit $RC fi -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT -$CMP $SEARCHFLT $LDIFTRANSLUCENTMERGED > $CMPOUT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $LDIFTRANSLUCENTMERGED > $LDIFFLT +$CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "Comparison failed -- local data failed to merge with remote!" diff --git a/tests/scripts/test035-meta b/tests/scripts/test035-meta index bec6cc6416..3963a2952c 100755 --- a/tests/scripts/test035-meta +++ b/tests/scripts/test035-meta @@ -485,14 +485,14 @@ $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT3 \ -b "$BASEDN" "(objectClass=*)" 1.1 \ >> $TESTOUT 2>&1 RC=$? -case $RC in - 0) +case $RC,$BACKEND in + 4,* | 0,null) + ;; + 0,*) echo "Search should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 ;; - 4) - ;; *) echo "Search failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS @@ -509,14 +509,14 @@ $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT3 \ -b "$BASEDN" -z 2 "(objectClass=*)" 1.1 \ >> $TESTOUT 2>&1 RC=$? -case $RC in - 0) +case $RC,$BACKEND in + 4,* | 0,null) + ;; + 0,*) echo "Search should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 ;; - 4) - ;; *) echo "Search failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS @@ -525,9 +525,9 @@ case $RC in esac echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $METAOUT > $LDIFFLT +$LDIFFILTER < $METAOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -667,13 +667,15 @@ RC=$? # test $KILLSERVERS != no && kill -HUP $KILLPIDS # exit $RC #fi -case $RC in - 0) +case $RC,$BACKEND in + 0,null) + ;; + 0,*) echo "WhoAmI should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 ;; - 51) + 51,*) echo "### Hit LDAP_BUSY problem; you may want to re-run the test" ;; *) @@ -690,13 +692,15 @@ RC=$? # test $KILLSERVERS != no && kill -HUP $KILLPIDS # exit $RC #fi -case $RC in - 0) +case $RC,$BACKEND in + 0,null) + ;; + 0,*) echo "WhoAmI should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 ;; - 51) + 51,*) echo "### Hit LDAP_BUSY problem; you may want to re-run the test" ;; *) @@ -713,16 +717,16 @@ RC=$? # test $KILLSERVERS != no && kill -HUP $KILLPIDS # exit -1 #fi -case $RC in - 6) +case $RC,$BACKEND in + 6,* | 5,null) ;; - 51) + 51,*) echo "### Hit LDAP_BUSY problem; you may want to re-run the test" ;; *) echo "Compare failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 ;; esac diff --git a/tests/scripts/test036-meta-concurrency b/tests/scripts/test036-meta-concurrency index d82183344e..339e1e03f5 100755 --- a/tests/scripts/test036-meta-concurrency +++ b/tests/scripts/test036-meta-concurrency @@ -218,9 +218,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $METACONCURRENCYOUT > $LDIFFLT +$LDIFFILTER < $METACONCURRENCYOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test037-manage b/tests/scripts/test037-manage index 0666d27c21..bfb3c2c33a 100755 --- a/tests/scripts/test037-manage +++ b/tests/scripts/test037-manage @@ -201,9 +201,9 @@ fi LDIF=$MANAGEOUT echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test039-glue-ldap-concurrency b/tests/scripts/test039-glue-ldap-concurrency index 9f67ebe98a..b441d2b1fc 100755 --- a/tests/scripts/test039-glue-ldap-concurrency +++ b/tests/scripts/test039-glue-ldap-concurrency @@ -207,9 +207,9 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $METACONCURRENCYOUT > $LDIFFLT +$LDIFFILTER < $METACONCURRENCYOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test040-subtree-rename b/tests/scripts/test040-subtree-rename index 4bb20fe4ce..121c857d0e 100755 --- a/tests/scripts/test040-subtree-rename +++ b/tests/scripts/test040-subtree-rename @@ -16,13 +16,10 @@ echo "running defines.sh" . $SRCDIR/scripts/defines.sh -case $BACKEND in -hdb | ldif) - ;; -*) +if test $BACKEND = bdb ; then echo "subtree rename not supported by back-$BACKEND" exit 0 -esac +fi mkdir -p $TESTDIR $DBDIR1 @@ -194,9 +191,9 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS LDIF=$SUBTREERENAMEOUT echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test041-aci b/tests/scripts/test041-aci index 8a677e7bec..4afc7821f5 100755 --- a/tests/scripts/test041-aci +++ b/tests/scripts/test041-aci @@ -13,11 +13,8 @@ ## top-level directory of the distribution or, alternatively, at ## . -case "$BACKEND" in -bdb|hdb) - ;; -*) - echo "Test does not support $BACKEND backend" +case "$BACKEND" in ldif | null) + echo "$BACKEND backend does not support access controls, test skipped" exit 0 ;; esac @@ -243,9 +240,9 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS LDIF=$ACIOUT echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test042-valsort b/tests/scripts/test042-valsort index d23d6bb2d8..4073a5ce73 100755 --- a/tests/scripts/test042-valsort +++ b/tests/scripts/test042-valsort @@ -78,9 +78,11 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT +echo "Filtering expected ldif..." +$LDIFFILTER < $VALSORTOUT1 > $LDIFFLT echo "Comparing filter output..." -$CMP $SEARCHFLT $VALSORTOUT1 > $CMPOUT +$CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "Comparison failed" @@ -124,9 +126,11 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT +echo "Filtering expected ldif..." +$LDIFFILTER < $VALSORTOUT2 > $LDIFFLT echo "Comparing filter output..." -$CMP $SEARCHFLT $VALSORTOUT2 > $CMPOUT +$CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "Comparison failed" @@ -204,9 +208,11 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER -s ldif=e < $SEARCHOUT > $SEARCHFLT +echo "Filtering expected ldif..." +$LDIFFILTER -s ldif=e < $VALSORTOUT3 > $LDIFFLT echo "Comparing filter output..." -$CMP $SEARCHFLT $VALSORTOUT3 > $CMPOUT +$CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "Comparison failed" diff --git a/tests/scripts/test043-delta-syncrepl b/tests/scripts/test043-delta-syncrepl index 3d4f303716..59971e58f7 100755 --- a/tests/scripts/test043-delta-syncrepl +++ b/tests/scripts/test043-delta-syncrepl @@ -13,11 +13,6 @@ ## top-level directory of the distribution or, alternatively, at ## . -if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then - echo "Test does not support $BACKEND" - exit 0 -fi - echo "running defines.sh" . $SRCDIR/scripts/defines.sh @@ -29,6 +24,11 @@ if test $ACCESSLOG = accesslogno; then echo "Accesslog overlay not available, test skipped" exit 0 fi +if test $BACKEND = ldif ; then + # Onelevel search does not return entries in order of creation or CSN. + echo "$BACKEND backend unsuitable for syncprov logdb, test skipped" + exit 0 +fi mkdir -p $TESTDIR $DBDIR1A $DBDIR1B $DBDIR2 @@ -339,9 +339,9 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS echo "Filtering producer results..." -. $LDIFFILTER < $MASTEROUT | grep -iv "^auditcontext:" > $MASTERFLT +$LDIFFILTER < $MASTEROUT | grep -iv "^auditcontext:" > $MASTERFLT echo "Filtering consumer results..." -. $LDIFFILTER < $SLAVEOUT | grep -iv "^auditcontext:" > $SLAVEFLT +$LDIFFILTER < $SLAVEOUT | grep -iv "^auditcontext:" > $SLAVEFLT echo "Comparing retrieved entries from producer and consumer..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT diff --git a/tests/scripts/test044-dynlist b/tests/scripts/test044-dynlist index 1c084e025a..4e0f1bdda6 100755 --- a/tests/scripts/test044-dynlist +++ b/tests/scripts/test044-dynlist @@ -20,6 +20,12 @@ if test $DYNLIST = "dynlistno" ; then exit 0 fi +if test $BACKEND = ldif ; then + # dynlist+ldif fails because back-ldif lacks bi_op_compare() + echo "$BACKEND backend unsuitable for dynlist overlay, test skipped" + exit 0 +fi + mkdir -p $TESTDIR $DBDIR1 $SLAPPASSWD -g -n >$CONFIGPWF @@ -603,9 +609,9 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS LDIF=$DYNLISTOUT echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test045-syncreplication-proxied b/tests/scripts/test045-syncreplication-proxied index 4b7031218a..d810676228 100755 --- a/tests/scripts/test045-syncreplication-proxied +++ b/tests/scripts/test045-syncreplication-proxied @@ -13,10 +13,6 @@ ## top-level directory of the distribution or, alternatively, at ## . -if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then - echo "Test does not support $BACKEND" - exit 0 -fi # test now handles known issues #if test x"$PROXYSYNC" = x ; then @@ -230,9 +226,9 @@ if test $RC != 0 ; then fi #echo "Filtering master results..." -. $LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT +$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -420,9 +416,9 @@ if test $RC != 0 ; then fi #echo "Filtering master results..." -. $LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT +$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -527,9 +523,9 @@ if test $RC != 0 ; then fi #echo "Filtering master results..." -. $LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT +$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -616,9 +612,9 @@ if test $RC != 0 ; then fi #echo "Filtering master results..." -. $LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT +$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -713,9 +709,9 @@ if test $RC != 0 ; then fi #echo "Filtering master results..." -. $LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT +$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -758,7 +754,7 @@ if test $? != 0 ; then fi #echo "Filtering slave results..." - . $LDIFFILTER < "${SLAVEOUT}.5.1" > $SLAVEFLT + $LDIFFILTER < "${SLAVEOUT}.5.1" > $SLAVEFLT echo " ${CHECK}.1 < Comparing retrieved entries from master and slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -853,9 +849,9 @@ if test $RC != 0 ; then fi #echo "Filtering master results..." -. $LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT +$LDIFFILTER < "${MASTEROUT}.$CHECK" > $MASTERFLT #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.$CHECK" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT diff --git a/tests/scripts/test046-dds b/tests/scripts/test046-dds index 733064ae7e..2e8af044c6 100755 --- a/tests/scripts/test046-dds +++ b/tests/scripts/test046-dds @@ -16,10 +16,11 @@ echo "running defines.sh" . $SRCDIR/scripts/defines.sh -if test $BACKEND = "ldif" ; then - echo "LDIF backend does not support acls, test skipped" +case $BACKEND in ldif | null) + # LDIF lacks ACL support, NULL cannot hold dynamic entries + echo "Test does not support $BACKEND backend, test skipped" exit 0 -fi +esac if test $DDS = ddsno; then echo "Dynamic Directory Services overlay not available, test skipped" @@ -444,7 +445,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 +476,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 +487,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 +501,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)" @@ -530,9 +531,9 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS LDIF=$DDSOUT echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test047-ldap b/tests/scripts/test047-ldap index 347715d663..9c987c4308 100755 --- a/tests/scripts/test047-ldap +++ b/tests/scripts/test047-ldap @@ -485,14 +485,14 @@ $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT3 \ -b "$BASEDN" "(objectClass=*)" 1.1 \ >> $TESTOUT 2>&1 RC=$? -case $RC in - 0) +case $RC,$BACKEND in + 4,* | 0,null) + ;; + 0,*) echo "Search should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 ;; - 4) - ;; *) echo "Search failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS @@ -509,14 +509,14 @@ $LDAPSEARCH -S "" -h $LOCALHOST -p $PORT3 \ -b "$BASEDN" -z 2 "(objectClass=*)" 1.1 \ >> $TESTOUT 2>&1 RC=$? -case $RC in - 0) +case $RC,$BACKEND in + 4,* | 0,null) + ;; + 0,*) echo "Search should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 ;; - 4) - ;; *) echo "Search failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS @@ -525,9 +525,9 @@ case $RC in esac echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $METAOUT > $LDIFFLT +$LDIFFILTER < $METAOUT > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -680,13 +680,15 @@ RC=$? # test $KILLSERVERS != no && kill -HUP $KILLPIDS # exit $RC #fi -case $RC in - 0) +case $RC,$BACKEND in + 0,null) + ;; + 0,*) echo "WhoAmI should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 ;; - 51) + 51,*) echo "### Hit LDAP_BUSY problem; you may want to re-run the test" ;; *) @@ -703,13 +705,15 @@ RC=$? # test $KILLSERVERS != no && kill -HUP $KILLPIDS # exit $RC #fi -case $RC in - 0) +case $RC,$BACKEND in + 0,null) + ;; + 0,*) echo "WhoAmI should have failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS exit -1 ;; - 51) + 51,*) echo "### Hit LDAP_BUSY problem; you may want to re-run the test" ;; *) @@ -726,16 +730,18 @@ RC=$? # test $KILLSERVERS != no && kill -HUP $KILLPIDS # exit -1 #fi -case $RC in - 6) +case $RC,$BACKEND in + 5,null) ;; - 51) + 6,*) + ;; + 51,*) echo "### Hit LDAP_BUSY problem; you may want to re-run the test" ;; *) echo "Compare failed ($RC)!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit $RC + exit 1 ;; esac diff --git a/tests/scripts/test048-syncrepl-multiproxy b/tests/scripts/test048-syncrepl-multiproxy index 3d3dbdc34f..8046103b8b 100755 --- a/tests/scripts/test048-syncrepl-multiproxy +++ b/tests/scripts/test048-syncrepl-multiproxy @@ -185,9 +185,9 @@ if test $RC != 0 ; then fi #echo "Filtering master results..." -. $LDIFFILTER < "${MASTEROUT}.1" > $MASTERFLT +$LDIFFILTER < "${MASTEROUT}.1" > $MASTERFLT #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.1" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.1" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and P1 slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -210,7 +210,7 @@ if test $RC != 0 ; then fi #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.1" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.1" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and R1 slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -369,9 +369,9 @@ if test $RC != 0 ; then fi #echo "Filtering master results..." -. $LDIFFILTER < "${MASTEROUT}.2" > $MASTERFLT +$LDIFFILTER < "${MASTEROUT}.2" > $MASTERFLT #echo "Filtering P1 slave results..." -. $LDIFFILTER < "${SLAVEOUT}.2" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.2" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and P1 slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -394,7 +394,7 @@ if test $RC != 0 ; then fi #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.2" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.2" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and R1 slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -480,9 +480,9 @@ if test $RC != 0 ; then fi #echo "Filtering master results..." -. $LDIFFILTER < "${MASTEROUT}.3" > $MASTERFLT +$LDIFFILTER < "${MASTEROUT}.3" > $MASTERFLT #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.3" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.3" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and P1 slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -505,7 +505,7 @@ if test $RC != 0 ; then fi #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.3" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.3" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and R1 slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -561,9 +561,9 @@ if test $RC != 0 ; then fi #echo "Filtering master results..." -. $LDIFFILTER < "${MASTEROUT}.4" > $MASTERFLT +$LDIFFILTER < "${MASTEROUT}.4" > $MASTERFLT #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.4" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.4" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and P1 slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -586,7 +586,7 @@ if test $RC != 0 ; then fi #echo "Filtering slave results..." -. $LDIFFILTER < "${SLAVEOUT}.4" > $SLAVEFLT +$LDIFFILTER < "${SLAVEOUT}.4" > $SLAVEFLT echo "$CHECK < Comparing retrieved entries from master and R1 slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT diff --git a/tests/scripts/test049-sync-config b/tests/scripts/test049-sync-config index e2b79fef09..5c13251c7a 100755 --- a/tests/scripts/test049-sync-config +++ b/tests/scripts/test049-sync-config @@ -219,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 @@ -238,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 @@ -299,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 @@ -348,9 +351,9 @@ if test $RC != 0 ; then fi echo "Filtering producer results..." -. $LDIFFILTER < $MASTEROUT > $MASTERFLT +$LDIFFILTER < $MASTEROUT > $MASTERFLT echo "Filtering consumer results..." -. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT +$LDIFFILTER < $SLAVEOUT > $SLAVEFLT echo "Comparing retrieved configs from producer and consumer..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT @@ -386,9 +389,9 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS echo "Filtering producer results..." -. $LDIFFILTER < $MASTEROUT > $MASTERFLT +$LDIFFILTER < $MASTEROUT > $MASTERFLT echo "Filtering consumer results..." -. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT +$LDIFFILTER < $SLAVEOUT > $SLAVEFLT echo "Comparing retrieved entries from producer and consumer..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT diff --git a/tests/scripts/test050-syncrepl-multimaster b/tests/scripts/test050-syncrepl-multimaster index dd70321135..9c3202025e 100755 --- a/tests/scripts/test050-syncrepl-multimaster +++ b/tests/scripts/test050-syncrepl-multimaster @@ -258,6 +258,9 @@ if test $RC != 0 ; then exit $RC fi +nullExclude="" +test $BACKEND = null && nullExclude="# " + echo "" > $TMP if [ "$BACKENDTYPE" = mod ]; then cat <> $TMP @@ -273,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 @@ -355,7 +358,7 @@ if test $RC != 0 ; then exit $RC fi -. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt +$LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt n=`expr $n + 1` done @@ -388,7 +391,7 @@ if test $RC != 0 ; then test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC fi -. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt +$LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt n=`expr $n + 1` done @@ -433,7 +436,7 @@ if test $RC != 0 ; then test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC fi -. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt +$LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt n=`expr $n + 1` done @@ -483,7 +486,7 @@ if test $RC != 0 ; then test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC fi -. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt +$LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt n=`expr $n + 1` done @@ -546,7 +549,7 @@ if test $RC != 0 ; then test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC fi -. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt +$LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt n=`expr $n + 1` done @@ -610,7 +613,7 @@ if test $RC != 0 ; then test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC fi -. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt +$LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt n=`expr $n + 1` done @@ -762,7 +765,7 @@ if test $RC != 0 ; then test $KILLSERVERS != no && kill -HUP $KILLPIDS exit $RC fi -. $LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt +$LDIFFILTER < $TESTDIR/server$n.out > $TESTDIR/server$n.flt n=`expr $n + 1` done diff --git a/tests/scripts/test052-memberof b/tests/scripts/test052-memberof index 038b6a784b..a34facf9d7 100755 --- a/tests/scripts/test052-memberof +++ b/tests/scripts/test052-memberof @@ -72,6 +72,12 @@ EOF fi fi +bdbInclude="# " nullExclude="" +case $BACKEND in +bdb | hdb) bdbInclude="" ;; +null) nullExclude="# " ;; +esac + echo "Running ldapadd to build slapd config database..." $LDAPADD -h $LOCALHOST -p $PORT1 -D 'cn=config' -w `cat $CONFIGPWF` \ >> $TESTOUT 2>&1 < $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test054-syncreplication-parallel-load b/tests/scripts/test054-syncreplication-parallel-load index ce410c3302..6dfeef966c 100755 --- a/tests/scripts/test054-syncreplication-parallel-load +++ b/tests/scripts/test054-syncreplication-parallel-load @@ -13,11 +13,6 @@ ## top-level directory of the distribution or, alternatively, at ## . -if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then - echo "Test does not support $BACKEND" - exit 0 -fi - echo "running defines.sh" . $SRCDIR/scripts/defines.sh @@ -363,9 +358,9 @@ fi test $KILLSERVERS != no && kill -HUP $KILLPIDS echo "Filtering producer results..." -. $LDIFFILTER < $MASTEROUT > $MASTERFLT +$LDIFFILTER < $MASTEROUT > $MASTERFLT echo "Filtering consumer results..." -. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT +$LDIFFILTER < $SLAVEOUT > $SLAVEFLT echo "Comparing retrieved entries from producer and consumer..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT diff --git a/tests/scripts/test055-valregex b/tests/scripts/test055-valregex index 32b3a143fe..ac99f670c6 100755 --- a/tests/scripts/test055-valregex +++ b/tests/scripts/test055-valregex @@ -13,14 +13,6 @@ ## top-level directory of the distribution or, alternatively, at ## . -case "$BACKEND" in -bdb|hdb) - ;; -*) - echo "Test does not support $BACKEND backend" - exit 0 -esac - echo "running defines.sh" . $SRCDIR/scripts/defines.sh LVL=acl @@ -82,9 +74,11 @@ case $RC in echo "ldapmodify failed as expected" ;; 0) - echo "ldapmodify should have failed ($RC)!" - test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit -1 + if test $BACKEND != null ; then + echo "ldapmodify should have failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit -1 + fi ;; *) echo "ldapmodify failed ($RC)!" diff --git a/tests/scripts/test056-monitor b/tests/scripts/test056-monitor index 0e7272a240..1067bb3176 100755 --- a/tests/scripts/test056-monitor +++ b/tests/scripts/test056-monitor @@ -69,9 +69,9 @@ fi # Compare results, ignoring possible difference of IPv4/IPv6 localhost address localrewrite='s/=127\.0\.0\.1:/=LOCAL:/; s/=\[::1\]:/=LOCAL:/' echo "Filtering ldapsearch results..." -sed -e "$localrewrite" < $SEARCHOUT | . $LDIFFILTER > $SEARCHFLT +sed -e "$localrewrite" < $SEARCHOUT | $LDIFFILTER > $SEARCHFLT echo "Filtering expected data..." -. $CONFFILTER < $MONITOROUT1 | sed -e "$localrewrite" | . $LDIFFILTER > $LDIFFLT +. $CONFFILTER < $MONITOROUT1 | sed -e "$localrewrite" | $LDIFFILTER > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT @@ -97,7 +97,7 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER -b monitor < $SEARCHOUT > $SEARCHFLT TMPMONITOROUT2=$MONITOROUT2 case $BACKEND in @@ -132,7 +132,7 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER -b monitor < $SEARCHOUT > $SEARCHFLT echo "Comparing filter output..." $CMP $SEARCHFLT $MONITOROUT3 > $CMPOUT @@ -157,7 +157,7 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT +$LDIFFILTER -b monitor < $SEARCHOUT > $SEARCHFLT echo "Comparing filter output..." $CMP $SEARCHFLT $MONITOROUT4 > $CMPOUT diff --git a/tests/scripts/test057-memberof-refint b/tests/scripts/test057-memberof-refint index 30f15fb27f..8354ba98b8 100755 --- a/tests/scripts/test057-memberof-refint +++ b/tests/scripts/test057-memberof-refint @@ -27,8 +27,8 @@ if test $REFINT = refintno; then exit 0 fi -if test "$BACKEND" != "hdb" ; then - echo "Test does not support $BACKEND" +if test $BACKEND = bdb; then + echo "$BACKEND backend does not support subtree rename, test skipped" exit 0 fi @@ -66,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 @@ -89,19 +95,19 @@ $LDAPADD -h $LOCALHOST -p $PORT1 -D 'cn=config' -w `cat $CONFIGPWF` \ >> $TESTOUT 2>&1 < $SEARCHFLT +$LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $LDIFFILTER < $LDIF > $LDIFFLT +$LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." $CMP $SEARCHFLT $LDIFFLT > $CMPOUT diff --git a/tests/scripts/test058-syncrepl-asymmetric b/tests/scripts/test058-syncrepl-asymmetric index 2fcf47a3a3..555a091b23 100755 --- a/tests/scripts/test058-syncrepl-asymmetric +++ b/tests/scripts/test058-syncrepl-asymmetric @@ -111,13 +111,10 @@ # environment variable RACE_TESTS can be set to the number of race test # iterations the script should perform. -case "$BACKEND" in -bdb|hdb) - ;; -*) - echo "This test does not support the $BACKEND backend" - exit 0;; -esac +if test "$BACKEND" = ldif ; then + echo "$backend backend does not support access controls, test skipped" + exit 0 +fi echo "running defines.sh" . $SRCDIR/scripts/defines.sh @@ -405,12 +402,15 @@ EOF fi fi +nullExclude="" nullOK="" wantNoObj=32 +test $BACKEND = null && nullExclude="# " nullOK="OK" wantNoObj=0 + $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: $SMC_DIR/db +${nullExclude}olcDbDirectory: $SMC_DIR/db olcSuffix: $BASEDN olcRootDN: $MANAGERDN olcRootPW: $PASSWD @@ -427,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 @@ -499,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 @@ -516,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 @@ -535,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 @@ -572,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 @@ -590,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 @@ -618,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 @@ -722,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 @@ -740,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 @@ -758,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 @@ -843,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 @@ -862,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 @@ -963,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 @@ -1011,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 @@ -1084,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 @@ -1103,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 @@ -1122,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 @@ -1508,6 +1508,8 @@ ERRORS=`expr $ERRORS + $CSN_ERRORS` EOF +test $BACKEND = null && echo : > $TESTDIR/checkcsn.sh + chmod +x $TESTDIR/checkcsn.sh @@ -1542,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 @@ -1561,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 @@ -1580,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 @@ -1623,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 @@ -1692,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 @@ -1711,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 @@ -1781,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 @@ -1838,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 @@ -1857,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 @@ -1927,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 @@ -2057,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 @@ -2076,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 @@ -2128,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 @@ -2174,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 @@ -2194,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 @@ -2240,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 @@ -2354,11 +2356,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 = $wantNoObj; then break; fi sleep $i done - if test $RC = 0; then + if test $RC != $wantNoObj; 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 +2380,8 @@ EOF sleep $i done - if test $RC = 0; then - echo "ERROR: Entry not removed on central search!" + if test $RC != $wantNoObj; then + echo "ERROR: Entry not removed on central search! (RC=$RC)" RACE_ERROR=1 break fi -- 2.39.5