summaryrefslogtreecommitdiff
path: root/tools/perf/tests/hists_cumulate.c
diff options
context:
space:
mode:
authorWang Nan <wangnan0@huawei.com>2016-01-11 16:48:03 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-01-12 01:22:22 +0300
commitb0500c169b4069e40f03391c7280cd6eaf849e49 (patch)
tree4005cfdb1d42e84716baef1bf024d4e0b5ad7de7 /tools/perf/tests/hists_cumulate.c
parent71b3ee7e65ffb48135d875d9c36e3183b9ecffeb (diff)
downloadlinux-b0500c169b4069e40f03391c7280cd6eaf849e49.tar.xz
perf test: Reset err after using it hold errcode in hist testcases
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. Suggested-and-Acked-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1452520124-2073-13-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/hists_cumulate.c')
-rw-r--r--tools/perf/tests/hists_cumulate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c
index e36089212061..5e6a86e50fb9 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);