linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf test: Fix subtest number when showing results
@ 2018-07-24 13:48 Thomas Richter
  2018-07-24 14:17 ` Arnaldo Carvalho de Melo
  2018-07-25 20:53 ` [tip:perf/core] " tip-bot for Thomas Richter
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Richter @ 2018-07-24 13:48 UTC (permalink / raw)
  To: linux-kernel, linux-perf-users, acme
  Cc: brueckner, schwidefsky, heiko.carstens, Thomas Richter

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 <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf test: Fix subtest number when showing results
  2018-07-24 13:48 [PATCH] perf test: Fix subtest number when showing results Thomas Richter
@ 2018-07-24 14:17 ` Arnaldo Carvalho de Melo
  2018-07-25 20:53 ` [tip:perf/core] " tip-bot for Thomas Richter
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-07-24 14:17 UTC (permalink / raw)
  To: Thomas Richter
  Cc: linux-kernel, linux-perf-users, brueckner, schwidefsky, heiko.carstens

Em Tue, Jul 24, 2018 at 03:48:58PM +0200, Thomas Richter escreveu:
> 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.

Thanks, applied.

- Arnaldo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/core] perf test: Fix subtest number when showing results
  2018-07-24 13:48 [PATCH] perf test: Fix subtest number when showing results Thomas Richter
  2018-07-24 14:17 ` Arnaldo Carvalho de Melo
@ 2018-07-25 20:53 ` tip-bot for Thomas Richter
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Thomas Richter @ 2018-07-25 20:53 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, tmricht, schwidefsky, acme, heiko.carstens, mingo,
	brueckner, tglx, hpa

Commit-ID:  9ef0112442bdddef5fb55adf20b3a5464b33de75
Gitweb:     https://git.kernel.org/tip/9ef0112442bdddef5fb55adf20b3a5464b33de75
Author:     Thomas Richter <tmricht@linux.ibm.com>
AuthorDate: Tue, 24 Jul 2018 15:48:58 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
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 <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20180724134858.100644-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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;
 			}

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-25 20:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 13:48 [PATCH] perf test: Fix subtest number when showing results Thomas Richter
2018-07-24 14:17 ` Arnaldo Carvalho de Melo
2018-07-25 20:53 ` [tip:perf/core] " tip-bot for Thomas Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).