Commit 3e11300c authored by Michael Petlan's avatar Michael Petlan Committed by Arnaldo Carvalho de Melo

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: 4b04e0de ("perf test: Fix basic bpf filtering test")
Signed-off-by: default avatarMichael 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 64f45351
...@@ -192,7 +192,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void), ...@@ -192,7 +192,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
} }
if (count != expect * evlist->core.nr_entries) { 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; goto out_delete_evlist;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment