summaryrefslogtreecommitdiff
path: root/integrationtests/socket_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-19 15:47:09 +0300
committerPaul Buetow <paul@buetow.org>2026-05-19 15:47:09 +0300
commit061fb2b2380752eed06a78d10567da172ea8e27c (patch)
tree5d2ec93cca785a3c0dfbaa0b520d45a96e0f8c6c /integrationtests/socket_test.go
parent03a3513e0d8366fb2d04e3d055a3a98b63b9e708 (diff)
w6: extend KindFd socket introspection coverage
Diffstat (limited to 'integrationtests/socket_test.go')
-rw-r--r--integrationtests/socket_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/integrationtests/socket_test.go b/integrationtests/socket_test.go
index 4967c6e..059d339 100644
--- a/integrationtests/socket_test.go
+++ b/integrationtests/socket_test.go
@@ -75,6 +75,20 @@ func TestSocketAcceptLifecyclePlain(t *testing.T) {
})
}
+func TestSocketIntrospection(t *testing.T) {
+ result, _ := runScenarioResult(t, "socket-introspection", []ExpectedEvent{
+ {Tracepoint: "enter_getsockname", MinCount: 1},
+ {Tracepoint: "enter_getpeername", MinCount: 1},
+ {Tracepoint: "enter_setsockopt", MinCount: 1},
+ {Tracepoint: "enter_getsockopt", MinCount: 1},
+ })
+
+ assertTracepointPathPrefix(t, result, "enter_getsockname", "socket:1:")
+ assertTracepointPathPrefix(t, result, "enter_getpeername", "socket:1:")
+ assertTracepointPathPrefix(t, result, "enter_setsockopt", "socket:1:")
+ assertTracepointPathPrefix(t, result, "enter_getsockopt", "socket:1:")
+}
+
func assertTracepointPathPrefix(t *testing.T, result TestResult, tracepoint, wantPrefix string) {
t.Helper()
if got := countTracepointPathPrefix(result, tracepoint, wantPrefix); got == 0 {