Subject: Re: [PATCH net-next v5 8/8] selftests: hsr: Add test for the inline PTP header on HSR

From: Jakub Kicinski <[email-masked]>
Date: Wed, 27 May 2026 12:12:27 -0700

On Wed, 27 May 2026 17:08:58 +0200 Sebastian Andrzej Siewior wrote:
> Requested-by: Felix Maurer <[email-masked]>

Please don't invent tags? If you want to say that Felix asked for this
just say it in English.

> Signed-off-by: Sebastian Andrzej Siewior <[email-masked]>
> ---
>  tools/testing/selftests/net/hsr/.gitignore     |   1 +
>  tools/testing/selftests/net/hsr/Makefile       |   3 +
>  tools/testing/selftests/net/hsr/hsr_ptp.sh     | 109 ++++++
>  tools/testing/selftests/net/hsr/hsr_ptp_test.c | 438 +++++++++++++++++++++++++
>  4 files changed, 551 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/hsr/.gitignore b/tools/testing/selftests/net/hsr/.gitignore
> new file mode 100644
> index 0000000000000..849eecb84c974
> --- /dev/null
> +++ b/tools/testing/selftests/net/hsr/.gitignore
> @@ -0,0 +1 @@
> +hsr_ptp_test
> diff --git a/tools/testing/selftests/net/hsr/Makefile b/tools/testing/selftests/net/hsr/Makefile
> index 31fb9326cf533..ec11fee56d8f8 100644
> --- a/tools/testing/selftests/net/hsr/Makefile
> +++ b/tools/testing/selftests/net/hsr/Makefile
> @@ -7,8 +7,11 @@ TEST_PROGS := \
>  	hsr_redbox.sh \
>  	link_faults.sh \
>  	prp_ping.sh \
> +	hsr_ptp.sh \
>  # end of TEST_PROGS
>  
>  TEST_FILES += hsr_common.sh
>  
> +TEST_GEN_PROGS := hsr_ptp_test

TEST_GET_FILES otherwise kselftest thinks its a test and tries to run
it (which of course fails on

+	if (!slaveA || !slaveB || !hsr_dev) {
+		fprintf(stderr, "Missing network devices\n");
+		exit(EXIT_FAILURE);
+	}

given there are no arguments passed in)