MCPcopy Create free account
hub / github.com/facebook/time / TestSocketControlMessageTimestampFail

Function TestSocketControlMessageTimestampFail

timestamp/timestamp_linux_test.go:276–283  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

274 // Check that socket option is set
275 timestampsEnabled, _ := unix.GetsockoptInt(connFd, unix.SOL_SOCKET, unix.SO_TIMESTAMPING)
276 newTimestampsEnabled, _ := unix.GetsockoptInt(connFd, unix.SOL_SOCKET, unix.SO_TIMESTAMPING_NEW)
277
278 // At least one of them should be set, which it > 0
279 require.Greater(t, timestampsEnabled+newTimestampsEnabled, 0, "None of the socket options is set")
280
281 // SOFTWARE_RX
282 // Allow reading of kernel timestamps via socket
283 err = EnableTimestamps(SWRX, connFd, &net.Interface{Name: "lo", Index: 1})
284 require.NoError(t, err)
285
286 // Check that socket option is set

Callers

nothing calls this directly

Calls 2

SkipMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…