Set clock timeΒΆ

Check that time can be set for PTP device associated with the tested network interface.

Scenarios: X3-PTP001.

  1. Find out PTP device associated with the IUT interface, call open() to get its FD.

  2. Get initial timestamp from the PTP device.

  3. Call clock_settime() to set current time for the PTP device according to ts.

  4. Call clock_gettime() to get current time from the PTP device, check that difference from the previously set value is not big.

  5. Sleep for a while (between min_sleep and max_sleep seconds).

  6. 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