Skip to content

Commit ebcd3fd

Browse files
rfmvhgregkh
authored andcommitted
perf test: Fix bpf test sample mismatch reporting
commit 3e11300 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: 4b04e0d ("perf test: Fix basic bpf filtering test") Signed-off-by: Michael Petlan <mpetlan@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Sumanth Korikkar <sumanthk@linux.ibm.com> Link: https //lore.kernel.org/r/20210805160611.5542-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fa64b08 commit ebcd3fd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/perf/tests/bpf.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
199199
}
200200

201201
if (count != expect * evlist->core.nr_entries) {
202-
pr_debug("BPF filter result incorrect, expected %d, got %d samples\n", expect, count);
202+
pr_debug("BPF filter result incorrect, expected %d, got %d samples\n", expect * evlist->core.nr_entries, count);
203203
goto out_delete_evlist;
204204
}
205205

0 commit comments

Comments
 (0)