History

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

Michael Petlan committed 5 years ago

Commit 3e113001 parent 64f45351 file · +1 −1Browse files

Unified · Split

tools/perf/tests/bpf.c+1−1
@@ -192,7 +192,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void), · 191 unmodified lines
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