Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia.com>
To: Ido Schimmel <idosch@nvidia.com>
Cc: David Yang <mmyangfl@gmail.com>, <netdev@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	Andy Roulin <aroulin@nvidia.com>, Yong Wang <yongwang@nvidia.com>,
	Petr Machata <petrm@nvidia.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Amit Cohen <amcohen@nvidia.com>, Li Shuang <shuali@redhat.com>,
	Alessandro Zanni <alessandro.zanni87@gmail.com>,
	"Xin Long" <lucien.xin@gmail.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2] selftests: forwarding: Reorder arguments to obey POSIX getopt
Date: Mon, 8 Sep 2025 12:25:56 +0200	[thread overview]
Message-ID: <87y0qpw7t4.fsf@nvidia.com> (raw)
In-Reply-To: <aL59Jl5p6bEtCAxo@shredder>


Ido Schimmel <idosch@nvidia.com> writes:

> On Sun, Sep 07, 2025 at 01:04:35AM +0800, David Yang wrote:
>> Quoted from musl wiki:
>> 
>>   GNU getopt permutes argv to pull options to the front, ahead of
>>   non-option arguments. musl and the POSIX standard getopt stop
>>   processing options at the first non-option argument with no
>>   permutation.
>> 
>> Thus these scripts stop working on musl since non-option arguments do
>> not always come last. Fix it by reordering arguments.
>> 
>> Signed-off-by: David Yang <mmyangfl@gmail.com>
>
> 2. Did you try a newer version of mausezahn? Seems the issue was fixed
> 2.5 years ago:
> https://github.com/netsniff-ng/netsniff-ng/pull/237/commits/f5dce56e74b005daec72c771d27d55964aa8efd7
>
> I feel like this change is fragile since current usage is in accordance
> with mausezahn man page.

I was OK with the change, but the fact that MZ has been fixed, and yes,
it's a fix, because per man page the current usage should work... it
stopped making sense to me.

I'm still fine with the ping changes for the same reason. However.

People will introduce more ping commands in the future, and we are going
to rely on their cut'n'pasting to keep the codebase working. I don't
think we should require the selftests to be musl-clean. We have enough
trouble getting people write selftests, I don't think contributors
should spread themselves thin with stuff like posix compliance and musl
support in selftests. IMHO if it works under bash / glibc, it's golden.

All of which is to say: ack, but you may have to send more patches like
this in the future :)

      parent reply	other threads:[~2025-09-08 10:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-06 17:04 [PATCH net-next v2] selftests: forwarding: Reorder arguments to obey POSIX getopt David Yang
2025-09-08  6:52 ` Ido Schimmel
2025-09-08  9:39   ` Yangfl
2025-09-08 10:34     ` Ido Schimmel
2025-09-08 10:25   ` Petr Machata [this message]

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=87y0qpw7t4.fsf@nvidia.com \
    --to=petrm@nvidia.com \
    --cc=alessandro.zanni87@gmail.com \
    --cc=amcohen@nvidia.com \
    --cc=aroulin@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=mmyangfl@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=shuah@kernel.org \
    --cc=shuali@redhat.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiyou.wangcong@gmail.com \
    --cc=yongwang@nvidia.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