]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftest/ptp: update ptp selftest to exercise the gettimex options
authorMahesh Bandewar <maheshb@google.com>
Thu, 3 Oct 2024 10:15:06 +0000 (03:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2026 09:27:30 +0000 (10:27 +0100)
commit4f3c8c7f4e1bda9c802873f3b937427dfb61301d
treeff1510d4249635fd7e7889ef76f6bfc9dfe71dee
parent59ac47a0275fcd5a7637c3d5da20b0905563c7f5
selftest/ptp: update ptp selftest to exercise the gettimex options

[ Upstream commit 3d07b691ee707c00afaf365440975e81bb96cd9b ]

With the inclusion of commit c259acab839e ("ptp/ioctl: support
MONOTONIC{,_RAW} timestamps for PTP_SYS_OFFSET_EXTENDED") clock_gettime()
now allows retrieval of pre/post timestamps for CLOCK_MONOTONIC and
CLOCK_MONOTONIC_RAW timebases along with the previously supported
CLOCK_REALTIME.

This patch adds a command line option 'y' to the testptp program to
choose one of the allowed timebases [realtime aka system, monotonic,
and monotonic-raw).

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Link: https://patch.msgid.link/20241003101506.769418-1-maheshb@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 76868642e427 ("testptp: Add option to open PHC in readonly mode")
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/ptp/testptp.c