Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf test: Fix bpf test sample mismatch reporting

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 <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>

authored by

Michael Petlan and committed by
Arnaldo Carvalho de Melo
3e11300c 64f45351

+1 -1
+1 -1
tools/perf/tests/bpf.c
··· 192 192 } 193 193 194 194 if (count != expect * evlist->core.nr_entries) { 195 - pr_debug("BPF filter result incorrect, expected %d, got %d samples\n", expect, count); 195 + pr_debug("BPF filter result incorrect, expected %d, got %d samples\n", expect * evlist->core.nr_entries, count); 196 196 goto out_delete_evlist; 197 197 } 198 198