New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test 1307 failures due to fnmatch differences #2825

Closed
bagder opened this Issue Aug 1, 2018 · 2 comments

Comments

Projects
None yet
1 participant
@bagder
Member

bagder commented Aug 1, 2018

I did this

Check autobuilds, like this.

Test 1307 fails and shows fice test patterns that error.

 Tested with system fnmatch(), linux-style
Curl_fnmatch("[[FF]]", "[FF]") should return FAIL (returns MATCH) [42]
Curl_fnmatch("[![FF]]", "") should return FAIL (returns NOMATCH) [62]
Curl_fnmatch("[![FF]]", "[FF]") should return FAIL (returns NOMATCH) [63]
Curl_fnmatch("[![FF]]", "a") should return FAIL (returns MATCH) [64]
Curl_fnmatch("**]*[*[[13]]**[*[13])]*]*[**[*[13]~r-]*]**[.*]*[[E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3][E3]*[[13]]**[*[13])]*]*[*[[13]]*[~r]*]*[BA][13][A6]~b-]*", "a") should return FAIL (returns NOMATCH) [156]

Interestingly, all the actual returns seem to match what the internal fnmatch function would return.

Presumably, this happens because this is run on an older libc with a different fnmatch implementation that differs from what a modern Linux glibc fnmatch returns for these patterns.

Tests on travis and on my local dev hosts all run this test fine. (glibc 2.27)

This seems complicated to fix for real and I'm leaning towards simply removing those test patterns that differ like this from the test.

I expected the following

All tests to run OK.

curl/libcurl version

current git master but this was introduced in a115c6b when we switched to using the native version when available.

operating system

Linux, but possibly other systems could show similar issues.

@bagder bagder added the tests label Aug 1, 2018

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Aug 1, 2018

Member

Yeah, also Solaris failures here

Member

bagder commented Aug 1, 2018

Yeah, also Solaris failures here

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Aug 1, 2018

Member

Fixing this "properly" will be painful. I'm going to disable test 1307 for now.

Member

bagder commented Aug 1, 2018

Fixing this "properly" will be painful. I'm going to disable test 1307 for now.

@bagder bagder closed this in b7bdf21 Aug 1, 2018

xquery added a commit to xquery/curl that referenced this issue Aug 9, 2018

test1307: disabled
Turns out that since we're using the native fnmatch function now when
available, and they simply disagree on a huge number of test patterns
that make it hard to test this function like this...

Fixes #2825

falconindy added a commit to falconindy/curl that referenced this issue Sep 10, 2018

test1307: disabled
Turns out that since we're using the native fnmatch function now when
available, and they simply disagree on a huge number of test patterns
that make it hard to test this function like this...

Fixes #2825
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment