Lines Matching +full:pre +full:- +full:programs
2 # SPDX-License-Identifier: GPL-2.0
3 # -*- coding: utf-8 -*-
159 # for example ("playstation", "hid-playstation")
162 # List of in kernel HID-BPF object files to load
164 # Any existing pre-loaded HID-BPF module will be removed
167 # for example '("xppen-ArtistPro16Gen2.bpf.o", True)'
225 sysfs_path = Path("/sys/module") / kernel_module.replace("-", "_")
244 udev_hid_bpf = shutil.which("udev-hid-bpf")
246 pytest.skip("udev-hid-bpf not found in $PATH, skipping")
254 # We need to start `udev-hid-bpf` in the background
259 "udev-hid-bpf",
260 "--verbose",
271 f"Couldn't insert hid-bpf program '{hid_bpf}', marking the test as failed"
275 # the HID-BPF program exports a rdesc fixup, so it needs to be
278 # uhid loading, and then the reload from HID-BPF)
280 while self.uhdev.kernel_ready_count < 2 and time.time() - now < 2:
285 f"Couldn't insert hid-bpf programs, marking the test as failed"
290 ["udev-hid-bpf", "--verbose", "remove", str(self.uhdev.sys_path)],
294 f"Couldn't unload hid-bpf programs, marking the test as failed"
318 while not self.uhdev.is_ready() and time.time() - now < 5:
363 A context-manager compatible class that sets up our udev rules file and
385 self.refs -= 1
391 subprocess.run("udevadm control --reload-rules".split())
392 subprocess.run("systemd-hwdb update".split())
399 prefix="91-uhid-test-device-REMOVEME-",