diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-04-06 17:16:39 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-04-07 20:18:26 -0400 |
commit | 255769a17b86838eb724da5501eba6a31b0ed1ba (patch) | |
tree | 81e89840b0c35c6c42ab489cb8551e9e2035a094 | |
parent | 8604b0c4bc9a39f8fa0301bbb15146bcda2a44f7 (diff) | |
download | linux-255769a17b86838eb724da5501eba6a31b0ed1ba.tar.bz2 |
ktest.pl: Allow dodie be recursive
If dodie cause a function that itself will call dodie, then be able to
handle that. This will allow dodie functions to call run_command, which
could possibly call dodie. If dodie is called again, simply ignore it.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 3400a23e6a41..ac6750bb5942 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -1433,7 +1433,14 @@ sub do_not_reboot { ($test_type eq "config_bisect" && $opt{"CONFIG_BISECT_TYPE[$i]"} eq "build"); } +my $in_die = 0; + sub dodie { + + # avoid recusion + return if ($in_die); + $in_die = 1; + doprint "CRITICAL FAILURE... ", @_, "\n"; my $i = $iteration; |