diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-09 22:33:34 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-09 22:33:34 +0300 |
| commit | c61fb1f71a72d66960914877e8f0a24638c85324 (patch) | |
| tree | e7306a3fa1d613dcbf5523afb4ed74cdcff8138c /docs/tutorial/tapes | |
| parent | d33d2ef1186096dddf2836f83e91b833866ef3bd (diff) | |
test(memory): add coverage for mlock/mlock2/munlock/mlockall/munlockall
The memory-locking cluster (FamilyMemory) had no end-to-end integration
coverage; mmap_test.go only exercised mmap/msync/mremap/munmap. These
syscalls return UNCLASSIFIED, so enter-tracepoint presence is the right
end-to-end check (mlock/mlock2/munlock are KindMem, mlockall/munlockall
are KindNull).
Add a mmap-memory-lock scenario that, on a single anonymous page (small
enough to stay under RLIMIT_MEMLOCK), issues raw syscalls for mlock,
munlock, mlock2(addr,len,0), mlockall(MCL_CURRENT) and munlockall so the
exact sys_enter_ tracepoints fire. mlock/mlock2/mlockall tolerate
EPERM/ENOMEM best-effort since the enter tracepoint fires before the
error; munlock/munlockall always succeed and clean up.
TestMmapMemoryLock asserts enter_mlock, enter_munlock, enter_mlock2,
enter_mlockall and enter_munlockall each fire (MinCount>=1, Comm
ioworkload). All five captured under sudo.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'docs/tutorial/tapes')
0 files changed, 0 insertions, 0 deletions
