tools/bpf: add selftest in test_progs for bpf_send_signal() helper
authorYonghong Song <yhs@fb.com>
Thu, 23 May 2019 21:47:47 +0000 (14:47 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 24 May 2019 21:26:48 +0000 (23:26 +0200)
commit16f0efc3b46352018c297bbdb2c405e7d8a63095
treebe871dcf6d0496ed0093293e7cebb41a6b95ad0c
parentedaccf8985305967c22903a78283c8c837ea48dd
tools/bpf: add selftest in test_progs for bpf_send_signal() helper

The test covered both nmi and tracepoint perf events.
  $ ./test_progs
  ...
  test_send_signal_tracepoint:PASS:tracepoint 0 nsec
  ...
  test_send_signal_common:PASS:tracepoint 0 nsec
  ...
  test_send_signal_common:PASS:perf_event 0 nsec
  ...
  test_send_signal:OK

Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/bpf_helpers.h
tools/testing/selftests/bpf/prog_tests/send_signal.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_send_signal_kern.c [new file with mode: 0644]