(t *testing.T)
| 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…