]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid hung tests on older macOS
authorPádraig Brady <P@draigBrady.com>
Wed, 21 May 2025 20:20:11 +0000 (21:20 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 21 May 2025 20:22:08 +0000 (21:22 +0100)
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

tests/cp/existing-perm-race.sh
tests/cp/file-perm-race.sh

index d45a5a3687ade7603a41b4ee3af662a9445b3aec..2a5a9215fa6b5dc9329b2d24c307734f32864717 100755 (executable)
@@ -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
index 2b4d1eb4bf743eb7e3478c2a748170d94818caad..5c34e5b4a8eb1de00b9b18645402357e64f4cdd9 100755 (executable)
@@ -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