aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2025-01-14 22:45:55 +0000
committerPádraig Brady <P@draigBrady.com>2025-01-15 12:07:52 +0000
commitc12baacddcc7f5e9c31b4e49e486e05d50a7894e (patch)
tree5b0b71689a4db21d80be95a013abefe78ab99c9d
parenttests: tail: avoid failure on Solaris 11 (diff)
downloadcoreutils-c12baacddcc7f5e9c31b4e49e486e05d50a7894e.tar.gz
coreutils-c12baacddcc7f5e9c31b4e49e486e05d50a7894e.zip
tests: use more portable timeout presence check
* init.cfg: timeout(1) on FreeBSD doesn't support --version (or --help with success status), so use syntax compatible with both FreeBSD and GNU.
-rw-r--r--init.cfg4
1 files changed, 2 insertions, 2 deletions
diff --git a/init.cfg b/init.cfg
index 0aaba4ee2..ae158c7a3 100644
--- a/init.cfg
+++ b/init.cfg
@@ -570,7 +570,7 @@ seek_data_capable_()
# We saw FreeBSD 9.1 take 35s to return from SEEK_DATA for a 1TiB empty file.
# Note lseek() is uninterruptible on FreeBSD 9.1, but it does eventually
# return, and the timeout will ensure a failure return from the process.
- timeout --version >/dev/null && TIMEOUT_='timeout 10'
+ timeout 1 true >/dev/null && TIMEOUT_='timeout 10'
$TIMEOUT_ $PYTHON_ "$abs_srcdir"/tests/seek-data-capable "$@"
}
@@ -660,7 +660,7 @@ mkfifo_or_skip_()
trap_sigpipe_or_skip_()
{
- timeout --version >/dev/null ||
+ timeout 1 true >/dev/null ||
skip_ 'trapping SIGPIPE cannot be safely checked'
(trap '' PIPE && timeout 10 yes |:) 2>&1 | grep 'Broken pipe' >/dev/null ||