testptp: Add support for testing ptp_clock_info .adjphase callback
authorRahul Rameshbabu <rrameshbabu@nvidia.com>
Mon, 12 Jun 2023 21:14:55 +0000 (14:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jun 2023 08:02:33 +0000 (09:02 +0100)
commit3a9a9a6139286584d1199f555fa4f96f592a3217
tree26fa389c16473c64c7b448bcc28da02a938809a9
parent048f6d998eacabed143d6524395573f8868a4f34
testptp: Add support for testing ptp_clock_info .adjphase callback

Invoke clock_adjtime syscall with tx.modes set with ADJ_OFFSET when testptp
is invoked with a phase adjustment offset value. Support seconds and
nanoseconds for the offset value.

Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Maciek Machnikowski <maciek@machnikowski.net>
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/ptp/testptp.c