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 LDIF
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
that.