Commit 0ca77a2
committed
Add Linux UHID backend test hooks
Expose test-only hooks for the Linux UHID/uinput backend and add fake-syscall support for unit tests. Introduces LIBVIRTUALHID_ENABLE_TEST_HOOKS when BUILD_TESTS is enabled in CMake, adds system_* wrappers (open/close/read/write/ioctl/poll/access) and ScopedLinuxTestSyscalls to allow scripted syscall overrides. Adds extensive test helpers and fake backend behaviors in uhid_backend.cpp and a new header uhid_backend_test_hooks.hpp with public test APIs, plus related test CMake and unit test additions, enabling backend testing without real device nodes.1 parent 4f28b95 commit 0ca77a2
5 files changed
Lines changed: 2067 additions & 32 deletions
File tree
- src
- platform/linux
- tests
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| |||
0 commit comments