OSDN Git Service

tools/bpf: Add self tests for bpf_send_signal_thread()
authorYonghong Song <yhs@fb.com>
Wed, 15 Jan 2020 03:50:03 +0000 (19:50 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 15 Jan 2020 19:44:51 +0000 (11:44 -0800)
commitab8b7f0cb3585ecb40e3305850f28658a1b8940e
treee68ec27387482ff400e4f7b7212eae6f6941e6ac
parent8482941f09067da42f9c3362e15bfb3f3c19d610
tools/bpf: Add self tests for bpf_send_signal_thread()

The test_progs send_signal() is amended to test
bpf_send_signal_thread() as well.

   $ ./test_progs -n 40
   #40/1 send_signal_tracepoint:OK
   #40/2 send_signal_perf:OK
   #40/3 send_signal_nmi:OK
   #40/4 send_signal_tracepoint_thread:OK
   #40/5 send_signal_perf_thread:OK
   #40/6 send_signal_nmi_thread:OK
   #40 send_signal:OK
   Summary: 1/6 PASSED, 0 SKIPPED, 0 FAILED

Also took this opportunity to rewrite the send_signal test
using skeleton framework and array mmap to make code
simpler and more readable.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200115035003.602425-1-yhs@fb.com
tools/testing/selftests/bpf/prog_tests/send_signal.c
tools/testing/selftests/bpf/progs/test_send_signal_kern.c