<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/ptp/phc.sh, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-06-14T05:34:55Z</updated>
<entry>
<title>selftests: ptp: Add Physical Hardware Clock test</title>
<updated>2019-06-14T05:34:55Z</updated>
<author>
<name>Shalom Toledo</name>
<email>shalomt@mellanox.com</email>
</author>
<published>2019-06-11T15:45:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9366211f32076a6f3265f65a4851af9af22e4403'/>
<id>urn:sha1:9366211f32076a6f3265f65a4851af9af22e4403</id>
<content type='text'>
Test the PTP Physical Hardware Clock functionality using the "phc_ctl" (a
part of "linuxptp").

The test contains three sub-tests:
  * "settime" test
  * "adjtime" test
  * "adjfreq" test

"settime" test:
  * set the PHC time to 0 seconds.
  * wait for 120.5 seconds.
  * check if PHC time equal to 120.XX seconds.

"adjtime" test:
  * set the PHC time to 0 seconds.
  * adjust the time by 10 seconds.
  * check if PHC time equal to 10.XX seconds.

"adjfreq" test:
  * adjust the PHC frequency to be 1% faster.
  * set the PHC time to 0 seconds.
  * wait for 100.5 seconds.
  * check if PHC time equal to 101.XX seconds.

Usage:
  $ ./phc.sh /dev/ptp&lt;X&gt;

  It is possible to run a subset of the tests, for example:
    * To run only the "settime" test:
      $ TESTS="settime" ./phc.sh /dev/ptp&lt;X&gt;

Signed-off-by: Shalom Toledo &lt;shalomt@mellanox.com&gt;
Reviewed-by: Petr Machata &lt;petrm@mellanox.com&gt;
Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Tested-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
