The first test (named unit-tests) in wget test suite fails. Reproducible: Always Steps to Reproduce: 1. FEATURES="test" emerge -1 wget Actual Results: * ERROR: net-misc/wget-1.16::gentoo failed (test phase): * Make check failed. See above for details. Expected Results: wget updated on system
Created attachment 388290 [details] emerge --info output
Created attachment 388292 [details] build.log
% emerge -pqv '=net-misc/wget-1.16::gentoo' [ebuild U ] net-misc/wget-1.16 [1.14] USE="-debug -gnutls -idn ipv6 (-nls) -ntlm pcre ssl -static -uuid zlib"
Created attachment 388294 [details] tests/test-suite.log from work directory
Created attachment 388296 [details] tests/unit-tests.log from work directory
Comment on attachment 388296 [details] tests/unit-tests.log from work directory Text already included in test-suite.log
The failure is in src/utils.c, in test_dir_matches_p(void), line 2528: { { "*COMPLETE", NULL, NULL }, "foo/!COMPLETE", false } and 2539: bool res = dir_matches_p (test_array[i].dirlist, test_array[i].dir); which checks test_array[i].dirlist = { "*COMPLETE", NULL, NULL } for an instance of test_array[i].dir = "foo/!COMPLETE" and expects a false return but gets true. This is because of the line 975 which reads: if (matcher (p, dir, FNM_PATHNAME) == 0) where matcher is set to either fnmatch or fnmatch_nocase. Reducing the code down we have the following test code: #include <stdio.h> #include <fnmatch.h> int main() { int res = fnmatch("*COMPLETE", "foo/!COMPLETE", FNM_PATHNAME); printf("res = %d\n", res); } On glibc this returns "res = 1" whereas on uclibc this returns "res = 0". This was tested on uclibc-0.9.33.9999. which is the head of the 0.3.33 branch.
(In reply to Anthony Basile from comment #7) > [...] Reducing the code > down we have the following test code: > > #include <stdio.h> > #include <fnmatch.h> > > int main() { > int res = fnmatch("*COMPLETE", "foo/!COMPLETE", FNM_PATHNAME); > printf("res = %d\n", res); > } > > On glibc this returns "res = 1" whereas on uclibc this returns "res = 0". > This was tested on uclibc-0.9.33.9999. which is the head of the 0.3.33 > branch. According to http://pubs.opengroup.org/stage7tc1/functions/fnmatch.html , glibc is correct because it returns a non-match when options contains FNM_PATHNAME and slash is not in both strings. So this is a bug in uclibc.
After doing a quick search with "uclibc" as the search term, this bug looks like a duplicate of bug #181275 , an old bug indeed.
Removed from the tree