Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1223295imm; Wed, 25 Jul 2018 13:55:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdM++FcYnqy0C3NRpgBxE6MsNx0LmkGLdkTEAUmEtKMN++0MMQtYkhXhrOe42awSjExzOfT X-Received: by 2002:a17:902:2927:: with SMTP id g36-v6mr22062522plb.303.1532552140518; Wed, 25 Jul 2018 13:55:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532552140; cv=none; d=google.com; s=arc-20160816; b=deGVldFPKvwfLXV5owXojQB9zLauxPa1N1VNOW0JGryUSGHadg0sjzsU+1wvRUlVsF PHRj9kns48AngtFg2O/NUvGIwznN4Es/ig4mbklRdvFB8t2enNupgFJEWDf0p227Kx+H P2PGvgBDmEEGTA7S4x+LAKBo0LXKpV3FiOk9j9i064nCTJPhKxZkbXFsF6Zg4jrprIfP TQxfPmxz6PWZ0biIGUd9wM+aSg5OaD7mwF/Elq80zyjVFP2WAvmmxByWzLQ67Pe3teJl VHJH5VCgfkKcZbbfYWPFRWBd6OQAy6aw0VteoxdcNnIKX7KykHSG8kad1r/KmvSLLeay fNAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=Ts/f1pYmiaZootOmrmSQSjxFnflVUf8PoOMjGGwtCuM=; b=iEyQ3TMr+CLRYOzoOA1aRnrK1CUrN96yfcgrYdiHfg2/HtDW2GXM8ZFgDDp4w1y97+ 2NsYyPyG5W9Fl1UBkxtugyVApJoeDTH87SdDHXbF/VU3dZDuQfJxjFTAKbhNlEFBoIsI lF54S7kJnoEUZmLt1tZ1lazEYBijVMLgAAilUKbm35j+sKo9+9n8ORI46IapYWR2jLAY EcICSS7rOIowtmNg8u4V9N5A5n6kH1xzYECEHx6FlIxCNL8q6C8ALQToWAl059H2Os8A 5GIzLxGKYzuQrqMAMHvVCab3s3SsJ/xq+M22DBMuSkWT5x2Smiqk3fyVNVpqhlSvft0q DEFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b67-v6si15893648pfg.0.2018.07.25.13.55.25; Wed, 25 Jul 2018 13:55:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731494AbeGYWHR (ORCPT + 99 others); Wed, 25 Jul 2018 18:07:17 -0400 Received: from terminus.zytor.com ([198.137.202.136]:59749 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730624AbeGYWHR (ORCPT ); Wed, 25 Jul 2018 18:07:17 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w6PKrhhD501934 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 25 Jul 2018 13:53:43 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w6PKrhfj501931; Wed, 25 Jul 2018 13:53:43 -0700 Date: Wed, 25 Jul 2018 13:53:43 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Thomas Richter Message-ID: Cc: linux-kernel@vger.kernel.org, tmricht@linux.ibm.com, schwidefsky@de.ibm.com, acme@redhat.com, heiko.carstens@de.ibm.com, mingo@kernel.org, brueckner@linux.ibm.com, tglx@linutronix.de, hpa@zytor.com Reply-To: tmricht@linux.ibm.com, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, brueckner@linux.ibm.com, heiko.carstens@de.ibm.com, mingo@kernel.org, acme@redhat.com, schwidefsky@de.ibm.com In-Reply-To: <20180724134858.100644-1-tmricht@linux.ibm.com> References: <20180724134858.100644-1-tmricht@linux.ibm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf test: Fix subtest number when showing results Git-Commit-ID: 9ef0112442bdddef5fb55adf20b3a5464b33de75 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.7 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_48_96 autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 9ef0112442bdddef5fb55adf20b3a5464b33de75 Gitweb: https://git.kernel.org/tip/9ef0112442bdddef5fb55adf20b3a5464b33de75 Author: Thomas Richter AuthorDate: Tue, 24 Jul 2018 15:48:58 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 24 Jul 2018 14:55:51 -0300 perf test: Fix subtest number when showing results Perf test 40 for example has several subtests numbered 1-4 when displaying the start of the subtest. When the subtest results are displayed the subtests are numbered 0-3. Use this command to generate trace output: [root@s35lp76 perf]# ./perf test -Fv 40 2>/tmp/bpf1 Fix this by adjusting the subtest number when show the subtest result. Output before: [root@s35lp76 perf]# egrep '(^40\.[0-4]| subtest [0-4]:)' /tmp/bpf1 40.1: Basic BPF filtering : BPF filter subtest 0: Ok 40.2: BPF pinning : BPF filter subtest 1: Ok 40.3: BPF prologue generation : BPF filter subtest 2: Ok 40.4: BPF relocation checker : BPF filter subtest 3: Ok [root@s35lp76 perf]# Output after: root@s35lp76 ~]# egrep '(^40\.[0-4]| subtest [0-4]:)' /tmp/bpf1 40.1: Basic BPF filtering : BPF filter subtest 1: Ok 40.2: BPF pinning : BPF filter subtest 2: Ok 40.3: BPF prologue generation : BPF filter subtest 3: Ok 40.4: BPF relocation checker : BPF filter subtest 4: Ok [root@s35lp76 ~]# Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Cc: Heiko Carstens Cc: Martin Schwidefsky Link: http://lkml.kernel.org/r/20180724134858.100644-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/builtin-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index dd850a26d579..4f5de8245b32 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -599,7 +599,7 @@ static int __cmd_test(int argc, const char *argv[], struct intlist *skiplist) for (subi = 0; subi < subn; subi++) { pr_info("%2d.%1d: %-*s:", i, subi + 1, subw, t->subtest.get_desc(subi)); - err = test_and_print(t, skip, subi); + err = test_and_print(t, skip, subi + 1); if (err != TEST_OK && t->subtest.skip_if_fail) skip = true; }