]> Savannah Git Hosting - gnulib.git/commitdiff
test-dfa-match.sh: port timeout work-around to newer Busybox
authorJim Meyering <meyering@fb.com>
Thu, 17 Sep 2020 14:36:26 +0000 (07:36 -0700)
committerJim Meyering <meyering@fb.com>
Thu, 17 Sep 2020 14:36:26 +0000 (07:36 -0700)
* tests/test-dfa-match.sh: Update timeout -t portability test to
accommodate Busybox 1.30.0 and newer.

ChangeLog
tests/test-dfa-match.sh

index bbd420cb28801ef3f2ac886632fc64953f658f32..e5b50bf552e0bbdafc5ab62be071ebec8f8c30f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-09-17  Jim Meyering  <meyering@fb.com>
+
+       test-dfa-match.sh: port timeout work-around to newer Busybox
+       * tests/test-dfa-match.sh: Update timeout -t portability test to
+       accommodate Busybox 1.30.0 and newer.
+
 2020-09-16  Paul Eggert  <eggert@cs.ucla.edu>
 
        fnmatch: adjust to match glibc fix
index a7285ec0b2a13dc400122303e2d09370591724b8..d3c434d66166a1a94e8753baa7613d44418a8c7a 100755 (executable)
@@ -22,7 +22,9 @@
 path_prepend_ .
 
 if (type timeout) >/dev/null 2>&1; then
-  if timeout --help 2>&1 | grep BusyBox; then
+    # Busybox's timeout required -t until its 1.30.0 release on 2018-12-31,
+    # after which it became compatible with coreutils' timeout.
+  if timeout --help 2>&1 | grep BusyBox && timeout -t 0 true; then
     timeout_10='timeout -t 10'
   else
     timeout_10='timeout 10'