Subject: Re: [PATCH net-next v2] selftests/net: convert so_txtime to drv-net

From: Willem de Bruijn <[email-masked]>
Date: Sat, 04 Apr 2026 22:20:15 -0400

Willem de Bruijn wrote:
> From: Willem de Bruijn <[email-masked]>
> 
> In preparation for extending to pacing hardware offload, convert the
> so_txtime.sh test to a drv-net test that can be run against netdevsim
> and real hardware.
> 
> Also update so_txtime.c to not exit on first failure, but run to
> completion and report exit code there. This helps with debugging
> unexpected results, especially when processing multiple packets,
> as in the "reverse_order" testcase.
> 
> Signed-off-by: Willem de Bruijn <[email-masked]>
> 
> ----
> 
> v1 -> v2
> - move so_txtime.c for net/lib to drivers/net (Jakub)
> - fix drivers/net/config order (Jakub)
> - detect passing when failure is expected (Jakub, Sashiko)
> - pass pylint --disable=R (Jakub)
> - only call ksft_run once (Jakub)
> - do not sleep if waiting time is negative (Sashiko)
> - add \n when converting error() to fprintf() (Sashiko)
> - 4 space indentation, instead of 2 space
> - increase sync delay from 100 to 200ms, to fix rare vng flakes
> 
> v1: https://lore.kernel.org/netdev/[email-masked]/
> ---
>  .../testing/selftests/drivers/net/.gitignore  |   1 +
>  tools/testing/selftests/drivers/net/Makefile  |   5 +-
>  tools/testing/selftests/drivers/net/config    |   2 +
>  .../selftests/{ => drivers}/net/so_txtime.c   |  24 +++-
>  .../selftests/drivers/net/so_txtime.py        |  88 ++++++++++++++
>  tools/testing/selftests/net/.gitignore        |   1 -
>  tools/testing/selftests/net/Makefile          |   2 -
>  tools/testing/selftests/net/so_txtime.sh      | 110 ------------------
>  8 files changed, 114 insertions(+), 119 deletions(-)
>  rename tools/testing/selftests/{ => drivers}/net/so_txtime.c (96%)
>  create mode 100755 tools/testing/selftests/drivers/net/so_txtime.py
>  delete mode 100755 tools/testing/selftests/net/so_txtime.sh
> 
> diff --git a/tools/testing/selftests/drivers/net/.gitignore b/tools/testing/selftests/drivers/net/.gitignore
> index 585ecb4d5dc4..e5314ce4bb2d 100644
> --- a/tools/testing/selftests/drivers/net/.gitignore
> +++ b/tools/testing/selftests/drivers/net/.gitignore
> @@ -1,3 +1,4 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  napi_id_helper
>  psp_responder
> +so_txtime
> diff --git a/tools/testing/selftests/drivers/net/Makefile b/tools/testing/selftests/drivers/net/Makefile
> index 7c7fa75b80c2..85d6a7e26627 100644
> --- a/tools/testing/selftests/drivers/net/Makefile
> +++ b/tools/testing/selftests/drivers/net/Makefile
> @@ -20,12 +20,15 @@ TEST_PROGS := \
>  	queues.py \
>  	ring_reconfig.py \
>  	shaper.py \
> +	so_txtime.py \
>  	stats.py \
>  	xdp.py \
>  # end of TEST_PROGS
>  
>  # YNL files, must be before "include ..lib.mk"
> -YNL_GEN_FILES := psp_responder
> +YNL_GEN_FILES := \
> +	psp_responder \
> +	so_txtime

This should just go under TEST_GEN_FILES (sashiko)

I don't quite understand the check_selftest check_new_files_makefile
failure.