summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/hists_cumulate.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2016-07-04 14:16:21 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-07-05 00:39:01 +0200
commit347ca878062d5fb0e16db1fae81b0994f2457efd (patch)
tree0d0b45bfe2a2d7a36abab75a37d6ada566a1138a /tools/perf/tests/hists_cumulate.c
parentperf header: Transform nodes string info to struct (diff)
downloadlinux-347ca878062d5fb0e16db1fae81b0994f2457efd.tar.xz
linux-347ca878062d5fb0e16db1fae81b0994f2457efd.zip
perf tests: Fix hist accumulation test
User's values from .perfconfig could overload the default callchain setup and cause this test to fail. Making sure the test is using default callchain_param values. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1467634583-29147-3-git-send-email-jolsa@kernel.org 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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c
index a9e3db3afac4..9fd54b79a788 100644
--- a/tools/perf/tests/hists_cumulate.c
+++ b/tools/perf/tests/hists_cumulate.c
@@ -216,6 +216,8 @@ static int do_test(struct hists *hists, struct result *expected, size_t nr_expec
/* check callchain entries */
root = &he->callchain->node.rb_root;
+
+ TEST_ASSERT_VAL("callchains expected", !RB_EMPTY_ROOT(root));
cnode = rb_entry(rb_first(root), struct callchain_node, rb_node);
c = 0;
@@ -666,6 +668,8 @@ static int test4(struct perf_evsel *evsel, struct machine *machine)
perf_evsel__set_sample_bit(evsel, CALLCHAIN);
setup_sorting(NULL);
+
+ callchain_param = callchain_param_default;
callchain_register_param(&callchain_param);
err = add_hist_entries(hists, machine);