Use ptp4l to synchronize clocksΒΆ

Check that ptp4l can be used to synchronize clocks across network.

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

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

  3. Check that ptp4l is available on IUT and Tester.

  4. Disable NTP daemon on IUT and Tester.

  5. Use clock_settime() on IUT and Tester to set different initial values for IUT and Tester clocks.

  6. Run ptp4l as master on Tester.

  7. Run ptp4l as slave on IUT.

  8. Wait for a while and terminate ptp4l on IUT and Tester.

  9. Check whether anything was printed to stderr on IUT.

  10. Obtain current time on the IUT clock and on the Tester clock, check that obtained values are (approximately) equal.

Parameters:

env

Testing environment: