]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5ecf703708fe1390d3f9d59e73e8fc0c59f91a77
treee68ec27387482ff400e4f7b7212eae6f6941e6ac
parenta125794550879b2171bc369d4f4d74de16aa2886
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