OSDN Git Service

Improve send_signal BPF test stability
authorMykola Lysenko <mykolal@fb.com>
Tue, 8 Mar 2022 20:04:48 +0000 (12:04 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 9 Mar 2022 01:39:29 +0000 (17:39 -0800)
commit1fd49864127cd0d33aea8de4cf0858344c9c7265
treefd15ce022a93e365bf892ad506ccedcb85709352
parentd4b540544499d90ac81695e21e354cd5c82fa67e
Improve send_signal BPF test stability

Substitute sleep with dummy CPU intensive computation.
Finish aforemention computation as soon as signal was
delivered to the test process. Make the BPF code to
only execute when PID global variable is set

Signed-off-by: Mykola Lysenko <mykolal@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20220308200449.1757478-3-mykolal@fb.com
tools/testing/selftests/bpf/prog_tests/send_signal.c
tools/testing/selftests/bpf/progs/test_send_signal_kern.c