summaryrefslogtreecommitdiff
path: root/internal/streamrow/row_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-19 20:29:31 +0300
committerPaul Buetow <paul@buetow.org>2026-05-19 20:29:31 +0300
commit11a8642b7035ff558fb84d7761e93525c84e4908 (patch)
treeaa1f501fcf8f3a5474d26658731782e061cccc15 /internal/streamrow/row_test.go
parentc67b34fca467fc4e5e8aba7a1b8929d8aa55a833 (diff)
z6: add KindPoll wiring for poll/select ready counts
Diffstat (limited to 'internal/streamrow/row_test.go')
-rw-r--r--internal/streamrow/row_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/streamrow/row_test.go b/internal/streamrow/row_test.go
index 53f96c5..b239969 100644
--- a/internal/streamrow/row_test.go
+++ b/internal/streamrow/row_test.go
@@ -118,6 +118,24 @@ func TestNewCarriesReadyCountForEpollWait(t *testing.T) {
}
}
+func TestNewCarriesReadyCountForPoll(t *testing.T) {
+ enter := &types.PollEvent{TraceId: types.SYS_ENTER_POLL, Time: 3000, Pid: 22, Tid: 23, Nfds: 1, TimeoutNs: 100_000_000}
+ exit := &types.RetEvent{TraceId: types.SYS_EXIT_POLL, Time: 3100, Ret: 1, Pid: 22, Tid: 23}
+ pair := event.NewPair(enter)
+ pair.ExitEv = exit
+
+ got := New(24, pair)
+ if got.Syscall != "poll" || got.FD != UnknownFD {
+ t.Fatalf("Syscall/FD = %q/%d, want poll/%d", got.Syscall, got.FD, UnknownFD)
+ }
+ if got.RetVal != 1 || got.IsError {
+ t.Fatalf("RetVal/IsError = %d/%v, want 1/false", got.RetVal, got.IsError)
+ }
+ if got.Bytes != 0 {
+ t.Fatalf("Bytes = %d, want 0 for poll ready-count events", got.Bytes)
+ }
+}
+
// TestRowValueAccessors verifies that all typed accessor methods return the
// underlying field values set on a Row.
func TestRowValueAccessors(t *testing.T) {