mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
ktest: Restore stty setting at first in dodie
The do_send_email() will call die before restoring stty if sendmail setting is not correct or sendmail is not installed. It is safer to restore it in the beginning of dodie(). Link: https://lkml.kernel.org/r/167420617635.2988775.13045295332829029437.stgit@devnote3 Cc: John 'Warthog9' Hawley <warthog9@kernel.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
4e7d2a8f0b
commit
7dc8e24f0e
1 changed files with 5 additions and 5 deletions
|
@ -1538,6 +1538,11 @@ sub dodie {
|
||||||
return if ($in_die);
|
return if ($in_die);
|
||||||
$in_die = 1;
|
$in_die = 1;
|
||||||
|
|
||||||
|
if ($monitor_cnt) {
|
||||||
|
# restore terminal settings
|
||||||
|
system("stty $stty_orig");
|
||||||
|
}
|
||||||
|
|
||||||
my $i = $iteration;
|
my $i = $iteration;
|
||||||
|
|
||||||
doprint "CRITICAL FAILURE... [TEST $i] ", @_, "\n";
|
doprint "CRITICAL FAILURE... [TEST $i] ", @_, "\n";
|
||||||
|
@ -1584,11 +1589,6 @@ sub dodie {
|
||||||
"Your test started at $script_start_time has failed with:\n@_\n", $log_file);
|
"Your test started at $script_start_time has failed with:\n@_\n", $log_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($monitor_cnt) {
|
|
||||||
# restore terminal settings
|
|
||||||
system("stty $stty_orig");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (defined($post_test)) {
|
if (defined($post_test)) {
|
||||||
run_command $post_test;
|
run_command $post_test;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue