From patchwork Fri Oct 14 17:08:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 2761 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp290259wrs; Fri, 14 Oct 2022 10:11:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48pogAiFK/kwUJLGeaqWHWEwMjaZNcsINupg01PKXlYJiu5gtHmIRTo3wE0w/EVOzlFdud X-Received: by 2002:a17:907:9618:b0:78d:fa75:e2b8 with SMTP id gb24-20020a170907961800b0078dfa75e2b8mr4314936ejc.65.1665767497783; Fri, 14 Oct 2022 10:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665767497; cv=none; d=google.com; s=arc-20160816; b=pdHFOiMz9qqnoFlDvCuQ5Z7PNdWA8VzmxwxuKsP0Wwpo6+nO+vl6QtZOJ+W4ohsG5U Oay44L0pPhX5aD48AB9AhLWcLnCuVUtkv3/sRLyNlcUuzMItYDlEuSwjGe8JzuuXeVm1 5H2yaAcLjhp5rLUx8kVcRT7v6p5v4N/7knk6StT+gvS7pmHYARi/zW3UCeZR4d6GajIt Ir85RWarR8g6TthxjXeHTgf5eWvEi+PqDCpgcWwJLMEBp7mAxQjbELtGGQ3Epx3f70f4 7w2/3uu/RtD2QWJvBUnH9DiAn5ztnA3B3O0InpGnqrHQfZzBip2ZIIIn078lmfBApGJN YwTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hlj9WrvESXHbvGAw1XYG7irl+2YAh4LU+heRfQt3MA4=; b=Uq7cD2Vi/FKG1/wLY9lEqtiaosFpIsDQDU8jvKm8sv72lFYjm2YJSwvXrpPBXLOrCe E0BDL6twN1rR2nVtjnHYWolEqLnE1GIbf34EvseoX7ievmiKt/n0N6/D1cGPN92qHo5K 3ra7jTLc4AixvxwX1SSCnJrIaNU2RosjN/XDSeRhNetS/C++3w1+J4eU62mMPypZTc2n uAKqehlXRs1wxVEZKitBNWQ06yqtcUubYwgGqrFjsNRs/k4u9Pwz/YzZw7ak2vTXJz7M vdubH17UniJ0ONte1VcEgYjAR4ZxTHmhyQmwzsuRCr1Lg8MNvu8YgiVVa1539TBouLwm 4+ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LouiBfqR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hg5-20020a1709072cc500b00780636a4a58si2780140ejc.626.2022.10.14.10.11.12; Fri, 14 Oct 2022 10:11:37 -0700 (PDT) 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; dkim=pass header.i=@intel.com header.s=Intel header.b=LouiBfqR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230482AbiJNRJe (ORCPT + 99 others); Fri, 14 Oct 2022 13:09:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230207AbiJNRJb (ORCPT ); Fri, 14 Oct 2022 13:09:31 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8491C1119FA; Fri, 14 Oct 2022 10:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665767370; x=1697303370; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jUrjMM7Alwl5r3W2FcMRVxujVyEHUtZGS+tz5iNw/vk=; b=LouiBfqRHfInu7ezLdXFLIwptCPgcH8/dChsSNyir1ct55Tni4kVQKGq UWJzpXw6C7mhDiS7nayl94gVFHLfAXd+cKTEwZiXiU/Zd93vI64xbpSSz E9MWKUK1H6/aiB+wakUG8HEFPMNTzAYPMRjch5THMGaQD/SbPIXl0ewIx oKsf1AA+LkCgpcCUDRuBa3vpea+WF2BlXGH6DKMSBwFH8rzgmSrxta/hJ uiuynIJHDHjp+msS36703UB9oXPl/MDvEB+3x+wf9oG82k7K8ZuR5vsR/ 7c54K/jpRjZJ47Xqb4Xe7KM+Ad61hNCpCdH8o8imtA5bRihhtVOZtw6gL A==; X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="303041969" X-IronPort-AV: E=Sophos;i="5.95,184,1661842800"; d="scan'208";a="303041969" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2022 10:09:30 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="696376922" X-IronPort-AV: E=Sophos;i="5.95,184,1661842800"; d="scan'208";a="696376922" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.43.79]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2022 10:09:28 -0700 From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Ian Rogers , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH 1/7] perf test: test_intel_pt.sh: Fix return checking again Date: Fri, 14 Oct 2022 20:08:59 +0300 Message-Id: <20221014170905.64069-2-adrian.hunter@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014170905.64069-1-adrian.hunter@intel.com> References: <20221014170905.64069-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE 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?1746683820231123934?= X-GMAIL-MSGID: =?utf-8?q?1746683820231123934?= count_result() does not always reset ret=0 which means the value can spill into the next test result. Fix by explicitly setting it to zero between tests. Fixes: fd9b45e39cfa ("perf test: test_intel_pt.sh: Fix return checking") Signed-off-by: Adrian Hunter --- tools/perf/tests/shell/test_intel_pt.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/perf/tests/shell/test_intel_pt.sh b/tools/perf/tests/shell/test_intel_pt.sh index efaad9566c34..4609a24c9340 100755 --- a/tools/perf/tests/shell/test_intel_pt.sh +++ b/tools/perf/tests/shell/test_intel_pt.sh @@ -265,13 +265,12 @@ count_result() return fi err_cnt=$((err_cnt + 1)) - ret=0 } ret=0 -test_system_wide_side_band || ret=$? ; count_result $ret -test_per_thread "" "" || ret=$? ; count_result $ret -test_per_thread "k" "(incl. kernel) " || ret=$? ; count_result $ret +test_system_wide_side_band || ret=$? ; count_result $ret ; ret=0 +test_per_thread "" "" || ret=$? ; count_result $ret ; ret=0 +test_per_thread "k" "(incl. kernel) " || ret=$? ; count_result $ret ; ret=0 cleanup