Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1291949
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] perf test: Reset err after using it hold errcode in hist testcases |
| Date | 2015-12-15 10:10 +0100 |
| Message-ID | <qFTMm-1YA-7@gated-at.bofh.it> (permalink) |
| References | <qFSQj-1nP-13@gated-at.bofh.it> <qFT9E-1ut-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Dec 15, 2015 at 08:20:50AM +0000, Wang Nan wrote: > All hists test cases forget to reset err after using it to hold an > error code. If error occure in setup_fake_machine() it incorrectly > return TEST_OK. > > This patch fixes it. > > Signed-off-by: Wang Nan <wangnan0@huawei.com> > Suggested-by: Namhyung Kim <namhyung@kernel.org> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com> > Cc: Jiri Olsa <jolsa@kernel.org> > Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Thanks, Namhyung > --- > tools/perf/tests/hists_cumulate.c | 1 + > tools/perf/tests/hists_filter.c | 1 + > tools/perf/tests/hists_link.c | 1 + > tools/perf/tests/hists_output.c | 1 + > 4 files changed, 4 insertions(+) > > diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c > index 8292948..76f8922 100644 > --- a/tools/perf/tests/hists_cumulate.c > +++ b/tools/perf/tests/hists_cumulate.c > @@ -706,6 +706,7 @@ int test__hists_cumulate(int subtest __maybe_unused) > err = parse_events(evlist, "cpu-clock", NULL); > if (err) > goto out; > + err = TEST_FAIL; > > machines__init(&machines); > > diff --git a/tools/perf/tests/hists_filter.c b/tools/perf/tests/hists_filter.c > index ccb5b49..2cd91df 100644 > --- a/tools/perf/tests/hists_filter.c > +++ b/tools/perf/tests/hists_filter.c > @@ -120,6 +120,7 @@ int test__hists_filter(int subtest __maybe_unused) > err = parse_events(evlist, "task-clock", NULL); > if (err) > goto out; > + err = TEST_FAIL; > > /* default sort order (comm,dso,sym) will be used */ > if (setup_sorting() < 0) > diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c > index 6243e2b..4dd8f4e 100644 > --- a/tools/perf/tests/hists_link.c > +++ b/tools/perf/tests/hists_link.c > @@ -293,6 +293,7 @@ int test__hists_link(int subtest __maybe_unused) > if (err) > goto out; > > + err = TEST_FAIL; > /* default sort order (comm,dso,sym) will be used */ > if (setup_sorting() < 0) > goto out; > diff --git a/tools/perf/tests/hists_output.c b/tools/perf/tests/hists_output.c > index 248beec..dc7bf56 100644 > --- a/tools/perf/tests/hists_output.c > +++ b/tools/perf/tests/hists_output.c > @@ -597,6 +597,7 @@ int test__hists_output(int subtest __maybe_unused) > err = parse_events(evlist, "cpu-clock", NULL); > if (err) > goto out; > + err = TEST_FAIL; > > machines__init(&machines); > > -- > 1.8.3.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] perf tests: Fix false TEST_OK result for 'perf test hist' Wang Nan <wangnan0@huawei.com> - 2015-12-15 05:20 +0100
Re: [PATCH] perf tests: Fix false TEST_OK result for 'perf test hist' Namhyung Kim <namhyung@kernel.org> - 2015-12-15 09:00 +0100
[PATCH v2] perf test: Fix false TEST_OK result for 'perf test hist' Wang Nan <wangnan0@huawei.com> - 2015-12-15 09:10 +0100
[PATCH v2] perf test: Reset err after using it hold errcode in hist testcases Wang Nan <wangnan0@huawei.com> - 2015-12-15 09:30 +0100
Re: [PATCH v2] perf test: Reset err after using it hold errcode in hist testcases Namhyung Kim <namhyung@kernel.org> - 2015-12-15 10:10 +0100
Re: [PATCH v2] perf test: Fix false TEST_OK result for 'perf test hist' Namhyung Kim <namhyung@kernel.org> - 2015-12-15 10:10 +0100
Re: [PATCH] perf tests: Fix false TEST_OK result for 'perf test hist' Jiri Olsa <jolsa@redhat.com> - 2015-12-15 09:10 +0100
csiph-web