From: Pádraig Brady
Date: Wed, 21 May 2025 20:20:11 +0000 (+0100) Subject: tests: avoid hung tests on older macOS X-Git-Tag: v9.8~315 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc4e6b6703513a5b1185af0f8beaaa203c04e028;p=thirdparty%2Fcoreutils.git tests: avoid hung tests on older macOS These tests were seen to hang on PPC Mac OS X 10.4.11 * tests/cp/existing-perm-race.sh: Protect fifo interactions with a 1 minute timeout. * tests/cp/file-perm-race.sh: Likewise. Reported in https://bugs.gnu.org/78509 --- diff --git a/tests/cp/existing-perm-race.sh b/tests/cp/existing-perm-race.sh index d45a5a3687..2a5a9215fa 100755 --- a/tests/cp/existing-perm-race.sh +++ b/tests/cp/existing-perm-race.sh @@ -44,7 +44,7 @@ cleanup_() { kill $pid 2>/dev/null && wait $pid; } # Copy a fifo's contents. That way, we can examine the # destination permissions before they're finalized. -cp -p --copy-contents fifo fifo-copy & pid=$! +timeout 60 cp -p --copy-contents fifo fifo-copy & pid=$! ( # Now 'cp' is reading the fifo. Wait for the destination file to diff --git a/tests/cp/file-perm-race.sh b/tests/cp/file-perm-race.sh index 2b4d1eb4bf..5c34e5b4a8 100755 --- a/tests/cp/file-perm-race.sh +++ b/tests/cp/file-perm-race.sh @@ -30,7 +30,7 @@ cleanup_() { kill $pid 2>/dev/null && wait $pid; } # Copy a fifo's contents. That way, we can examine the # destination permissions before they're finalized. -cp -p --copy-contents fifo fifo-copy & pid=$! +timeout 60 cp -p --copy-contents fifo fifo-copy & pid=$! ( # Now 'cp' is reading the fifo. Wait for the destination file to