From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAF7DBA49 for ; Tue, 7 Mar 2023 18:42:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49F8EC433EF; Tue, 7 Mar 2023 18:42:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678214558; bh=tq0xN++537YpytXOlsaff1G3Q1pz2bnuBKNcMw/s6DI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V9+wXmmMahS4oOK3g9YYaUq+C/7EKEFJFxqCofHaau/odDD8+oLQOHPaJSpB7b+qa IK+rkDkfXrakSzXV11/Rnvm/xCEy+1C84QGWWLpFqLf54L6jG/sjowAvTV1xOAQKC3 eLkE0Hw1YRH3mxlMC6UwvS8YRUarecovWJEk2Fa8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Steven Rostedt Subject: [PATCH 6.1 833/885] ktest.pl: Give back console on Ctrt^C on monitor Date: Tue, 7 Mar 2023 18:02:47 +0100 Message-Id: <20230307170038.026151424@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307170001.594919529@linuxfoundation.org> References: <20230307170001.594919529@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Steven Rostedt commit 83d29d439cd3ef23041570d55841f814af2ecac0 upstream. 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 Signed-off-by: Greg Kroah-Hartman --- tools/testing/ktest/ktest.pl | 3 +++ 1 file changed, 3 insertions(+) --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -4193,6 +4193,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",