From nobody Sun Sep 14 20:42:07 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20955C678D6 for ; Wed, 18 Jan 2023 22:02:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230137AbjARWCc (ORCPT ); Wed, 18 Jan 2023 17:02:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229965AbjARWBv (ORCPT ); Wed, 18 Jan 2023 17:01:51 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 514F02F7B3; Wed, 18 Jan 2023 14:01:50 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 07900B81D69; Wed, 18 Jan 2023 22:01:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFFBCC43392; Wed, 18 Jan 2023 22:01:47 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1pIGV8-002H9r-20; Wed, 18 Jan 2023 17:01:46 -0500 Message-ID: <20230118220146.482536390@goodmis.org> User-Agent: quilt/0.66 Date: Wed, 18 Jan 2023 16:54:37 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: "John Warthog9 Hawley" , Masami Hiramatsu , stable@vger.kernel.org Subject: [for-linus][PATCH 2/3] ktest.pl: Give back console on Ctrt^C on monitor References: <20230118215435.016435760@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Steven Rostedt 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@vger.kernel.org Fixes: 9f2cdcbbb90e7 ("ktest: Give console process a dedicated tty") Signed-off-by: Steven Rostedt --- tools/testing/ktest/ktest.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index f2f48ce6ac4d..78249c3a03a5 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -4205,6 +4205,9 @@ sub send_email { } =20 sub cancel_test { + if ($monitor_cnt) { + end_monitor; + } if ($email_when_canceled) { my $name =3D get_test_name; send_email("KTEST: Your [$name] test was cancelled", --=20 2.39.0