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

Function TestReadHWTimestampCaps

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

Source from the content-addressed store, hash-verified

359 require.Error(t, err)
360 })
361}
362
363func TestSocketControlMessageTimestamp(t *testing.T) {
364 if timestamping != unix.SO_TIMESTAMPING_NEW {
365 t.Skip("This test supports SO_TIMESTAMPING_NEW only. No sample of SO_TIMESTAMPING")
366 }
367
368 var b []byte
369 var toob int
370
371 // unix.Cmsghdr used in socketControlMessageTimestamp differs depending on platform
372 switch runtime.GOARCH {
373 case "amd64":
374 b = []byte{
375 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
376 0x1, 0x0, 0x0, 0x0, 0x41, 0x0, 0x0, 0x0,
377 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
378 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,

Callers

nothing calls this directly

Calls 4

ConnFdFunction · 0.85
ioctlHWTimestampCapsFunction · 0.85
CloseMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…