-
- Downloads
selftests/hid: convert the hid_bpf selftests with struct_ops
We drop the need for the attach() bpf syscall, but we need to set up the hid_id field before calling __load(). The .bpf.c part is mechanical: we create one struct_ops per HID-BPF program, as all the tests are for one program at a time. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-4-6ac6ade58329@kernel.org Signed-off-by:Benjamin Tissoires <bentiss@kernel.org>
Showing
- tools/testing/selftests/hid/hid_bpf.c 31 additions, 28 deletionstools/testing/selftests/hid/hid_bpf.c
- tools/testing/selftests/hid/progs/hid.c 54 additions, 22 deletionstools/testing/selftests/hid/progs/hid.c
- tools/testing/selftests/hid/progs/hid_bpf_helpers.h 4 additions, 15 deletionstools/testing/selftests/hid/progs/hid_bpf_helpers.h
Loading
Please register or sign in to comment