-
Notifications
You must be signed in to change notification settings - Fork 5
selftests/bpf: fix flaky bpf_cookie selftest #6032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selftests/bpf: fix flaky bpf_cookie selftest #6032
Conversation
|
Upstream branch: d4680a1 |
2225dd1 to
7eb88ba
Compare
|
Upstream branch: d4680a1 |
74d6cd1 to
19dfb43
Compare
7eb88ba to
aa8eaa2
Compare
|
Upstream branch: d4680a1 |
19dfb43 to
2535d9a
Compare
aa8eaa2 to
4a6417f
Compare
|
Upstream branch: d4680a1 |
2535d9a to
f210946
Compare
4a6417f to
0a501c6
Compare
|
Upstream branch: dd948aa |
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]>
task_work selftest does not properly handle cleanup during failures: * destroy bpf_link * perf event fd is passed to bpf_link, no need to close it if link was created successfully * goto cleanup if fork() failed, close pipe. Signed-off-by: Mykyta Yatsenko <[email protected]>
f210946 to
45f5c2a
Compare
0a501c6 to
4ca3fcf
Compare
|
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1005696 irrelevant now. Closing PR. |
Pull request for series with
subject: selftests/bpf: fix flaky bpf_cookie selftest
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1005696