diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-29 22:09:13 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-29 22:09:13 +0300 |
| commit | e08e4c166890889baa6ccd8da4086992298ab108 (patch) | |
| tree | ce717e1a1c45edc417276ab8351e2fb34ed77144 /internal/generate/classify_test.go | |
| parent | 8cc96b7425dfe825461fd5d6c52356e1ddfe4952 (diff) | |
test(ppoll): lock in poll-family arg layout, reject fd capture
Audit of the ppoll syscall confirmed the tracing implementation is
correct: ppoll(struct pollfd *fds, nfds_t nfds,
const struct timespec *tmo_p, const sigset_t *sigmask) is classified as
KindPoll (poll_event, sibling of poll/select/pselect6) in FamilyPolling,
with an UNCLASSIFIED ret_event exit. The enter handler captures nfds from
args[1] and the timeout from the args[2] timespec, and correctly never
reads args[0] (a pointer to an ARRAY of pollfd structs) as a file
descriptor.
Add a dedicated codegen lock-in test mirroring the poll/pselect6 tests,
including negative assertions that args[0] is not captured as an fd and
that no byte-transfer field is emitted (the return value is a ready-count
>=0 or -1, not a byte count). Introduce a requireNotContains helper for
these negative checks.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/generate/classify_test.go')
0 files changed, 0 insertions, 0 deletions
