diff options
| author | Samuel Wu <wusamuel@google.com> | 2026-05-11 20:45:57 +0300 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-05-15 02:04:54 +0300 |
| commit | 9ef647114201b50b60a43054506af893f74ae8b8 (patch) | |
| tree | 69ac84cc8a7ca1eefcf05d73486979098792b8a4 /include | |
| parent | 5ff44955447eb04f77161736ff5729c8c0994f7f (diff) | |
| download | linux-9ef647114201b50b60a43054506af893f74ae8b8.tar.xz | |
selftests/bpf: Add tests for wakeup_sources kfuncs
Introduce a set of BPF selftests to verify the safety and functionality
of wakeup_source kfuncs.
The suite includes:
1. A functional test (test_wakeup_source.c) that iterates over the
global wakeup_sources list. It uses CO-RE to read timing statistics
and validates them in user-space via the BPF ring buffer.
2. A negative test suite (wakeup_source_fail.c) ensuring the BPF
verifier correctly enforces reference tracking and type safety.
3. Enable CONFIG_PM_WAKELOCKS in the test config, allowing creation of
wakeup sources via /sys/power/wake_lock.
A shared header (wakeup_source.h) is introduced to ensure consistent
memory layout for the Ring Buffer data between BPF and user-space.
Signed-off-by: Samuel Wu <wusamuel@google.com>
Link: https://lore.kernel.org/r/20260511174559.659782-3-wusamuel@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
