From patchwork Mon Dec 2 11:42:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 11269075 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 23E23159A for ; Mon, 2 Dec 2019 11:42:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0154E2146E for ; Mon, 2 Dec 2019 11:42:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="R5CqJdUF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727354AbfLBLmz (ORCPT ); Mon, 2 Dec 2019 06:42:55 -0500 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:41294 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727362AbfLBLmy (ORCPT ); Mon, 2 Dec 2019 06:42:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1575286975; x=1606822975; h=from:to:cc:subject:date:message-id:mime-version; bh=G7BpDGweuBg7iwhggujxcNqO4v3M0dyigUx22oeY/T0=; b=R5CqJdUFhoSIm3OTI/11QFTpBg7VIH0y9YhIgzZg4t7Ow4qsVrTHRu0k oQMK7xaOprMxrkJr7nmMglWatLtPKjQWG7BtPGlbzoBEw8b9OkLeudmOu g2MShMIWf9LqQlpcRIQUuXWdpgRLcrFo5izNE/EJg56ZNVMWHuV9c+bl3 M=; IronPort-SDR: Iri7UEfN/9EXIriRWTUi+FRDCAUBqu+/FoEdxeKrlNp3qzDAx5R9Lr9UHwHkQ4WTduYkyxtGrI RDQPmvoBJMmw== X-IronPort-AV: E=Sophos;i="5.69,268,1571702400"; d="scan'208";a="12391574" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2b-5bdc5131.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 02 Dec 2019 11:42:42 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2b-5bdc5131.us-west-2.amazon.com (Postfix) with ESMTPS id 87231A247E; Mon, 2 Dec 2019 11:42:41 +0000 (UTC) Received: from EX13D31EUA001.ant.amazon.com (10.43.165.15) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 2 Dec 2019 11:42:41 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.161.217) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 2 Dec 2019 11:42:37 +0000 From: SeongJae Park To: , CC: , , , SeongJae Park Subject: [PATCH 1/2] kselftest/runner: Print new line in print of timeout log Date: Mon, 2 Dec 2019 12:42:20 +0100 Message-ID: <20191202114221.827-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.43.161.217] X-ClientProxiedBy: EX13D16UWC003.ant.amazon.com (10.43.162.15) To EX13D31EUA001.ant.amazon.com (10.43.165.15) Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: SeongJae Park If a timeout failure occurs, kselftest kills the test process and prints the timeout log. If the test process has killed while printing a log that ends with new line, the timeout log can be printed in middle of the test process output so that it can be seems like a comment, as below: # test_process_log not ok 3 selftests: timers: nsleep-lat # TIMEOUT This commit avoids such problem by printing one more line before the TIMEOUT failure log. Signed-off-by: SeongJae Park Acked-by: Kees Cook --- tools/testing/selftests/kselftest/runner.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh index 84de7bc74f2c..a8d20cbb711c 100644 --- a/tools/testing/selftests/kselftest/runner.sh +++ b/tools/testing/selftests/kselftest/runner.sh @@ -79,6 +79,7 @@ run_one() if [ $rc -eq $skip_rc ]; then \ echo "not ok $test_num $TEST_HDR_MSG # SKIP" elif [ $rc -eq $timeout_rc ]; then \ + echo "#" echo "not ok $test_num $TEST_HDR_MSG # TIMEOUT" else echo "not ok $test_num $TEST_HDR_MSG # exit=$rc" From patchwork Mon Dec 2 11:42:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 11269067 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5D6F112B for ; Mon, 2 Dec 2019 11:42:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A42CF217D7 for ; Mon, 2 Dec 2019 11:42:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="t9/wIgv5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727399AbfLBLmy (ORCPT ); Mon, 2 Dec 2019 06:42:54 -0500 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:41294 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727354AbfLBLmy (ORCPT ); Mon, 2 Dec 2019 06:42:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1575286974; x=1606822974; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=YbPUPuzF4OcGCGbbvQM8HIlqgtczstxhV1wKbI3uy50=; b=t9/wIgv5ixkIQ1Uc1TFXTDkEC2kRE2748Xqv5YBbtN80EetpZmCTxJjQ Qmcr6icoUoIDxuUNaTXzS8XlIu7Y+UhnWCGu2Jmfu+eWINhBvtm3dGfKo m0XOskMYBuLFss7WygkyDoaedioLxZwRDSTw4vh4KisbA+hxF/rDK7kV9 o=; IronPort-SDR: AA0fXIKQ/10bIqFM5QBP620q61GOx0tbBX6qQmN17T9tElCs2czzrZ/UWkA+OQ5o8eeX53JJIB Mu/c4wnp0Drw== X-IronPort-AV: E=Sophos;i="5.69,268,1571702400"; d="scan'208";a="12391585" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-119b4f96.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 02 Dec 2019 11:42:47 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-119b4f96.us-west-2.amazon.com (Postfix) with ESMTPS id 090021A122F; Mon, 2 Dec 2019 11:42:45 +0000 (UTC) Received: from EX13D31EUA001.ant.amazon.com (10.43.165.15) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 2 Dec 2019 11:42:45 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.161.217) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 2 Dec 2019 11:42:41 +0000 From: SeongJae Park To: , CC: , , , SeongJae Park Subject: [PATCH 2/2] kselftest: Support old perl versions Date: Mon, 2 Dec 2019 12:42:21 +0100 Message-ID: <20191202114221.827-2-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191202114221.827-1-sjpark@amazon.com> References: <20191202114221.827-1-sjpark@amazon.com> MIME-Version: 1.0 X-Originating-IP: [10.43.161.217] X-ClientProxiedBy: EX13D16UWC003.ant.amazon.com (10.43.162.15) To EX13D31EUA001.ant.amazon.com (10.43.165.15) Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: SeongJae Park On an old perl such as v5.10.1, `kselftest/prefix.pl` gives below error message: Can't locate object method "autoflush" via package "IO::Handle" at kselftest/prefix.pl line 10. This commit fixes the error by explicitly specifying the use of the `IO::Handle` package. Signed-off-by: SeongJae Park Acked-by: Kees Cook --- tools/testing/selftests/kselftest/prefix.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/kselftest/prefix.pl b/tools/testing/selftests/kselftest/prefix.pl index ec7e48118183..31f7c2a0a8bd 100755 --- a/tools/testing/selftests/kselftest/prefix.pl +++ b/tools/testing/selftests/kselftest/prefix.pl @@ -3,6 +3,7 @@ # Prefix all lines with "# ", unbuffered. Command being piped in may need # to have unbuffering forced with "stdbuf -i0 -o0 -e0 $cmd". use strict; +use IO::Handle; binmode STDIN; binmode STDOUT;