Subject: bug#78934: closed (Re: bug#78934: test failure after recent 'od' changes)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 30 Jun 2025 22:37:02 +0000

Your bug report

#78934: test failure after recent 'od' changes

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78934: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78934
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#78934: test failure after recent 'od' changes
From: Pádraig Brady <[email-masked]>
To: Bruno Haible <[email-masked]>, [email-masked]
Date: Mon, 30 Jun 2025 23:36:28 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

On 30/06/2025 20:47, Bruno Haible via GNU coreutils Bug Reports wrote:
> After this week's changes in 'od', the CI reports a test failure on OpenBSD
> and Solaris:
> 
> 
> FAIL: tests/od/od
Ah right, strerror(ERANGE) varies by platform.
I'll push the attached later to address this.

Marking this as done.

thanks,
Padraig

From ee22d706e31430a1f729ca55c56e18ed566ba0c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email-masked]>
Date: Mon, 30 Jun 2025 23:28:32 +0100
Subject: [PATCH] tests: avoid false failure due to varied ERANGE errors

* tests/od/od.pl: Use the system error string for ERANGE,
rather than hardcoding a particular one.
Fixes https://bugs.gnu.org/78934
---
 tests/od/od.pl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/od/od.pl b/tests/od/od.pl
index e4e328ad6..40cc4289a 100755
--- a/tests/od/od.pl
+++ b/tests/od/od.pl
@@ -25,6 +25,9 @@ use strict;
 
 my $prog = 'od';
 
+use Errno qw(ERANGE);
+my $ERANGE = do { local $! = ERANGE; "$!" };
+
 # Use a file in /proc whose size is not likely to
 # change between the wc and od invocations.
 my $proc_file = '/proc/version';
@@ -76,11 +79,11 @@ my @Tests =
 
      # Overflowing traditional offsets should be diagnosed.
      ['overflow-off-1', '-', '7' x 255, {IN_PIPE=>""}, {EXIT=>1},
-      {ERR=>"od: ".('7' x 255).": Numerical result out of range\n"}],
+      {ERR=>"od: ".('7' x 255).": $ERANGE\n"}],
      ['overflow-off-2', '-', ('9' x 254).'.', {IN_PIPE=>""}, {EXIT=>1},
-      {ERR=>"od: ".('9' x 254).".: Numerical result out of range\n"}],
+      {ERR=>"od: ".('9' x 254).".: $ERANGE\n"}],
      ['overflow-off-3', '-', '0x'.('f' x 253), {IN_PIPE=>""}, {EXIT=>1},
-      {ERR=>"od: 0x".('f' x 253).": Numerical result out of range\n"}],
+      {ERR=>"od: 0x".('f' x 253).": $ERANGE\n"}],
 
      # Ensure that a large width does not cause trouble.
      # From coreutils-7.0 through coreutils-8.21, these would print
-- 
2.49.0

Subject: test failure after recent 'od' changes
From: Bruno Haible <[email-masked]>
To: [email-masked]
Date: Mon, 30 Jun 2025 21:47:55 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

After this week's changes in 'od', the CI reports a test failure on OpenBSD
and Solaris:

FAIL: tests/od/od
=================

od (GNU coreutils) 2025-06-30
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Jim Meyering.
j-bug1...
j-bug2...
j-bug3...
j-bug4...
j-proc...
trad-dot1...
trad-dot512...
invalid-off-1...
invalid-off-2...
invalid-off-3...
invalid-off-4...
overflow-off-1...
od.pl: test overflow-off-1: stderr mismatch, comparing overflow-off-1.2 (expected) and overflow-off-1.E (actual)
*** overflow-off-1.2	Mon Jun 30 19:10:31 2025
--- overflow-off-1.E	Mon Jun 30 19:10:31 2025
***************
*** 1 ****
! od: 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: Numerical result out of range
--- 1 ----
! od: 777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: Result too large
overflow-off-2...
od.pl: test overflow-off-2: stderr mismatch, comparing overflow-off-2.2 (expected) and overflow-off-2.E (actual)
*** overflow-off-2.2	Mon Jun 30 19:10:31 2025
--- overflow-off-2.E	Mon Jun 30 19:10:31 2025
***************
*** 1 ****
! od: 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.: Numerical result out of range
--- 1 ----
! od: 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.: Result too large
overflow-off-3...
od.pl: test overflow-off-3: stderr mismatch, comparing overflow-off-3.2 (expected) and overflow-off-3.E (actual)
*** overflow-off-3.2	Mon Jun 30 19:10:31 2025
--- overflow-off-3.E	Mon Jun 30 19:10:31 2025
***************
*** 1 ****
! od: 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff: Numerical result out of range
--- 1 ----
! od: 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff: Result too large
wide-a...
wide-c...
wide-x...
invalid-w-1...
invalid-w-2...
invalid-w-3...
FAIL tests/od/od.pl (exit status: 1)