OpenLDAP
Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest

Viewing Build/5810
Full headers

From: h.b.furuseth@usit.uio.no
Subject: $BACKEND selections in make test
Compose comment
Download message
State:
0 replies:
3 followups: 1 2 3

Major security issue: yes  no

Notes:

Notification:


Date: Fri, 14 Nov 2008 15:38:41 GMT
From: h.b.furuseth@usit.uio.no
To: openldap-its@OpenLDAP.org
Subject: $BACKEND selections in make test
Full_Name: Hallvard B Furuseth
Version: HEAD, RE24
OS: 
URL: 
Submission from: (NULL) (129.240.6.233)
Submitted by: hallvard


A number of tests contain code like
    if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then
        echo "Test does not support $BACKEND"
        exit 0
    fi
This looks like a holdover from ldbm, I suggest we remove it.

Also tests for supported LDAP features chould exclude instead of
include a backend.  E.g. in test040-subtree-rename, replace
    case $BACKEND in
    hdb | ldif)
        ;;
    *)
        echo "subtree rename not supported by back-$BACKEND"
        exit 0
    esac
with
    case $BACKEND in bdb)
        echo "subtree rename not supported by back-$BACKEND"
        exit 0
    esac
Or possibly that shold be "... in bdb | ndb)", I don't know.
Whoever knows can fix it either now or later:-) Also I'm not quite
sure which of the tests that fail for back-ldif are supposed to.

Back-null has no "directory" directive.  To support it,
tests/scripts/conf.sh could recognize a format like
        #!backend!...!backend!#config-line
where the config-line is uncommented if $BACKEND is none of the
backends.  Thus, "#!null!#directory @TESTDIR@/db.1.a".  Takes a
backend list in case tests for other directoryless backends arrive.

Finally I'll append " for ${BACKEND}" to the Starting/Running/Test
completed output from tests/run and tests/scripts/all:
run: echo "Running ${SCRIPT} for ${BACKEND}..."
all: echo ">>>>> Executing all LDAP tests for ${BACKEND}"
all: echo ">>>>> Starting ${TB}`basename $CMD`${TN} for
${BACKEND}..."
all: echo ">>>>> $CMD completed ${TB}OK${TN} for ${BACKEND}."
all: echo ">>>>> $CMD ${TB}failed${TN} for ${BACKEND} (exit $RC)"


Followup 1

Download message
Date: Fri, 14 Nov 2008 11:11:03 -0800
From: Quanah Gibson-Mount <quanah@zimbra.com>
To: h.b.furuseth@usit.uio.no, openldap-its@openldap.org
Subject: Re: (ITS#5810) $BACKEND selections in make test
--On Friday, November 14, 2008 3:38 PM +0000 h.b.furuseth@usit.uio.no wrote:

> Full_Name: Hallvard B Furuseth
> Version: HEAD, RE24
> OS:
> URL:
> Submission from: (NULL) (129.240.6.233)
> Submitted by: hallvard
>
>
> A number of tests contain code like
>     if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then
>         echo "Test does not support $BACKEND"
>         exit 0
>     fi
> This looks like a holdover from ldbm, I suggest we remove it.

What about back-sql, back-ndb, etc?  I'm not sure it's just a holdover of 
ldbm. There's quite a few backends that may not support a number of things.

--Quanah


--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc
--------------------
Zimbra ::  the leader in open source messaging and collaboration



Followup 2

Download message
From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
Date: Fri, 14 Nov 2008 20:57:29 +0100
To: quanah@zimbra.com
Cc: openldap-its@openldap.org
Subject: Re: (ITS#5810) $BACKEND selections in make test
quanah@zimbra.com writes:
> What about back-sql, back-ndb, etc?

The test0* scripts don't seem to be really ported to other backends than
bdb, hdb and ldbm, though I'm guessing about ndb.  Back-sql has its own
test scripts: tests/scripts/sql-*.  acfilter.sh and run.in accomodate
ndb a bit, but most of the $BACKEND tests are years old so I expect
porting tests to ndb is in its infancy.  Same with back-ldif and
back-null, they will need help from acfilter.sh and some of the tests.
Though there are a few tests for $BACKEND = ldif.

-- 
Hallvard



Followup 3

Download message
From: Hallvard B Furuseth <h.b.furuseth@usit.uio.no>
Date: Mon, 2 Nov 2009 17:32:56 +0100
To: openldap-its@openldap.org
Subject: Re: (ITS#5810) $BACKEND selections in make test
Maybe it's about time to close this one...

Could someone test if NDB likes this acfilter.sh instead of the current
one?  In the tests where NDB works, anyway.  I don't know which ones.

The current acfilter depends on awk being GNU awk, which can be wrong
even on Linux.  Ubuntu has awk = mawk.  This variant uses perl instead.

back-ldif passes most tests with this acfilter and a few additions of
BACKEND2SORT="ldif=e".

#! /bin/sh
# $OpenLDAP: pkg/ldap/tests/scripts/acfilter.sh,v 1.15 2009/01/21 23:40:44 kurt
Exp $
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2009 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
## <http://www.OpenLDAP.org/license.html>.

# Strip LDIF comments, or strip everything when $BACKEND=null.
# Optionally sort attrs/entries according to $BACKEND2SORT:
#   BACKEND2SORT="<backend>=[a][e],<backend>=[a][e],..." says
whether
#   to sort attributes in an entry, and whether to sort entries.
#   2+ empty input lines separate each list of entries to be sorted.
#   This feature needs Perl, otherwise any sorting is just by lines.

# Defaults, used when $BACKEND2SORT does not mention $BACKEND
acfilter_b2s="ndb=a"

case ,$BACKEND2SORT in *,$BACKEND=*) acfilter_b2s=$BACKEND2SORT ;; esac

case $BACKEND,$acfilter_b2s in
null,*) : ;;
*,$BACKEND=[ae]*)
  if (perl -e 0) 2>/dev/null; then perl -we '
	($end, $sort, @e, @out) = ("", $ARGV[0] =~ /,\Q$ARGV[1]\E=(\w*)/);
	sub lsort { shift(@_) =~ /[$sort]/o ? sort(@_) : @_; }
	foreach (<STDIN>, "", "") {
	  if (/^ /s) { $e[-1] .= $_; next; }
	  if (/./m)  { push @e, $_ unless /^\#/s; next; }
	  if (!@out) { print $end; $end = ""; }
	  if (@e) { push @out, join "", shift(@e), &lsort("a", splice @e); }
	     else { print join("\n", &lsort("e", splice @out)), $end; }
	  $end = $_;
	}' ",$acfilter_b2s" "$BACKEND"
  else grep -v '^#' | sort ; fi ;;
*)     grep -v '^#' ;;
esac


Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest


The OpenLDAP Issue Tracking System uses a hacked version of JitterBug

______________
© Copyright 2009, OpenLDAP Foundation, info@OpenLDAP.org