Skip to content
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

2 test failures on OS X around ztime in test-pdc.h #7

Open
ileanadumitrescu95 opened this issue Sep 16, 2022 · 2 comments
Open

2 test failures on OS X around ztime in test-pdc.h #7

ileanadumitrescu95 opened this issue Sep 16, 2022 · 2 comments

Comments

@ileanadumitrescu95
Copy link
Contributor

SourceForge bug #197 written by Hanspeter Niederstrasser on 2013-10-15

Building libzvbi 0.2.35 on OS X 10.7, and running tests with make check, they fail with this error. The build seems otherwise OK.

PASS: test-hamm
Assertion failed: (NULL != strptime (s, "%n%Y%m%dT%H%M%S", &tm)), function ztime, file ./test-pdc.h, line 142.
/bin/sh: line 1: 92246 Abort trap: 6           ${dir}$tst
FAIL: test-packet-830
Assertion failed: (NULL != strptime (s, "%n%Y%m%dT%H%M%S", &tm)), function ztime, file ./test-pdc.h, line 142.
/bin/sh: line 1: 92267 Abort trap: 6           ${dir}$tst
FAIL: test-pdc
PASS: test-raw_decoder
PASS: test-unicode
PASS: test-vps
====================
2 of 18 tests failed
====================
@ririsoft
Copy link

ririsoft commented Feb 5, 2024

Hello,

Looking at

assert (NULL != strptime (s, "%n%Y%m%dT%H%M%S", &tm));

I do not understand how those tests could even pass on Linux. The time format sounds wrong : "%n" represents a newline that is not used in the time string passed to time in the tests.

@ririsoft
Copy link

ririsoft commented Feb 7, 2024

Also looking at

t = timegm (&tm);
it does not work with time below 1900 on MacOS (see apple source code for libc).

So this test

(buffer1, TRUE, ztime ("18581117T000000"), 0);
cannot work on MacOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants