diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-19 15:47:09 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-19 15:47:09 +0300 |
| commit | 061fb2b2380752eed06a78d10567da172ea8e27c (patch) | |
| tree | 5d2ec93cca785a3c0dfbaa0b520d45a96e0f8c6c /internal | |
| parent | 03a3513e0d8366fb2d04e3d055a3a98b63b9e708 (diff) | |
w6: extend KindFd socket introspection coverage
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/generate/classify.go | 8 | ||||
| -rw-r--r-- | internal/generate/classify_test.go | 13 |
2 files changed, 19 insertions, 2 deletions
diff --git a/internal/generate/classify.go b/internal/generate/classify.go index abe6b2e..4f6d14c 100644 --- a/internal/generate/classify.go +++ b/internal/generate/classify.go @@ -104,6 +104,14 @@ func classifyNameOnly(name string) (ClassificationResult, bool) { return ClassificationResult{Kind: KindFd}, true case "sys_enter_shutdown": return ClassificationResult{Kind: KindFd}, true + case "sys_enter_getsockname": + return ClassificationResult{Kind: KindFd}, true + case "sys_enter_getpeername": + return ClassificationResult{Kind: KindFd}, true + case "sys_enter_getsockopt": + return ClassificationResult{Kind: KindFd}, true + case "sys_enter_setsockopt": + return ClassificationResult{Kind: KindFd}, true } if strings.HasPrefix(name, "sys_enter_io_") { return ClassificationResult{Kind: KindNull}, true diff --git a/internal/generate/classify_test.go b/internal/generate/classify_test.go index 07cfe49..5c7111f 100644 --- a/internal/generate/classify_test.go +++ b/internal/generate/classify_test.go @@ -265,8 +265,17 @@ func TestClassifyExitAccept4(t *testing.T) { } } -func TestClassifySocketLifecycleFdSyscallsByName(t *testing.T) { - tests := []string{"bind", "connect", "listen", "shutdown"} +func TestClassifySocketFdSyscallsByName(t *testing.T) { + tests := []string{ + "bind", + "connect", + "listen", + "shutdown", + "getsockname", + "getpeername", + "getsockopt", + "setsockopt", + } for _, name := range tests { t.Run(name, func(t *testing.T) { r := ClassifyFormat(&Format{ |
