There are tests that don't support back-ldif again... I'll file an ITS (or reuse ITS#5265?), but first I'm wondering:
When a test with back-ldif fails because data gets sorted differently from with bdb/hdb and the compare with expected data fails, what's the best way to fix them?
We can change the data, or add -S "" to ldapsearch, or vary between both. The searches are slowly growing -S arguments all over the place, I'm not sure if that is a good or a bad thing. It's not always easy to see if some testdata is carefully built or not. OTOH maybe there are tests where the order is important and that's not easy to see either.
E.g. test042-valsort can be fixed by renaming Dave to John, so he comes after George in data/valsort3.out. Looks harmless, I'll do that unless someone says it's a bad idea.
test011-glue-slapadd, test012-glue-populate, test029-ldapglue look like they can be most easily fixed with -S.
Hallvard B Furuseth wrote:
There are tests that don't support back-ldif again... I'll file an ITS (or reuse ITS#5265?), but first I'm wondering:
When a test with back-ldif fails because data gets sorted differently from with bdb/hdb and the compare with expected data fails, what's the best way to fix them?
We can change the data, or add -S "" to ldapsearch, or vary between both. The searches are slowly growing -S arguments all over the place, I'm not sure if that is a good or a bad thing. It's not always easy to see if some testdata is carefully built or not. OTOH maybe there are tests where the order is important and that's not easy to see either.
E.g. test042-valsort can be fixed by renaming Dave to John, so he comes after George in data/valsort3.out. Looks harmless, I'll do that unless someone says it's a bad idea.
test011-glue-slapadd, test012-glue-populate, test029-ldapglue look like they can be most easily fixed with -S.
Certain subtrees of the glue data are ordered specifically. It reflects the order in which the glue code walks the tree, and using -S would prevent the verification of this ordering.
Howard Chu writes:
Certain subtrees of the glue data are ordered specifically. It reflects the order in which the glue code walks the tree, and using -S would prevent the verification of this ordering.
Ouch. Looks like a lot of work to edit the data for test011 and test12 so it gets sorted. Changes would cascade to a lot of tests. Maybe for test029 too, I haven't looked too carefully.
So the best I can think of for now is to sort the data anyway when testing back-ldif, so it at least gets some verification. I can give tests/scripts/acfilter.sh parameters '-S backend,backend,...' which means to sort the input when using those backends. If perl is available it can sort by record, otherwise it'll just have to sort by lines.