From 17cb27871a6cb5a1c21ca604c2285e7f072478a0 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Jun 2026 09:57:12 +0300 Subject: test: close issued-but-unasserted gaps (signals, sched, sysv msgrcv) + fix 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 --- integrationtests/ipc_sysv_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'integrationtests/ipc_sysv_test.go') diff --git a/integrationtests/ipc_sysv_test.go b/integrationtests/ipc_sysv_test.go index d5f4fa9..8f21567 100644 --- a/integrationtests/ipc_sysv_test.go +++ b/integrationtests/ipc_sysv_test.go @@ -68,6 +68,15 @@ func TestSysVMsgBasic(t *testing.T) { for _, tp := range []string{"enter_msgget", "enter_msgsnd", "enter_msgrcv", "enter_msgctl"} { assertEventDurationPositive(t, result, ExpectedEvent{Tracepoint: tp, Comm: "ioworkload"}) } + + // msgrcv is READ_CLASSIFIED: its exit handler reports ctx->ret, the number + // of bytes copied into the caller's buffer. The workload sends the literal + // "ior-sysv-msg" (12 bytes, scenario_sysv.go sysvMsgText) and reads it back, + // so the captured byte count must be at least the payload length. (msgsnd is + // UNCLASSIFIED, so only msgrcv carries a meaningful READ byte count.) + assertEventBytesAtLeast(t, result, + ExpectedEvent{Tracepoint: "enter_msgrcv", Comm: "ioworkload"}, + uint64(len("ior-sysv-msg"))) } // sysvSemTraceArgs restricts tracing to the SysV semaphore family so the -- cgit v1.2.3