A few tests from tests/test-posixtm.c fail on Haiku. These are the same as what fail on other platforms. I assume this means the time string cannot fit into 'struct tm' or 'time_t' on these platforms, not a bug in Gnulib's code.
Therefore, I pushed the attached patch to disable them. Collin
>From 114d91d7c3c829290eca4ef4701a22397aa04223 Mon Sep 17 00:00:00 2001 Message-ID: <114d91d7c3c829290eca4ef4701a22397aa04223.1753329333.git.collin.fu...@gmail.com> From: Collin Funk <collin.fu...@gmail.com> Date: Wed, 23 Jul 2025 20:54:50 -0700 Subject: [PATCH] posixtm tests: Avoid test failure on Haiku. * tests/test-posixtm.c (T): On Haiku, disable test cases that would fail. --- ChangeLog | 4 ++++ tests/test-posixtm.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5a30fab82d..33bd581f88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2025-07-23 Collin Funk <collin.fu...@gmail.com> + posixtm tests: Avoid test failure on Haiku. + * tests/test-posixtm.c (T): On Haiku, disable test cases that would + fail. + sethostname tests: Avoid test failure on Haiku. * tests/test-sethostname2.c (main): On Haiku, skip the "too long hostname" test. diff --git a/tests/test-posixtm.c b/tests/test-posixtm.c index bace904ce2..f5f8ea1af1 100644 --- a/tests/test-posixtm.c +++ b/tests/test-posixtm.c @@ -47,7 +47,7 @@ static struct posixtm_test const T[] = { "12131415", LY, 1, 0}, /* ??? Dec 13 14:15:00 ???? */ #if !((defined __APPLE__ && defined __MACH__) || defined __sun \ - || (defined _WIN32 && !defined __CYGWIN__)) + || defined __HAIKU__ || (defined _WIN32 && !defined __CYGWIN__)) /* These two tests fail on 64-bit Mac OS X 10.5 and on 64-bit Solaris up through at least Solaris 11.3, which is off by one day for timestamps before 0001-01-01 00:00:00 UTC. */ @@ -57,8 +57,10 @@ static struct posixtm_test const T[] = - INT64_C (62135596801)},/* Fri Dec 31 23:59:59 0 */ #endif #if !(defined _WIN32 && !defined __CYGWIN__) +# if !defined __HAIKU__ { "000101010000.00", LY, 1, - INT64_C (62135596800)},/* Sat Jan 1 00:00:00 1 */ +# endif { "190112132045.51", LY, 1, - INT64_C (2147483649)},/* Fri Dec 13 20:45:51 1901 */ { "190112132045.52", LY, 1, -- 2.50.1