diff options
author | Yonghong Song <yhs@fb.com> | 2021-08-17 12:09:23 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2021-08-17 14:08:30 -0700 |
commit | b16ac5bf732a5e23d164cf908ec7742d6a6120d3 (patch) | |
tree | 0dc3cebe163058e198e270ed5681468ed6526ab3 /tools/testing/selftests/bpf/prog_tests/recursion.c | |
parent | 6f6cc426451bb15a85896efc7c85665b59af04ae (diff) |
selftests/bpf: Fix flaky send_signal test
libbpf CI has reported send_signal test is flaky although
I am not able to reproduce it in my local environment.
But I am able to reproduce with on-demand libbpf CI ([1]).
Through code analysis, the following is possible reason.
The failed subtest runs bpf program in softirq environment.
Since bpf_send_signal() only sends to a fork of "test_progs"
process. If the underlying current task is
not "test_progs", bpf_send_signal() will not be triggered
and the subtest will fail.
To reduce the chances where the underlying process is not
the intended one, this patch boosted scheduling priority to
-20 (highest allowed by setpriority() call). And I did
10 runs with on-demand libbpf CI with this patch and I
didn't observe any failures.
[1] https://github.com/libbpf/libbpf/actions/workflows/ondemand.yml
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210817190923.3186725-1-yhs@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/recursion.c')
0 files changed, 0 insertions, 0 deletions