Discussion:
[Linuxptp-devel] linuxptp test suite
Miroslav Lichvar
2013-09-05 16:48:59 UTC
Permalink
A support for ptp4l was recently added to the clknetsim simulator. It
can be now used with the UDPv4 transport and HW or SW time stamping.

I've been working on a linuxptp test suite which would utilize the
support, it's available here:
https://github.com/mlichvar/linuxptp-testsuite

Currently, there are 11 tests of ptp4l in various configurations and
one test of phc2sys. The tests run a simulation with a number of
ptp4l/phc2sys instances and then they check if the slave clocks were
synchronized during the simulation as expected.
Richard Cochran
2013-09-05 18:12:40 UTC
Permalink
Post by Miroslav Lichvar
A support for ptp4l was recently added to the clknetsim simulator. It
can be now used with the UDPv4 transport and HW or SW time stamping.
This is really awesome news. I will be on the road this weekend, but I
sure will take a look at this next week.

BTW, there is a patch in the queue for Linux kernel 3.12 that adds SW
Tx time stamping to the tuntap driver. I have been running tests over
little vde_switch networks (with free_running set) and also to qemu
(although the synchronization performance is not that great). This is
a good way to test things like BMC behavior.

Thanks,
Richard
Miroslav Lichvar
2013-10-09 10:33:45 UTC
Permalink
Post by Richard Cochran
Post by Miroslav Lichvar
A support for ptp4l was recently added to the clknetsim simulator. It
can be now used with the UDPv4 transport and HW or SW time stamping.
This is really awesome news. I will be on the road this weekend, but I
sure will take a look at this next week.
Did you have a chance to look at it? And would you be interested in
including the test suite in the linuxptp git? I think it would be
really cool if there was an extensive and reliable "make check" which
doesn't need any special hw or network setup.
--
Miroslav Lichvar
Keller, Jacob E
2013-10-09 18:36:30 UTC
Permalink
Post by Miroslav Lichvar
Post by Richard Cochran
Post by Miroslav Lichvar
A support for ptp4l was recently added to the clknetsim simulator. It
can be now used with the UDPv4 transport and HW or SW time stamping.
This is really awesome news. I will be on the road this weekend, but I
sure will take a look at this next week.
Did you have a chance to look at it? And would you be interested in
including the test suite in the linuxptp git? I think it would be
really cool if there was an extensive and reliable "make check" which
doesn't need any special hw or network setup.
That sounds very useful to me as well. I like the idea of it being able
to be run without specialized
Richard Cochran
2013-10-09 19:28:43 UTC
Permalink
Post by Miroslav Lichvar
Did you have a chance to look at it? And would you be interested in
including the test suite in the linuxptp git? I think it would be
really cool if there was an extensive and reliable "make check" which
doesn't need any special hw or network setup.
Sorry, I really did not yet get a chance, but it still sounds way
cool...

As far as including a test suite, do you mean to somehow merge
clknetsim and linuxptp, or to just have a linuxptp make target that
uses the (externally installed) clknetsim code?

Thanks,
Richard
Miroslav Lichvar
2013-10-10 11:27:17 UTC
Permalink
Post by Richard Cochran
As far as including a test suite, do you mean to somehow merge
clknetsim and linuxptp, or to just have a linuxptp make target that
uses the (externally installed) clknetsim code?
I meant to include the bash scripts which are now in the
linuxptp-testsuite repo and run them in "make check". I think the
clknetsim code should stay in its own repo as it supports also other
projects than linuxptp.

Currently, the test suite will try to clone clknetsim from the github
repo and build it if it's not found in the current directory. I'm not
sure if that's acceptable for linuxptp. In any case, we would probably
want to always work with a known commit and not blindly follow HEAD.

Perhaps the git submodule feature could be useful here?
--
Miroslav Lichvar
Miroslav Lichvar
2013-09-13 14:55:22 UTC
Permalink
Post by Miroslav Lichvar
I've been working on a linuxptp test suite which would utilize the
https://github.com/mlichvar/linuxptp-testsuite
(my todo list includes writing tests of the various PI servo options,
support for multiple interfaces for boundary clocks and per-port delay
generator configuration to make it easier to reproduce some of the
sync/fup reorder bugs)
The three items are complete.

The clknetsim language used to configure the network delay was
extended for variables. The port variable can be used to easily
control the delay between sync and followup messages. As an example
there is a test for the older bug where sync/fup were incorrectly
paired after sequenceId overflowed.

Support for multiple networks/interfaces was added to clknetsim and
it's possible to simulate complex network topologies. A test with
multiple boundary clocks was added.

There are now 17 tests in the linuxptp-testsuite repo. If you are
pulling from the repo, be sure to also update clknetsim.
--
Miroslav Lichvar
Loading...