Thread (17 messages) flat view 17 messages, 3 authors, 2016-06-15

Re: [PATCH v4 12/12] t3070: disable two fnmatch tests that have different results on different libc

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:55:00

On Fri, Oct 12, 2012 at 2:22 PM, Johannes Sixt [off-list ref] wrote:
Am 10/10/2012 12:40, schrieb Nguyễn Thái Ngọc Duy:
quoted
fnmatch on glibc-2.12.1 returns no match. glibc-2.15 returns ok.
There are many more cases that fail with the fnmatch() that we ship in
compat/fnmatch. To test this on Linux, you have to remove the "#if defined
_LIBC || !defined __GNU_LIBRARY__" brackets from compat/fnmatch/fnmatch.c
and build with NO_FNMATCH.
Thanks. The point of checking against fnmatch is to make sure that
wildmatch does not divert in behavior from fnmatch. For some corner
cases that behavior is undefined, I think it is ok for different
fnmatch versions to behave differently.

But some of failed tests make me worry about fnmatch. compat/fnmatch
for example does not match '**/foo' with '/foo' (it does '*/foo' with
'/foo'). 'A' is matched with '[[:digit:][:space:][:upper:]]' but not
'[[:digit:][:upper:][:space:]]'. Perhaps we better off convert git to
use wildmatch only to keep matching behavior more reliable. wildmatch
does not support non-FNM_PATHNAME mode, but that should be easy to
fix. The only downside I see is fnmatch may support locale while
wildmatch does not.
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help