On 07/04/2026 10:27, Bruno Haible via GNU coreutils General Discussion wrote:
Today's CI also shows a test failure of date/date on OpenBSD 7.8.

Interesting. I'd set the max supported year to INT_MAX+1900,
but the limit for tm_year in OpenBSD's mktime is INT_MAX.
I pushed the attached to drop the large year down to INT_MAX.

thanks,
Padraig
From 745f4000fea83fb0fecb3970ae4396af0d639c50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Tue, 7 Apr 2026 23:17:36 +0100
Subject: [PATCH] tests: date: fix false failure on OpenBSD 7.8

* tests/date/date.pl: Set the max supported year to INT_MAX.
Most systems support INT_MAX+1900, but mktime() on OpenBSD 7.8
limits the passed tm_year to INT_MAX.
Reported by Bruno Haible.
---
 tests/date/date.pl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/date/date.pl b/tests/date/date.pl
index d5a93ff9b..40ad01bce 100755
--- a/tests/date/date.pl
+++ b/tests/date/date.pl
@@ -19,8 +19,10 @@
 use strict;
 
 my $limits = getlimits ();
-my $large_year = $limits->{INT_MAX} + 1900;
-my $large_year_out_of_range = $large_year + 1;
+# Most systems support INT_MAX + 1900, but OpenBSD 7.8
+# limits tm_year in mktime to INT_MAX.
+my $large_year = $limits->{INT_MAX};
+my $large_year_out_of_range = $large_year + 1900 + 1;
 
 (my $ME = $0) =~ s|.*/||;
 
-- 
2.53.0

  • date/date test failure Bruno Haible via GNU coreutils General Discussion
    • Re: date/date test ... Pádraig Brady

Reply via email to