From: Phil Sutter <phil@nwl•cc>
To: Jakub Kicinski <kuba@kernel•org>
Cc: davem@davemloft•net, netdev@vger•kernel.org, edumazet@google•com,
pabeni@redhat•com, andrew+netdev@lunn•ch, horms@kernel•org,
shuah@kernel•org, jv@jvosburgh•net, olteanv@gmail•com,
jiri@resnulli•us, mst@redhat•com, jasowang@redhat•com,
xuanzhuo@linux•alibaba.com, eperezma@redhat•com,
kuniyu@google•com, matttbe@kernel•org, martineau@kernel•org,
pablo@netfilter•org, kadlec@netfilter•org, fw@strlen•de,
antonio@openvpn•net, allison.henderson@oracle•com,
petrm@nvidia•com, razor@blackwall•org, idosch@nvidia•com,
linux-kselftest@vger•kernel.org, mptcp@lists•linux.dev,
netfilter-devel@vger•kernel.org, coreteam@netfilter•org
Subject: Re: [PATCH net] selftests: net: unify the Makefile formats
Date: Thu, 2 Oct 2025 21:23:57 +0200 [thread overview]
Message-ID: <aN7RTSbXDA32J8D2@orbyte.nwl.cc> (raw)
In-Reply-To: <20251002013034.3176961-1-kuba@kernel.org>
Hi Jakub,
On Wed, Oct 01, 2025 at 06:30:33PM -0700, Jakub Kicinski wrote:
> We get a significant number of conflicts between net and net-next
> because of selftests Makefile changes. People tend to append new
> test cases at the end of the Makefile when there's no clear sort
> order. Sort all networking selftests Makefiles, use the following
> format:
>
> VAR_NAME := \
> entry1 \
> entry2 \
> entry3 \
> # end of VAR_NAME
A potential problem with this format is loss of context with long lists.
While I don't think it will cause incorrect conflict resolutions,
appending via '+=' may ease reviews of patches:
VAR_NAME :=
VAR_NAME += entry1
VAR_NAME += entry2
VAR_NAME += entry3
No trailing comment needed this way. Downside is '?=' can't be used.
> Some Makefiles are already pretty close to this.
Which is a point to stick with it.
[...]
> diff --git a/tools/testing/selftests/drivers/net/netdevsim/Makefile b/tools/testing/selftests/drivers/net/netdevsim/Makefile
> index 07b7c46d3311..daf51113c827 100644
> --- a/tools/testing/selftests/drivers/net/netdevsim/Makefile
> +++ b/tools/testing/selftests/drivers/net/netdevsim/Makefile
> @@ -1,6 +1,7 @@
> # SPDX-License-Identifier: GPL-2.0+ OR MIT
>
> -TEST_PROGS = devlink.sh \
> +TEST_PROGS := \
Maybe irrelevant, but assignment type changes should be avoided IMO
(there are more cases like this one).
> + devlink.sh \
> devlink_in_netns.sh \
> devlink_trap.sh \
> ethtool-coalesce.sh \
> @@ -17,5 +18,6 @@ TEST_PROGS = devlink.sh \
> psample.sh \
> tc-mq-visibility.sh \
> udp_tunnel_nic.sh \
> +# end of TEST_PROGS
>
> include ../../../lib.mk
[...]
> diff --git a/tools/testing/selftests/drivers/net/virtio_net/Makefile b/tools/testing/selftests/drivers/net/virtio_net/Makefile
> index 7ec7cd3ab2cc..868ece3fea1f 100644
> --- a/tools/testing/selftests/drivers/net/virtio_net/Makefile
> +++ b/tools/testing/selftests/drivers/net/virtio_net/Makefile
> @@ -1,15 +1,12 @@
> # SPDX-License-Identifier: GPL-2.0+ OR MIT
>
> -TEST_PROGS = basic_features.sh \
> - #
> +TEST_PROGS = basic_features.sh
>
> -TEST_FILES = \
> - virtio_net_common.sh \
> - #
> +TEST_FILES = virtio_net_common.sh
These seem intentional, so change to the syntax as proposed?
[...]
> diff --git a/tools/testing/selftests/net/lib/Makefile b/tools/testing/selftests/net/lib/Makefile
> index 88c4bc461459..ce795bc0a1af 100644
> --- a/tools/testing/selftests/net/lib/Makefile
> +++ b/tools/testing/selftests/net/lib/Makefile
> @@ -5,12 +5,16 @@ CFLAGS += -I../../../../../usr/include/ $(KHDR_INCLUDES)
> # Additional include paths needed by kselftest.h
> CFLAGS += -I../../
>
> -TEST_FILES := ../../../../../Documentation/netlink/specs
> -TEST_FILES += ../../../../net/ynl
> +TEST_FILES := \
> + ../../../../net/ynl \
> + ../../../../../Documentation/netlink/specs \
> +# end of TEST_FILES
>
> -TEST_GEN_FILES += csum
> -TEST_GEN_FILES += $(patsubst %.c,%.o,$(wildcard *.bpf.c))
> -TEST_GEN_FILES += xdp_helper
> +TEST_GEN_FILES := \
> + $(patsubst %.c,%.o,$(wildcard *.bpf.c)) \
> + csum \
> + xdp_helper \
> +# end of TEST_GEN_FILES
This one is interesting, the old code appended only, new code might
overwrite existing content.
Cheers, Phil
next prev parent reply other threads:[~2025-10-02 19:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-02 1:30 [PATCH net] selftests: net: unify the Makefile formats Jakub Kicinski
2025-10-02 10:48 ` Matthieu Baerts
2025-10-02 15:58 ` Jakub Kicinski
2025-10-02 11:21 ` Antonio Quartulli
2025-10-02 19:23 ` Phil Sutter [this message]
2025-10-02 22:03 ` Jakub Kicinski
2025-10-06 11:59 ` Petr Machata
2025-10-02 23:38 ` Allison Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aN7RTSbXDA32J8D2@orbyte.nwl.cc \
--to=phil@nwl$(echo .)cc \
--cc=allison.henderson@oracle$(echo .)com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=antonio@openvpn$(echo .)net \
--cc=coreteam@netfilter$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=eperezma@redhat$(echo .)com \
--cc=fw@strlen$(echo .)de \
--cc=horms@kernel$(echo .)org \
--cc=idosch@nvidia$(echo .)com \
--cc=jasowang@redhat$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=jv@jvosburgh$(echo .)net \
--cc=kadlec@netfilter$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=kuniyu@google$(echo .)com \
--cc=linux-kselftest@vger$(echo .)kernel.org \
--cc=martineau@kernel$(echo .)org \
--cc=matttbe@kernel$(echo .)org \
--cc=mptcp@lists$(echo .)linux.dev \
--cc=mst@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=netfilter-devel@vger$(echo .)kernel.org \
--cc=olteanv@gmail$(echo .)com \
--cc=pabeni@redhat$(echo .)com \
--cc=pablo@netfilter$(echo .)org \
--cc=petrm@nvidia$(echo .)com \
--cc=razor@blackwall$(echo .)org \
--cc=shuah@kernel$(echo .)org \
--cc=xuanzhuo@linux$(echo .)alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox