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

tests: Skip tests for dates on 32-bit platforms which cannot be representated #285

Closed
wants to merge 1 commit into from

Conversation

Whissi
Copy link

@Whissi Whissi commented Feb 22, 2018

Tests "test_IANA_Perth_tz" and "test_IANA_Minsk_tz" are failing on 32-bit
platforms because the earliest timestamp which can be representated on a
32-bit platform is "1901-12-13 20:45:52" but the test ranges start before
that date.

To be safe, this commit will add code to skip tests before year 1902 on
32-bit platforms.

Bug: https://bugs.gentoo.org/647596

…sentated

Tests "test_IANA_Perth_tz" and "test_IANA_Minsk_tz" are failing on 32-bit
platforms because the earliest timestamp which can be representated on a
32-bit platform is "1901-12-13 20:45:52" but the test ranges start before
that date.

To be safe, this commit will add code to skip tests before year 1902 on
32-bit platforms.

Bug: https://bugs.gentoo.org/647596
@jralls
Copy link
Member

jralls commented Feb 22, 2018

No, we're using boost::date_time and a 64-bit time representation specifically to avoid the time representation problems with 32-bit time_t (which even some 64-bit libc implementations retain). The reason for the #ifdef __LP64__ is that 32-bit systems tend to provide only TZIF files and those don't include the local apparent noon timezone; the first one they have is the "standard" timezone for the locale.

@jralls jralls closed this Feb 22, 2018
@Whissi
Copy link
Author

Whissi commented Feb 23, 2018

So are you going to apply a different solution or are you going to keep a broken test suite on 32-bit?

@jralls
Copy link
Member

jralls commented Feb 23, 2018

The test suite works on Debian-9 32-bit. If it's failing on BSD 32-bit, file a bug.

@Whissi
Copy link
Author

Whissi commented Feb 23, 2018

It is failing on Gentoo Linux x86, see our linked bug report. Here you can see the test failure: https://647596.bugs.gentoo.org/attachment.cgi?id=520072

@jralls
Copy link
Member

jralls commented Feb 23, 2018

Now that's interesting: It's loading the 64-bit section of the zoneinfo file, so if you remove the #ifdef LP64 it should pass. I guess that means that LP64 is too general a test, though it probably means that something else is broken too.

Please file a GnuCash bug. You can just post the output of bin/test-gnc-timezone.

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