Commit d64c69d
selftests/bpf: fix flaky bpf_cookie selftest
Problem:
bpf_cookie selftest fails if it runs after task_work selftest:
perf_event_open fails with errno=EINVAL.
EINVAL indicates incorrect/invalid input argument, which in case of
bpf_cookie can only point to sample_freq attribute.
Possible root cause:
When running task_work test, we can see that perf subsystem lowers
kernel.perf_event_max_sample_rate which probably is the side-effect of
the test that make bpf_cookie fail.
Solution:
Set perf_event_open sampling rate attribute for bpf_cookie the same as
task_work - this is the most reliable solution for this, changing
task_work sampling rate resulted in task_work test becoming flaky.
Signed-off-by: Mykyta Yatsenko <[email protected]>1 parent 7eb88ba commit d64c69d
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
454 | | - | |
| 453 | + | |
455 | 454 | | |
456 | 455 | | |
457 | 456 | | |
| |||
0 commit comments