Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6999118imm; Tue, 24 Jul 2018 06:51:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeLGUu0gtsNsHxy5DsiJPe9v3eY0O6O/KYHUd8vczR78gzpFc1dN9aFLRV97hNxumoStUM4 X-Received: by 2002:a65:538e:: with SMTP id x14-v6mr16231374pgq.388.1532440273529; Tue, 24 Jul 2018 06:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532440273; cv=none; d=google.com; s=arc-20160816; b=lBKpx+5gB/wZyQq5o9Kb/sLjnyEqS74K8cKeygXlYR3RksMJT9mhz/xB7FV3Rdzvyd YoL/lsCwTPYzWE3rbc3Edg+9W9gsgoS1d1mlIFHs2SVC4UDmdDql5BPkRCKO5Wcvw/0w 41rwVlE+SMisOy3Nx3gZQFIeCCrNaL1AsaOZ+OUPL5REe1xh3V4IBM3MNTdNngFdbSZX 7RBTCqw05XVBVoyOJlWZOVjQnUblCwAUP24Fhd4DyvbTfPH7Ze0PPTINdOaGx1wsKo1M aKjLsGahRGOtYr5UXKfgneQBfOFhhDK8f4utbIM2880GJaS9Oz7uGHbbnGFQG5Ezg7OY HBHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6GzgNBxdAQviVtQ+l2jOfNBe0Ef6TbX4ZHt2/fUhqV0=; b=yYCDx0GeanrytEitmxmQu45ur5kOOBvUBrn7n5HYkz/p9AuqggQbpweUNotwHrdqQ4 GEeD0fI+4VA0xEEzPKpESTnnJwaHPwJZtp5DXN50A4nUqPhW7nis527ZYNZCn5ZroC/f 1kWYNpRM17RXxzpKsP++rYtGcEpRXrZANzqqBvYFCZbInqrqyv7YeRg0MP+YWp5oYzlx TLBkK1AlzR648cbMHXam2v2HgOzBemlkfaL75DZlU6wXrPhg0yS4Al6cr4xp+elQAXnS bWomFhHrOXZcS79UgHlVKKsb+uUylm5ODUe+GLWycGouGSoiEvQROSsffkwJjzDxWQ5F DbUQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 59-v6si2988910plp.87.2018.07.24.06.50.58; Tue, 24 Jul 2018 06:51:13 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388451AbeGXOzs (ORCPT + 99 others); Tue, 24 Jul 2018 10:55:48 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43212 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388366AbeGXOzs (ORCPT ); Tue, 24 Jul 2018 10:55:48 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6ODmdlJ035932 for ; Tue, 24 Jul 2018 09:49:13 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ke2yfy20f-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 24 Jul 2018 09:49:12 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Jul 2018 14:49:10 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 24 Jul 2018 14:49:08 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6ODn8de30343220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 24 Jul 2018 13:49:08 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6897F11C04C; Tue, 24 Jul 2018 16:49:22 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2377111C052; Tue, 24 Jul 2018 16:49:22 +0100 (BST) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 24 Jul 2018 16:49:22 +0100 (BST) From: Thomas Richter To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Cc: brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, Thomas Richter Subject: [PATCH] perf test: Fix subtest number when showing results Date: Tue, 24 Jul 2018 15:48:58 +0200 X-Mailer: git-send-email 2.16.4 X-TM-AS-GCONF: 00 x-cbid: 18072413-0028-0000-0000-000002DF8D12 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072413-0029-0000-0000-000023977360 Message-Id: <20180724134858.100644-1-tmricht@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-24_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807240147 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; } -- 2.14.3