[Pkg-libvirt-commits] [libguestfs] 02/87: run: Use timeout --foreground option.

Hilko Bengen bengen at moszumanska.debian.org
Wed Feb 19 21:09:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch debian
in repository libguestfs.

commit efd040e84696458cdaf4e3777f735ec51c6c6149
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Thu Dec 19 08:21:53 2013 +0000

    run: Use timeout --foreground option.
    
    If timeout doesn't have this option (RHEL 6) don't use timeout at all.
    
    Attempt to fix RHBZ#1025269.
    
    (cherry picked from commit 681488877456b83f039dc518861f29ab4e1857f0)
---
 run.in | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/run.in b/run.in
index 07e9088..9edfdcd 100755
--- a/run.in
+++ b/run.in
@@ -219,7 +219,6 @@ fi
 #    test fails
 #  - print how long it takes to run the test
 #  - timeout if the test takes too long to run
-#  - don't use timeout on RHEL 6 because it's broken (RHBZ#1025269)
 
 # Originally 1h, but that is not long enough to run the C API
 # tests on Koji.
@@ -228,9 +227,12 @@ timeout_kill=30s
 
 # Do we have Padraig's timeout utility (from coreutils)?
 if timeout --help >/dev/null 2>&1; then
-    # Does this version of timeout have the -k option?  (Not on RHEL 6)
-    if timeout -k 10s 10s true >/dev/null 2>&1; then
-        timeout="timeout -k $timeout_kill $timeout_period"
+    # Must use the --foreground option (RHBZ#1025269).
+    if timeout --foreground 2 sleep 0 >/dev/null 2>&1; then
+        # Does this version of timeout have the -k option?  (Not on RHEL 6)
+        if timeout -k 10s 10s true >/dev/null 2>&1; then
+            timeout="timeout -k $timeout_kill $timeout_period"
+        fi
     fi
 fi
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list