summaryrefslogtreecommitdiff
path: root/tools/testing/ktest
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2017-02-07 19:49:21 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2017-02-07 19:49:21 +0300
commit2e07c9f55ecabdf78746b9808fec6ab549a07f8a (patch)
treeee5bc330d98f1296ff61b819b6334538c85e794d /tools/testing/ktest
parent69973b830859bc6529a7a0468ba0d80ee5117826 (diff)
downloadlinux-2e07c9f55ecabdf78746b9808fec6ab549a07f8a.tar.xz
ktest: Have POST_TEST run after the test has totally completed
The POST_TEST config is to be executed after a test has fully compeleted, whether the test passed or failed. It currently is executed at the moment that the test has been decided if it failed or not. As the test does other clean ups, it isn't truly finished. Move the POST_TEST execution to after all the test cleanups have been done. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest')
-rwxr-xr-xtools/testing/ktest/ktest.pl20
1 files changed, 12 insertions, 8 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index d08e214ec6e7..caa90d391a96 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1412,6 +1412,10 @@ sub dodie {
system("stty $stty_orig");
}
+ if (defined($post_test)) {
+ run_command $post_test;
+ }
+
die @_, "\n";
}
@@ -1624,10 +1628,6 @@ sub save_logs {
sub fail {
- if (defined($post_test)) {
- run_command $post_test;
- }
-
if ($die_on_failure) {
dodie @_;
}
@@ -1660,6 +1660,10 @@ sub fail {
save_logs "fail", $store_failures;
}
+ if (defined($post_test)) {
+ run_command $post_test;
+ }
+
return 1;
}
@@ -2489,10 +2493,6 @@ sub halt {
sub success {
my ($i) = @_;
- if (defined($post_test)) {
- run_command $post_test;
- }
-
$successes++;
my $name = "";
@@ -2517,6 +2517,10 @@ sub success {
doprint "Reboot and wait $sleep_time seconds\n";
reboot_to_good $sleep_time;
}
+
+ if (defined($post_test)) {
+ run_command $post_test;
+ }
}
sub answer_bisect {