diff options
| author | Pádraig Brady <P@draigBrady.com> | 2025-05-21 21:20:11 +0100 |
|---|---|---|
| committer | Pádraig Brady <P@draigBrady.com> | 2025-05-21 21:22:08 +0100 |
| commit | dc4e6b6703513a5b1185af0f8beaaa203c04e028 (patch) | |
| tree | c570c6f7900fde75d5a59b0cb4b8bcb5b3a3fbfc | |
| parent | sort: fix buffer under-read (CWE-127) (diff) | |
| download | coreutils-dc4e6b6703513a5b1185af0f8beaaa203c04e028.tar.gz coreutils-dc4e6b6703513a5b1185af0f8beaaa203c04e028.zip | |
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
| -rwxr-xr-x | tests/cp/existing-perm-race.sh | 2 | ||||
| -rwxr-xr-x | tests/cp/file-perm-race.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/cp/existing-perm-race.sh b/tests/cp/existing-perm-race.sh index d45a5a368..2a5a9215f 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 2b4d1eb4b..5c34e5b4a 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 |
