projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bf6e1f
)
ktest: Cleanup terminal on dodie() failure
author
Josh Poimboeuf
<jpoimboe@redhat.com>
Fri, 30 Jan 2015 02:54:53 +0000
(20:54 -0600)
committer
Steven Rostedt
<rostedt@goodmis.org>
Mon, 2 Feb 2015 15:43:39 +0000
(10:43 -0500)
If dodie() is called with the console open, restore the terminal's
original settings before dying.
Link:
http://lkml.kernel.org/r/20150130025453.GB20952@treble.redhat.com
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
tools/testing/ktest/ktest.pl
patch
|
blob
|
history
diff --git
a/tools/testing/ktest/ktest.pl
b/tools/testing/ktest/ktest.pl
index ca20ce2dc8b685f83346179bd70df9589110d224..840803b3cd41d36649a61bac391252d4984b89d2 100755
(executable)
--- a/
tools/testing/ktest/ktest.pl
+++ b/
tools/testing/ktest/ktest.pl
@@
-1407,6
+1407,11
@@
sub dodie {
print " See $opt{LOG_FILE} for more info.\n";
}
+ if ($monitor_cnt) {
+ # restore terminal settings
+ system("stty $stty_orig");
+ }
+
die @_, "\n";
}
@@
-1449,7
+1454,7
@@
sub exec_console {
close($pts);
exec $console or
- d
od
ie "Can't open console $console";
+ die "Can't open console $console";
}
sub open_console {