[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <912e8ffa-364c-1ca2-6bb7-803902a3fd6e@intel.com>
Date: Fri, 29 Dec 2023 16:19:39 +0100
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Yujie Liu <yujie.liu@...el.com>, <netdev@...r.kernel.org>, Hangbin Liu
<liuhangbin@...il.com>
CC: 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 12/29/23 14:19, 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.
>
(snip)
>
> Link: https://lore.kernel.org/all/20231202020110.362433-1-liuhangbin@gmail.com/ [1]
> Link: https://lore.kernel.org/all/20231219094856.1740079-1-liuhangbin@gmail.com/ [2]
> Reported-by: kernel test robot <oliver.sang@...el.com>
> Signed-off-by: Yujie Liu <yujie.liu@...el.com>
I would recommend use of shellcheck in the future, it will catch this
particular bug, with following warning:
SC3046: In POSIX sh, 'source' in place of '.' is undefined.
Being specific, and requiring bash looks fine for me.
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
Powered by blists - more mailing lists