summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing')
-rwxr-xr-xtools/testing/ktest/ktest.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 42bc505e14cb..9d6f50045dbd 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1921,7 +1921,10 @@ sub run_command {
doprint("$command ... ");
$start_time = time;
- $pid = open(CMD, "$command 2>&1 |") or
+ $pid = open(CMD, "-|",
+ "sh", "-c",
+ 'command=$1; shift; exec 2>&1; eval "$command"',
+ "sh", $command) or
(fail "unable to exec $command" and return 0);
if (defined($opt{"LOG_FILE"})) {