netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: Phil Sutter <phil@nwl.cc>
Cc: Jakub Kicinski <kuba@kernel.org>, <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: Mon, 6 Oct 2025 13:59:50 +0200	[thread overview]
Message-ID: <87jz18cje2.fsf@nvidia.com> (raw)
In-Reply-To: <aN7RTSbXDA32J8D2@orbyte.nwl.cc>


Phil Sutter <phil@nwl.cc> writes:

>> 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).

AFAIK, = vs := differ in when the assigned-to variable is evaluated.
Variables assigned-to with := are evaluated at the time of definition, =
at the time of use. This can make difference if the variable definition
contains other expansions.

I do not think this patch touches variables where this distinction
matters, as most of it is fixed strings. There's an occasional patsubst
etc., but those ought to lead to the same results regardless of
expansion time. So IMHO we can freely use either.

In theory someone could use something like `TEST_PROGS = $(OTHER_PROGS)
foo.sh bar.sh' and then override OTHER_PROGS based on the target, or
reassign it at a later point. Personally I'd much much rather see an
explicit if-else prior to TEST_PROGS, and then an immediate expansion. I
think that makes things easier to reason about and debug. So my
preference would actually be to use := as the default.

  parent reply	other threads:[~2025-10-06 12:21 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
2025-10-02 22:03   ` Jakub Kicinski
2025-10-06 11:59   ` Petr Machata [this message]
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=87jz18cje2.fsf@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=allison.henderson@oracle.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=antonio@openvpn.net \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eperezma@redhat.com \
    --cc=fw@strlen.de \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=jasowang@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=jv@jvosburgh.net \
    --cc=kadlec@netfilter.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    --cc=razor@blackwall.org \
    --cc=shuah@kernel.org \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).