[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] glob: test previous patch

From: Eric Blake
Subject: Re: [PATCH 3/3] glob: test previous patch
Date: Wed, 24 Mar 2010 13:47:44 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b1 Thunderbird/3.0.3

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   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]