On 03/23/2010 05:29 PM, Bruno Haible wrote: > Hi Eric, > >> * tests/test-glob.c (main): Enhance test. >> * doc/posix-functions/glob.texi (glob): Document the fix. > > Thanks for providing this. > > Now, I still have a hard time understanding the other part of Andreas > Schwab's patch. "Match only directories when pattern ends in a slash." > Nothing in the test suite fails in this respect. It sounds reasonable, > but 35 lines of code weren't written without a good reason, were they?
My test suite additions cover the fact that glob("",...) should fail (in current glibc, it does not), but did not (yet) address whether glob("*/",...) should succeed while matching only directories. I think the bug that Andreas is trying to fix is that the 35 lines of code that he deleted were using a misguided approach to try and instead treat glob("*/") as glob("*"). But you are absolutely right that without a test case, we can't prove that. And in the meantime, the m4 test checks whether glob("dangling*") matches a dangling symlink (by POSIX, I think it should), but there is nothing in the unit test that stresses that. So I have yet to figure out why we are replacing glob, even on Linux systems, even though the m4 does not yet filter out the glibc bugs that Andreas is trying to fix. I'm low on time today, but hope to get back to this issue again later this week. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature