]> www.infradead.org Git - users/willy/xarray.git/commit
selftests/bpf: test struct_ops with epoll
authorKui-Feng Lee <thinker.li@gmail.com>
Thu, 30 May 2024 06:59:43 +0000 (23:59 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 30 May 2024 22:34:14 +0000 (15:34 -0700)
commit1a4b858b6a045828de1b536cfab7819c50864ed6
treef53330aaf10aa8fd2acce185f5fc2745fe236e3c
parent67c3e8353f45c27800eecc46e00e8272f063f7d1
selftests/bpf: test struct_ops with epoll

Verify whether a user space program is informed through epoll with EPOLLHUP
when a struct_ops object is detached.

The BPF code in selftests/bpf/progs/struct_ops_module.c has become
complex. Therefore, struct_ops_detach.c has been added to segregate the BPF
code for detachment tests from the BPF code for other tests based on the
recommendation of Andrii Nakryiko.

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240530065946.979330-6-thinker.li@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/prog_tests/test_struct_ops_module.c
tools/testing/selftests/bpf/progs/struct_ops_detach.c [new file with mode: 0644]