[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
timeout program on Alpine Linux
From: |
Bruno Haible |
Subject: |
timeout program on Alpine Linux |
Date: |
Sat, 15 Dec 2018 22:02:20 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-138-generic; KDE/5.18.0; x86_64; ; ) |
On Alpine Linux 3.7.0 (x86_64), the gnulib-tests of a 'grep' snapshot fail:
FAIL: dfa-match.sh
The problem is here:
+ timeout 10 dfa-match-aux a bb
bb 1
timeout: can't execute '10': No such file or directory
+ fail=1
This distro has a 'timeout' program, and 'timeout --help' reports (on stderr!):
BusyBox v1.27.2 (2018-01-29 15:48:57 GMT) multi-call binary.
Usage: timeout [-t SECS] [-s SIG] PROG ARGS
Runs PROG. Sends SIG to it if it is not gone in SECS seconds.
Defaults: SECS: 10, SIG: TERM.
This patch fixes it.
2018-12-15 Bruno Haible <address@hidden>
dfa tests: Avoid test failure on Alpine Linux.
* tests/dfa-match.sh (timeout_10): Accommodate the BusyBox 'timeout'
command found on Alpine Linux.
diff --git a/tests/dfa-match.sh b/tests/dfa-match.sh
index c06bb44..1923c2d 100755
--- a/tests/dfa-match.sh
+++ b/tests/dfa-match.sh
@@ -22,7 +22,11 @@
path_prepend_ .
if (type timeout) >/dev/null 2>&1; then
- timeout_10='timeout 10'
+ if timeout --help 2>&1 | grep BusyBox; then
+ timeout_10='timeout -t 10'
+ else
+ timeout_10='timeout 10'
+ fi
else
timeout_10=
fi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- timeout program on Alpine Linux,
Bruno Haible <=