Skip to content

Commit 3e11300

Browse files
rfmvhacmel
authored andcommitted
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: 4b04e0d ("perf test: Fix basic bpf filtering test") Signed-off-by: Michael Petlan <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Sumanth Korikkar <[email protected]> Link: https //lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 64f4535 commit 3e11300

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/tests/bpf.c

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

194194
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);
196196
goto out_delete_evlist;
197197
}
198198

0 commit comments

Comments
 (0)