diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-29 17:01:57 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-29 17:01:57 +0300 |
| commit | fd8632e70dd2ec7dc6b0b03f469e3281114d5048 (patch) | |
| tree | ce2ea0f701e3f8bb2f93923a211044c0a7c64506 /internal/generate/retclassify_test.go | |
| parent | d526d0a5f482a3b12675bd281683c58b23d9093c (diff) | |
test(generate): lock in set_mempolicy_home_node classification
Audit of the set_mempolicy_home_node(2) NUMA syscall (task mz) confirmed
it is correctly classified: KindNull (name-only, ior does not capture the
addr/len range), FamilyMemory (matching its siblings set_mempolicy, mbind,
migrate_pages, move_pages and docs/syscall-tracing-plan.md), and an
Unclassified return (0/-1 with no byte count).
Add lock-in tests so the classification cannot silently drift:
- family_test.go asserts FamilyMemory for set_mempolicy_home_node and its
NUMA siblings, with a note that get_mempolicy is the lone sibling still
on FamilySecurity (tracked separately, out of scope here).
- retclassify_test.go asserts the exit stays UNCLASSIFIED.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/generate/retclassify_test.go')
| -rw-r--r-- | internal/generate/retclassify_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/generate/retclassify_test.go b/internal/generate/retclassify_test.go index 3adae6e..70ade1a 100644 --- a/internal/generate/retclassify_test.go +++ b/internal/generate/retclassify_test.go @@ -51,6 +51,11 @@ func TestClassifyRetUnclassified(t *testing.T) { // sequences area; it transfers no bytes, so its exit must stay // UNCLASSIFIED (plain ret_event), like its KindNull siblings. "rseq", + // set_mempolicy_home_node(2) sets the home NUMA node for a memory range + // and returns int 0/-1 (no byte count), so its exit carries a plain + // ret_event and must stay UNCLASSIFIED, like its NUMA siblings + // set_mempolicy/mbind/migrate_pages/move_pages. + "set_mempolicy_home_node", } for _, name := range unclassified { if got := ClassifyRet("sys_exit_" + name); got != Unclassified { |
