The patch below does not apply to the 4.14-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <stable@xxxxxxxxxxxxxxx>. To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.14.y git checkout FETCH_HEAD git cherry-pick -x 83d29d439cd3ef23041570d55841f814af2ecac0 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<stable@xxxxxxxxxxxxxxx>' --in-reply-to '167818274565224@xxxxxxxxx' --subject-prefix 'PATCH 4.14.y' HEAD^.. Possible dependencies: 83d29d439cd3 ("ktest.pl: Give back console on Ctrt^C on monitor") c2d84ddb338c ("ktest.pl: Add MAIL_COMMAND option to define how to send email") 59f89eb1e3dd ("ktest.pl: Use run_command to execute sending mail") 8604b0c4bc9a ("ktest.pl: Kill test if mailer is not supported") be1546b87f3b ("ktest.pl: Add MAIL_PATH option to define where to find the mailer") f5ef48855733 ("ktest.pl: No need to print no mailer is specified when mailto is not") eaaa1e283ada ("Ktest: add email options to sample.config") 92db453e7eeb ("Ktest: Add SigInt handling") 2ceb2d85b669 ("Ktest: Add email support") 40667fb5fda0 ("ktest.pl: Make finding config-bisect.pl dynamic") 133087f0623e ("ktest.pl: Have ktest.pl pass -r to config-bisect.pl to reset bisect") b337f9790a0c ("ktest.pl: Allow for the config-bisect.pl output to display to console") a9adc261e978 ("ktest: Use config-bisect.pl in ktest.pl") 0f0db065999c ("ktest: Add standalone config-bisect.pl program") 3e1d3678844b ("ktest: Add CONNECT_TIMEOUT to change the connection timeout time") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 83d29d439cd3ef23041570d55841f814af2ecac0 Mon Sep 17 00:00:00 2001 From: Steven Rostedt <rostedt@xxxxxxxxxxx> Date: Wed, 18 Jan 2023 16:32:13 -0500 Subject: [PATCH] ktest.pl: Give back console on Ctrt^C on monitor When monitoring the console output, the stdout is being redirected to do so. If Ctrl^C is hit during this mode, the stdout is not back to the console, the user does not see anything they type (no echo). Add "end_monitor" to the SIGINT interrupt handler to give back the console on Ctrl^C. Cc: stable@xxxxxxxxxxxxxxx Fixes: 9f2cdcbbb90e7 ("ktest: Give console process a dedicated tty") Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx> diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 62823a4232ab..74801811372f 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -4201,6 +4201,9 @@ sub send_email { } sub cancel_test { + if ($monitor_cnt) { + end_monitor; + } if ($email_when_canceled) { my $name = get_test_name; send_email("KTEST: Your [$name] test was cancelled",