diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-03-25 17:11:57 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-03-25 17:18:56 +0900 |
| commit | d62516ed1ee148c58eed60c4fa38c5dc2c3b9622 (patch) | |
| tree | 2200fe0ff4451761deb5e44e9aa272dc6b368021 /internal/netlink/netlink_test.go | |
| parent | d2b635eb555d9c208028ea862604591c0973f268 (diff) | |
internal/netlink: enlarge recvfrom buffer
This also uses an array type for the buffer since its size now uses the hardcoded value found in the kernel.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/netlink/netlink_test.go')
| -rw-r--r-- | internal/netlink/netlink_test.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/internal/netlink/netlink_test.go b/internal/netlink/netlink_test.go index 0926e3bd..0b7df0f1 100644 --- a/internal/netlink/netlink_test.go +++ b/internal/netlink/netlink_test.go @@ -1,7 +1,6 @@ package netlink import ( - "os" "syscall" "testing" ) @@ -23,10 +22,7 @@ func checkPayload(t *testing.T, testCases []payloadTestCase) { t.Run(tc.name, func(t *testing.T) { t.Parallel() - c := conn{ - pos: syscall.NLMSG_HDRLEN, - buf: make([]byte, os.Getpagesize()), - } + c := conn{pos: syscall.NLMSG_HDRLEN} tc.f(&c) if got := c.pending(); string(got) != string(tc.want) { t.Errorf("pending: %#v, want %#v", got, tc.want) |
