From nobody Sun Sep 14 18:54:41 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 6678AC32793 for ; Wed, 18 Jan 2023 21:35:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230140AbjARVfR (ORCPT ); Wed, 18 Jan 2023 16:35:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjARVfL (ORCPT ); Wed, 18 Jan 2023 16:35:11 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26C0A63E17 for ; Wed, 18 Jan 2023 13:35:10 -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 dfw.source.kernel.org (Postfix) with ESMTPS id A0FBD61A3F for ; Wed, 18 Jan 2023 21:35:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99E67C433F0; Wed, 18 Jan 2023 21:35:08 +0000 (UTC) Date: Wed, 18 Jan 2023 16:35:06 -0500 From: Steven Rostedt To: LKML Cc: Masami Hiramatsu , John 'Warthog9' Hawley Subject: [PATCH] ktest.pl: Give back console on Ctrt^C on monitor Message-ID: <20230118163506.3eee2c4e@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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