Subject: Re: [PATCH v2 net-next 3/3] selftests:net: Implement ptp4l sync test using netdevsim

From: Simon Horman <[email-masked]>
Date: Tue, 24 Feb 2026 10:54:25 +0000

On Sun, Feb 22, 2026 at 10:41:10AM +0100, Maciek Machnikowski wrote:
> Add PTP synchronization test using ptp4l and netdevsim.
> 
> The test creates two netdevsim adapters, links them together
> and runs the ptp4l leader and ptp4l follower on two ends
> of the netdevsim link and waits for the follower to report the
> synchronized state (s2) in its output log.
> 
> This implementation runs the test runs over IPv4 link.
> 
> Signed-off-by: Maciek Machnikowski <[email-masked]>
> ---
>  tools/testing/selftests/net/ptp.sh | 93 ++++++++++++++++++++++++++++++
>  1 file changed, 93 insertions(+)
>  create mode 100755 tools/testing/selftests/net/ptp.sh

Hi Maciek,

I'm wondering if you could consider running running shellcheck over this
and cleaning  things up a little.

I see SC2086 which I think can be trivially addressed.
And SC2329, which I think would be best ignored using #shellcheck disable=SC2329

Also, I think you need to add ptp.sh to tools/testing/selftests/net/Makefile

Thanks