selftests/hid: add tests for bpf_hid_hw_request
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 3 Nov 2022 15:57:50 +0000 (16:57 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 15 Nov 2022 15:28:31 +0000 (16:28 +0100)
commit4f7153cf461ed0f78d8da8c9fd02d38728a76b90
treed6a105c244a7f429a8eafbdafd831824b0604394
parent91a7f802d1852f60139712bdcfa98db547ce0531
selftests/hid: add tests for bpf_hid_hw_request

Add tests for the newly implemented function.
We test here only the GET_REPORT part because the other calls are pure
HID protocol and won't infer the result of the test of the bpf hook.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
tools/testing/selftests/hid/hid_bpf.c
tools/testing/selftests/hid/progs/hid.c
tools/testing/selftests/hid/progs/hid_bpf_helpers.h