diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index a0b53309c5d8..c9e9a8694128 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -4243,6 +4243,9 @@ sub send_email { } sub cancel_test { + if ($monitor_cnt) { + end_monitor; + } if ($email_when_canceled) { send_email("KTEST: Your [$test_type] test was cancelled", "Your test started at $script_start_time was cancelled: sig int");