Subject: bug#74503: closed (Re: bug#74503: Test issues in "make check")

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 26 Nov 2024 15:07:02 +0000

Your bug report

#74503: Test issues in "make check"

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].

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

Subject: Re: bug#74503: Test issues in "make check"
From: Pádraig Brady <[email-masked]>
To: Gordon Steemson <[email-masked]>
Cc: [email-masked]
Date: Tue, 26 Nov 2024 15:05:09 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

On 26/11/2024 04:27, Gordon Steemson wrote:
> Hello again,
> 
>> On Nov 24, 2024, at 5:10 AM, Pádraig Brady <[email-masked]> wrote:
>>
>> On 24/11/2024 05:34, Gordon Steemson wrote:
>>> Setup:  [...]
> 
> I should also have added that the tests were running under the latest Bash 5.2.37 rather than the stock Bash 3.2, though fortunately it doesn't seem to have mattered.
> 
>>>   an error message complaining that “2á != 2á”.
>>
>> I pushed a fix to use æ instead, as that does not have a separate decomposed form.
> 
> I can confirm that works.
> 
>>> - tests/misc/tee.sh [...]
>>
>> The script is OK I think. darwin 9 is old (nearly 20 years old now!),
>> so perhaps its poll vs select behavior is divergent enough with more recent macOS to be problematic.
>> Could you try with this adjustment to the code.
>> [...]
> 
> Got to admit I never would have guessed that one in a million years, but you appear to have been exactly right – your proposed tweak worked perfectly.
> 
> Thank you -- both 'make check' issues I encountered are now resolved.

Thanks for the confirmation.
I'll apply the following to address this.
Marking this as done.

thanks,
Pádraig

commit 4a4377f8697385b0676d08b51d10694afca1d9bf (HEAD -> master)Author: Pádraig Brady <[email-masked]>
Date:   Tue Nov 26 14:04:32 2024 +0000

     tail,tee: fix broken pipe detection on darwin 9

     * src/iopoll.c (): Restrict use of poll() on macOS
     to >= 11 (darwin 20), as it was seen to fail on macOS 10.5.
     Fixes https://bugs.gnu.org/74503

diff --git a/src/iopoll.c b/src/iopoll.c
index 8e5c92dd8..174048639 100644
--- a/src/iopoll.c
+++ b/src/iopoll.c
@@ -21,10 +21,11 @@
  /* poll(2) is needed on AIX (where 'select' gives a readable
     event immediately) and Solaris (where 'select' never gave
     a readable event).  Also use poll(2) on systems we know work
-   and/or are already using poll (linux).  */
-
-#if defined _AIX || defined __sun || defined __APPLE__ || \
-    defined __linux__ || defined __ANDROID__
+   and/or are already using poll (linux).  On macOS we know poll()
+   doesn't work on 10.5, while it does work on >= 11 at least. */
+#if defined _AIX || defined __sun \
+    || defined __linux__ || defined __ANDROID__ \
+    || __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 110000
  # define IOPOLL_USES_POLL 1
    /* Check we've not enabled gnulib's poll module
       as that will emulate poll() in a way not

Subject: Test issues in "make check"
From: Gordon Steemson <[email-masked]>
To: [email-masked]
Date: Sat, 23 Nov 2024 21:34:47 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Setup:  Coreutils package, v. 9.5; Power Mac G5 running OS 10.5.8 (Darwin 9.8.0).

When running `make check`, I noticed the following two problems.

- tests/ls/dired.sh can’t cope with the underlying file system stealthily applying normalization to the Unicode encoding, so I was presented with a failed test and an error message complaining that “2á != 2á”.

- tests/misc/tee.sh seems to be missing a pipe.  Without adding “ |” to the end of line 99, the test freezes solid because it waits forever for input that will never come.  I'm baffled that it works for anyone else... perhaps some bizarre quirk of shell syntax causes the output of one line to automagically become the input of the next, if conditions are correct?  The mechanism by which it is somehow accidentally working for other people is beyond my knowledge of shell scripting.

It seems to be working other than these.  Several of the tests do deem themselves inapplicable for reasons that don't appear to match reality, such as tests/csplit/csplit-heap.sh believing that `ulimit -v` is absent when it is present; but as those are not actual test _failures_, I am disinclined to spend time digging into them unless someone specifically asks me to.

Gordon Steemson