From 5c5e8b4a981346086449f3b8c37e0a85dbfdfabe Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 10 Jun 2025 12:51:05 -0700 Subject: [PATCH] date: port test to NetBSD 10 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Problem reported by Collin Funk in: https://lists.gnu.org/r/bug-gnulib/2025-06/msg00094.html * tests/date/date-debug.sh: Also allow NetBSD 10 mktime behavior. Although NetBSD contradicts POSIX, POSIX is likely wrong here and I vaguely recall that there’s a POSIX correction in progress that will allow the NetBSD behavior. --- tests/date/date-debug.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/date/date-debug.sh b/tests/date/date-debug.sh index b63ae315b2..ee522f2b7b 100755 --- a/tests/date/date-debug.sh +++ b/tests/date/date-debug.sh @@ -75,8 +75,6 @@ date: input timezone: TZ="America/Edmonton" in date string date: using specified time as starting value: '02:30:00' date: error: invalid date/time value: date: user provided time: '(Y-M-D) 2006-04-02 02:30:00' -date: normalized time: '(Y-M-D) 2006-04-02 XX:XX:XX' -date: -- date: possible reasons: date: nonexistent due to daylight-saving time; date: invalid day/month combination; @@ -90,7 +88,12 @@ returns_ 1 date --debug -d "$in2" >out2-t 2>&1 || fail=1 # The output line of "normalized time" can differ between systems # (e.g. glibc vs musl) and should not be checked. # See: https://lists.gnu.org/archive/html/coreutils/2019-05/msg00039.html -sed '/normalized time:/s/ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/ XX:XX:XX/' \ +sed ' + /^date: *normalized time:/d + /^date: *time could not be normalized/d + /^date: *--*$/d + /^date: *numeric values overflow;$/d + ' \ out2-t > out2 || framework_failure_ compare exp2 out2 || fail=1 -- 2.47.3