Set clock time
Check that time can be set for PTP device associated with the tested network interface.
Scenarios: X3-PTP001.
Find out PTP device associated with the IUT interface, call open() to get its FD.
Get initial timestamp from the PTP device.
Call clock_settime() to set current time for the PTP device according to ts.
Call clock_gettime() to get current time from the PTP device, check that difference from the previously set value is not big.
Sleep for a while (between min_sleep and max_sleep seconds).
Call clock_gettime() to get another timestamp from the PTP device. Check that the timestamp advanced according to the delay between calls.
Yurij Plotnikov Yurij.Plotnikov@arknetworks.am
Parameters:
env |
Testing environment: |
ts |
Timestamp to set, in seconds (negative value means current time) |
min_sleep |
Minimum time to sleep between clock_gettime() calls, seconds |
max_sleep |
Maximum time to sleep between clock_gettime() calls, seconds |