diff --git a/run.in b/run.in index 0ab3569e7..5d84421df 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