From patchwork Wed Jan 18 21:35:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 45508 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2576155wrn; Wed, 18 Jan 2023 13:40:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXvElsJnAvW8oI/B3tv3bqMPEvhTvSoQ15kdYoZ9aFlSdgT0dRgHJ5HVWacmuuxKu12EwHYP X-Received: by 2002:a17:907:d684:b0:7c1:e78:1e2 with SMTP id wf4-20020a170907d68400b007c10e7801e2mr9947184ejc.11.1674078021067; Wed, 18 Jan 2023 13:40:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674078021; cv=none; d=google.com; s=arc-20160816; b=piegFWq41Rg2eK9U0WsDpJLX4Am4U8r96ZSBk5oNiem8NRK348JLugP6D2Mngj6fAE X7yLZDAaUg3QVHQmJ00tKcQ2khn7q/gnFkm+4+0jMoZawZrjvW+Vt5IhL4QTHEhVudKl p5vh6rj3OXW+w8B0jRuMoFgNW+p/jNKij1srl4AinYDuZrFvY0Hf2yKNNoS/vW1py0Rn j6ru+ik9YK0lyQCW+zKUZAAjlxTJmrf3bFG1gR6gjOZjGqoittvRBXCuffNkW0ZZFf7H x5O87MPGcY9Y0Bl2cjvlftHhbS63bP8D1T7NYKAbfiOgtKgsOLVBEXueJg68IXokKMpD gIbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:subject:cc:to:from:date; bh=8AN8sfZ49Q4iLx5NRDrnFVI9f3RPTN8lqYBnPpJKyNk=; b=PkvG3SjDtZG+yHNmAyvk/YZIV0mBXIPRITEvrYZUcwa82m6uyv+60qzaxZr2qZKPRL /BSTwc1//gMVwsRxfgeFBfiLpwNqiG/0z08bAMb5cSroAD+ZxXcIWimV7x8zvN1dLu+c 02DURfqs2mwXWxs4Nsgb0AWdBT/OmAbRG7WjAxUiX+E+xhQbM/37tS7cMRpqTTcYq6eT dVJV1G9hpvyq382CIQfhLZl1X7oV4WNepxHH44I6Sfqup7O2DQBx2UV1iaNHnDgg/JMc UwKUM2gO7Zn4MYA0AY6AklPJ6WAwI92d1SEb8CIlUoM9+xSlt+/Ysr5ufXnIIPKphX5x xriQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xi8-20020a170906dac800b007c10bb4eaabsi16669537ejb.156.2023.01.18.13.39.56; Wed, 18 Jan 2023 13:40:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230106AbjARVfQ (ORCPT + 99 others); Wed, 18 Jan 2023 16:35:16 -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 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755398034707949878?= X-GMAIL-MSGID: =?utf-8?q?1755398034707949878?= 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 { } 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",