summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorSasha Levin <sashal@kernel.org>2026-03-06 07:45:04 -0500
committerSasha Levin <sashal@kernel.org>2026-10-07 18:26:44 -0400
commit20ed30c4a64973085f74e0b4343bf9ea5b783862 (patch)
tree3c4da87e4b2e85d1e8972322c6c4933c7561bead /tools/perf/scripts/python/bin
parentfee17ba499173269b25d7f01d877f06bbadd5fc6 (diff)
downloadlinux-next-20ed30c4a64973085f74e0b4343bf9ea5b783862.tar.gz
linux-next-20ed30c4a64973085f74e0b4343bf9ea5b783862.zip
kernel/api: add runtime verification selftest
Add a selftest for CONFIG_KAPI_RUNTIME_CHECKS that exercises sys_open/sys_read/sys_write/sys_close through raw syscall() and verifies KAPI pre-validation catches invalid parameters while allowing valid operations through. Test cases (TAP output): 1-4: Valid open/read/write/close succeed 5-8: Unknown open flag bits and a NULL path are rejected with EINVAL, while mode bits above 07777 are accepted (the kernel masks them) 9-20: Boundary conditions and error paths (bad and closed fds, zero counts, over-long paths, unmapped buffers, wrong access mode) 21-27: Pipe, file descriptor lifecycle and other error paths 28-30: A normal open/read/write/close sequence, and read()/write() with a NULL buffer and a zero count returning 0 31: dmesg contains the expected KAPI warning strings Tests that depend on CONFIG_KAPI_RUNTIME_CHECKS are skipped when an open() with an unknown flag bit succeeds, which means the checks are not active. Assisted-by: LLM Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions