[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87y0qpw7t4.fsf@nvidia.com>
Date: Mon, 8 Sep 2025 12:25:56 +0200
From: Petr Machata <petrm@...dia.com>
To: Ido Schimmel <idosch@...dia.com>
CC: David Yang <mmyangfl@...il.com>, <netdev@...r.kernel.org>, "David S.
Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub
Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman
<horms@...nel.org>, Shuah Khan <shuah@...nel.org>, Nikolay Aleksandrov
<razor@...ckwall.org>, Andy Roulin <aroulin@...dia.com>, Yong Wang
<yongwang@...dia.com>, Petr Machata <petrm@...dia.com>, Vladimir Oltean
<vladimir.oltean@....com>, Amit Cohen <amcohen@...dia.com>, Li Shuang
<shuali@...hat.com>, Alessandro Zanni <alessandro.zanni87@...il.com>, "Xin
Long" <lucien.xin@...il.com>, Cong Wang <xiyou.wangcong@...il.com>,
<linux-kselftest@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v2] selftests: forwarding: Reorder arguments to
obey POSIX getopt
Ido Schimmel <idosch@...dia.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@...il.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 :)
Powered by blists - more mailing lists