From: Hallvard Furuseth Date: Sun, 29 Nov 2009 11:46:48 +0000 (+0000) Subject: ITS#5810: support back-ldif X-Git-Tag: ACLCHECK_0~52 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e7bb3f87db3fcc72f13ce4a925cb66d2f127929f;p=openldap ITS#5810: support back-ldif --- diff --git a/tests/Makefile.in b/tests/Makefile.in index 267422ca68..30924d72c6 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/scripts/test011-glue-slapadd b/tests/scripts/test011-glue-slapadd index e2765b5e63..8f47acaa9a 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 diff --git a/tests/scripts/test012-glue-populate b/tests/scripts/test012-glue-populate index 47d8c3ab47..116546ccce 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/test019-syncreplication-cascade b/tests/scripts/test019-syncreplication-cascade index 8ac0b42d94..94aea54976 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 diff --git a/tests/scripts/test023-refint b/tests/scripts/test023-refint index a73d700e26..72de1103f2 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/test028-idassert b/tests/scripts/test028-idassert index 75f1a8b60d..59d45db3d8 100755 --- a/tests/scripts/test028-idassert +++ b/tests/scripts/test028-idassert @@ -205,12 +205,12 @@ 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 < $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 diff --git a/tests/scripts/test029-ldapglue b/tests/scripts/test029-ldapglue index 29d9677a4f..59bff07214 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 diff --git a/tests/scripts/test042-valsort b/tests/scripts/test042-valsort index 8566a1f1f5..640e7e04f3 100755 --- a/tests/scripts/test042-valsort +++ b/tests/scripts/test042-valsort @@ -204,9 +204,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/test045-syncreplication-proxied b/tests/scripts/test045-syncreplication-proxied index b0791c326b..5f0657b154 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 diff --git a/tests/scripts/test052-memberof b/tests/scripts/test052-memberof index 8dc24f7848..16a6ef1fd6 100755 --- a/tests/scripts/test052-memberof +++ b/tests/scripts/test052-memberof @@ -72,6 +72,16 @@ EOF fi fi +bdb_conf="" +case $BACKEND in bdb | hdb) +bdb_conf="olcDbCacheSize: 1000 +olcDbIndex: objectClass eq +olcDbIndex: cn pres,eq,sub +olcDbIndex: uid pres,eq,sub +olcDbIndex: sn pres,eq,sub +olcDbMode: 384" +esac + echo "Running ldapadd to build slapd config database..." $LDAPADD -h $LOCALHOST -p $PORT1 -D 'cn=config' -w `cat $CONFIGPWF` \ >> $TESTOUT 2>&1 <. -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 diff --git a/tests/scripts/test055-valregex b/tests/scripts/test055-valregex index bf226fa4af..006e3c781c 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 diff --git a/tests/scripts/test057-memberof-refint b/tests/scripts/test057-memberof-refint index 989b9f4bb8..f392ec916c 100755 --- a/tests/scripts/test057-memberof-refint +++ b/tests/scripts/test057-memberof-refint @@ -27,7 +27,7 @@ if test $REFINT = refintno; then exit 0 fi -if test "$BACKEND" != "hdb" ; then +if test "$BACKEND" = "bdb" ; then echo "Test does not support $BACKEND" exit 0 fi @@ -84,6 +84,16 @@ EOF fi fi +bdb_conf="" +case $BACKEND in bdb | hdb) +bdb_conf="olcDbCacheSize: 1000 +olcDbIndex: objectClass eq +olcDbIndex: cn pres,eq,sub +olcDbIndex: uid pres,eq,sub +olcDbIndex: sn pres,eq,sub +olcDbMode: 384" +esac + echo "Running ldapadd to build slapd config database..." $LDAPADD -h $LOCALHOST -p $PORT1 -D 'cn=config' -w `cat $CONFIGPWF` \ >> $TESTOUT 2>&1 <