From: Michael Petlan Date: Thu, 5 Aug 2021 16:06:11 +0000 (+0200) Subject: perf test: Fix bpf test sample mismatch reporting X-Git-Tag: submit/tizen/20220208.074352~575 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f88e759079b5d2ee6600dce3cd2b8d581b777d9;p=platform%2Fkernel%2Flinux-rpi.git perf test: Fix bpf test sample mismatch reporting commit 3e11300cdfd5f1bc13a05dfc6dccf69aca5dd1dc upstream. When the expected sample count in the condition changed, the message needs to be changed too, otherwise we'll get: 0x1001f2091d8: mmap mask[0]: BPF filter result incorrect, expected 56, got 56 samples Fixes: 4b04e0decd2518e5 ("perf test: Fix basic bpf filtering test") Signed-off-by: Michael Petlan Cc: Jiri Olsa Cc: Sumanth Korikkar Link: https //lore.kernel.org/r/20210805160611.5542-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index 8345ff4..e5832b7 100644 --- a/tools/perf/tests/bpf.c +++ b/tools/perf/tests/bpf.c @@ -199,7 +199,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void), } if (count != expect * evlist->core.nr_entries) { - pr_debug("BPF filter result incorrect, expected %d, got %d samples\n", expect, count); + pr_debug("BPF filter result incorrect, expected %d, got %d samples\n", expect * evlist->core.nr_entries, count); goto out_delete_evlist; }