ktest: Fix child exit code processing
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 7 Feb 2017 17:05:25 +0000 (12:05 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 7 Feb 2017 17:05:25 +0000 (12:05 -0500)
The child_exit errno needs to be shifted by 8 bits to compare against the
return values for the bisect variables.

Fixes: c5dacb88f0a64 ("ktest: Allow overriding bisect test results")
Cc: stable@vger.kernel.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
tools/testing/ktest/ktest.pl

index caa90d391a9638766b1b6b171e61b40abc40a75d..a64da242b8242bd484ae36dd68e27beadbf775d7 100755 (executable)
@@ -2633,7 +2633,7 @@ sub do_run_test {
     }
 
     waitpid $child_pid, 0;
-    $child_exit = $?;
+    $child_exit = $? >> 8;
 
     my $end_time = time;
     $test_time = $end_time - $start_time;