Check PTP_SYS_OFFSET_PRECISE ioctl
Check that PTP_SYS_OFFSET_PRECISE ioctl can be used to obtain PTP device time and system time at the same moment.
Find out PTP device associated with the IUT interface, call open() to get its FD.
Call ioctl (
PTP_SYS_OFFSET_PRECISE) on the PTP device FD to get timestamps for PTP device,CLOCK_REALTIMEandCLOCK_MONOTONIC_RAWat the same moment.Estimate difference between PTP clock and
CLOCK_REALTIMEas device - sys_realtime in obtained response. Check that two consecutive clock_gettime() calls on PTP device andCLOCK_REALTIMEshow similar difference between timestamps.Estimate difference between PTP clock and
CLOCK_MONOTONIC_RAWas device - sys_monoraw in obtained response. Check that two consecutive clock_gettime() calls on PTP device andCLOCK_MONOTONIC_RAWshow similar difference between timestamps.
Parameters:
env  | 
Testing environment:  |