summaryrefslogtreecommitdiff
path: root/integrationtests/signals_test.go
AgeCommit message (Collapse)Author
10 daystest: close issued-but-unasserted gaps (signals, sched, sysv msgrcv) + fix ↵Paul Buetow
pidfd_getfd path expectation signals: TestSignalsBasic issued but never asserted enter_tkill and enter_rt_sigqueueinfo (both genuinely emitted by sendSelfSignals); add both MinCount>=1 enter assertions. Both tracepoints were already in signalsTraceArgs. sched: TestSchedBasic omitted enter_sched_setaffinity even though scenario_sched.go re-applies its affinity mask via SchedSetaffinity and the tracepoint is in schedTraceArgs; add the MinCount>=1 enter assertion. sysv: TestSysVMsgBasic only checked enter presence + duration for msgrcv. msgrcv is READ_CLASSIFIED, so add assertEventBytesAtLeast >= 12 ("ior-sysv-msg") mirroring the recvfrom/recvmsg byte assertions. pidfd: verified TestPidfdGetfdSuccess already PASSES deterministically with PathContains "pidfd-getfd-source.txt". The path is correct and meaningful: pidfd_getfd is an fd-transfer op, so at exit applyFdTransferOp re-points the event to the RETURNED dup fd, which for a self-pidfd refers to the same open source file. Kept the assertion and added a comment explaining why it resolves to the source file rather than the pidfd's anon_inode. No BPF/handler change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01test(integration): add Signals family tracing coveragePaul Buetow
The SIGNALS syscall family previously had zero end-to-end coverage (signalfd/signalfd4 are IPC-family fd creators, not Signals). Add a self-targeting ioworkload scenario and an integration test that assert the family's tracepoints fire. scenario_signals.go (signals-basic) issues, all self-directed so it mutates no other process: - rt_sigaction : install SIG_IGN disposition for SIGUSR1 - rt_sigprocmask: BLOCK SIGUSR1 before sending, so self-delivery only marks it pending (never runs a handler / kills us) - sigaltstack : set then disable an alternate signal stack - kill/tgkill/tkill/rt_sigqueueinfo: send SIGUSR1 to self four ways - rt_sigpending : query the pending mask - rt_sigtimedwait: reap the pending signal with a SHORT 100ms timeout (hang guard); EAGAIN tolerated Safety: signal is blocked before any send; rt_sigtimedwait uses a 100ms timeout so it cannot hang; the original signal mask and SIGUSR1 disposition are restored and the alt stack disabled on exit. The goroutine is pinned with LockOSThread so gettid() matches the tgkill/tkill target and the per-thread mask applies to the waiting thread. Raw syscalls are issued directly so the tracepoints fire regardless of the Go runtime's own signal handling. pause (noreturn) and rt_sigreturn (handler-return only) are deliberately excluded. signals_test.go asserts enter_ tracepoints with MinCount>=1 for rt_sigaction, rt_sigprocmask, rt_sigpending, sigaltstack, kill, tgkill, and rt_sigtimedwait, plus a positive duration for the rt_sigtimedwait enter/exit pair. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>