[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZZOkfPgs6T3ujpJo@yujie-X299>
Date: Tue, 2 Jan 2024 13:51:56 +0800
From: Yujie Liu <yujie.liu@...el.com>
To: Guillaume Nault <gnault@...hat.com>, Hangbin Liu <liuhangbin@...il.com>
CC: <netdev@...r.kernel.org>, Paolo Abeni <pabeni@...hat.com>, David Ahern
<dsahern@...nel.org>, <linux-kselftest@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <lkp@...el.com>, kernel test robot
<oliver.sang@...el.com>
Subject: Re: [PATCH v2 net-next] selftests/net: change shebang to bash to
support "source"
On Sun, Dec 31, 2023 at 01:17:11PM +0100, Guillaume Nault wrote:
> On Fri, Dec 29, 2023 at 09:19:31PM +0800, Yujie Liu wrote:
> > The patch set [1] added a general lib.sh in net selftests, and converted
> > several test scripts to source the lib.sh.
> >
> > unicast_extensions.sh (converted in [1]) and pmtu.sh (converted in [2])
> > have a /bin/sh shebang which may point to various shells in different
> > distributions, but "source" is only available in some of them. For
> > example, "source" is a built-it function in bash, but it cannot be
> > used in dash.
> >
> > Refer to other scripts that were converted together, simply change the
> > shebang to bash to fix the following issues when the default /bin/sh
> > points to other shells.
>
> Looks like it'd be simpler to just replace the "source" commands with
> "." and leave the shebang as is (unless there are other bash-specific
> constructs in these scripts of course).
>
> Generally speaking, I think we should avoid madating a specific shell,
> unless that really simplifies the test script (which is not the case
> here).
Hi Guillaume,
Thanks for the comments. As this is related with a large patch series from
Hangbin, and other scripts use "source" during the conversion, so we may
need some input from Hangbin.
Hi Hangbin,
Could you please share your comments on this? Would you like to replace
"source" with "." for these two specific scripts as Guillaume suggested,
or change the shebang from "sh" to "bash"?
Best Regards,
Yujie
Powered by blists - more mailing lists