On 24/09/2026 15:52, Collin Funk wrote:
Thomas Klausner <[email protected]> writes:
Hi!
I'm currently updating the coreutils package in pkgsrc to 9.12 and see
three test failures on NetBSD 11.99.8/x86_64.
FAIL: tests/date/date
=====================
"my" variable $date masks earlier declaration in same scope at
./tests/date/date.pl line 501.
date.pl: test rfc822-1: stderr mismatch, comparing rfc822-1.2 (expected) and
rfc822-1.E (actual)
--- rfc822-1.2 2026-09-24 13:57:52.719028798 +0000
+++ rfc822-1.E 2026-09-24 13:57:52.720761652 +0000
@@ -0,0 +1,5 @@
+Setting LC_CTYPE to 'de_DE' failed setlocale(3)
+Setting LC_MESSAGES to 'de_DE' failed setlocale(3)
+Setting LC_MONETARY to 'de_DE' failed setlocale(3)
+Setting LC_NUMERIC to 'de_DE' failed setlocale(3)
+Setting LC_TIME to 'de_DE' failed setlocale(3)
FAIL tests/date/date.pl (exit status: 1)
We can probably work around that one with:
diff --git a/tests/date/date.pl b/tests/date/date.pl
index 40d92e01e..ef911d289 100755
--- a/tests/date/date.pl
+++ b/tests/date/date.pl
@@ -173,9 +173,9 @@ my @Tests =
# test for RFC-822 conformance
['rfc822-1', "-R -d '$d1'", {OUT=>"Sun, 19 Jan 1997 08:17:48 +0000"},
- # Solaris 5.9's /bin/sh emits this diagnostic to stderr
- # if you don't have support for the named locale.
- {ERR_SUBST => q!s/^couldn't set locale correctly\n//!},
+ # Solaris 5.9's /bin/sh can emit "couldn't set locale"
+ # NetBSD 12 sh can emit "setlocale failed"
+ {ERR_SUBST => q!s/.*(?:couldn't set locale|failed setlocale).*\n//!},
{ENV => 'LC_ALL=de_DE TZ=UTC0'}],
# Relative seconds, with time. fixed in 2.0j
FAIL: tests/stat/stat-birthtime
===============================
FAIL tests/stat/stat-birthtime.sh (exit status: 1)
Not enough info to debug this.
Does it happen every time?
make TESTS=tests/stat/stat-birthtime.sh SUBDIRS=. check
FAIL: tests/tail/pipe-f2
========================
--- exp 2026-09-24 13:59:23.409667156 +0000
+++ out 2026-09-24 13:59:23.409820394 +0000
@@ -1 +0,0 @@
-1
kill: pid 7773: No such process
FAIL tests/tail/pipe-f2.sh (exit status: 1)
I'll attach the full test log.
It has been a while since I looked at pipe-f2.sh, but I remember coming
to the conclusion that it was a NetBSD bug [1]. I never managed to
create a simple reproduction to report, and feel a bit bad just sending
over a long test case and asking them to fix it for me.
Hmm NetBSD doesn't use inotify, so it's tail_forever() might
not flush output before blocking in the the single fifo case.
Thomas does this help at all?
diff --git a/src/tail.c b/src/tail.c
index 2ca27e835..4f144a60f 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -1177,6 +1177,10 @@ tail_forever (struct File_spec *f, int n_files, double
sleep_interval)
static bool debugged;
+ /* Flush initial output as we might block reading a FIFO. */
+ if (fflush (stdout) < 0)
+ write_error ();
+
while (true)
{
/* Use blocking I/O as an optimization, when it's easy. */
cheers,
Padraig