Hallvard B Furuseth wrote:
Quanah Gibson-Mount writes:
> Hm, for #2, some sort of intelligent sort, since LDAP doesn't support the
> concept of ordered results, any test relying on order is fundamentally
> flawed. ;) That'd deal with all backends correctly, I would think.
ldapsearch -S "" sorts by DN. But such a change cascades into large
changes to the testdata files, and IIRC there are a few tests where
a specific order is expected. Don't quite remember.
Right, the glue tests expect a particular order. Don't recall if any others do.
So when testing back-ldif I modify scripts/acfilter.sh to sort some
output files before comparing them. If Perl is present I sort by DN (I
think), and it could sort the lines in each entry too. Probably loses
some possible errors, but not many. E.g. where an LDIF to be compared
consists of the concatenated output of several commands.
Without Perl it just sorts line by line. Better than nothing.
If anyone cares we could write an LDIF-sort program in C.
I think awk would be a better choice, since we already use it. I'll look into
(I'm about ready to resume my back-ldif changes now that things
seem to pass make test again. Will wait for 2.4.10 to be released to
Cool, would be nice to get the back-ldif ITS's closed.
> #1 has always somewhat annoyed me, since I'd generally think
> see all relevant objectClasses included in an objects output. Is
> there an RFC covering it either way?
Ah, ITS#5517 (add superclass of existing class fails)...
Yeah, looks like another mess. In back-ndb we have to explicitly store all
values, because that's pretty much the only way to be able to find them again
if searching on superclasses etc. (I guess the alternative would be to rewrite
any filters to OR in all superclasses, but that would be more work on the
search side of things, which we obviously want to avoid.)
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/