]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
selftests/hid: add support for HID-BPF pre-loading before starting a test
authorBenjamin Tissoires <bentiss@kernel.org>
Wed, 10 Apr 2024 17:19:31 +0000 (19:19 +0200)
committerBenjamin Tissoires <bentiss@kernel.org>
Tue, 7 May 2024 13:39:26 +0000 (15:39 +0200)
commite906463087cec0a179ddcafe08aeef5899af6b00
tree09ee01e25e496756aaf1d42c4e3c3849355aefa9
parenta7def2e51c667578140d9aa3282533463ed3df91
selftests/hid: add support for HID-BPF pre-loading before starting a test

few required changes:
- we need to count how many times a udev 'bind' event happens
- we need to tell `udev-hid-bpf` to not automatically attach the
  provided HID-BPF objects
- we need to manually attach the ones from the kernel tree, and wait
  for the second udev 'bind' event to happen

Link: https://lore.kernel.org/r/20240410-bpf_sources-v1-11-a8bf16033ef8@kernel.org
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
tools/testing/selftests/hid/tests/base.py
tools/testing/selftests/hid/tests/base_device.py