public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Yujie Liu <yujie.liu@intel.com>, <netdev@vger.kernel.org>,
	Hangbin Liu <liuhangbin@gmail.com>
Cc: Paolo Abeni <pabeni@redhat.com>, David Ahern <dsahern@kernel.org>,
	<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<lkp@intel.com>, kernel test robot <oliver.sang@intel.com>
Subject: Re: [PATCH v2 net-next] selftests/net: change shebang to bash to support "source"
Date: Fri, 29 Dec 2023 16:19:39 +0100	[thread overview]
Message-ID: <912e8ffa-364c-1ca2-6bb7-803902a3fd6e@intel.com> (raw)
In-Reply-To: <20231229131931.3961150-1-yujie.liu@intel.com>

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@intel.com>
> Signed-off-by: Yujie Liu <yujie.liu@intel.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@intel.com>

  reply	other threads:[~2023-12-29 15:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-29 13:19 [PATCH v2 net-next] selftests/net: change shebang to bash to support "source" Yujie Liu
2023-12-29 15:19 ` Przemek Kitszel [this message]
2023-12-30  6:20 ` Hangbin Liu
2023-12-30  6:30 ` Muhammad Usama Anjum
2023-12-31 12:17 ` Guillaume Nault
2024-01-02  5:51   ` Yujie Liu
2024-01-02  6:51     ` Hangbin Liu
2024-01-02  8:20   ` Yujie Liu
2024-01-02 11:32     ` Guillaume Nault
2023-12-31 16:27 ` Guillaume Nault
2024-01-04  1:10 ` patchwork-bot+netdevbpf

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=912e8ffa-364c-1ca2-6bb7-803902a3fd6e@intel.com \
    --to=przemyslaw.kitszel@intel.com \
    --cc=dsahern@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oliver.sang@intel.com \
    --cc=pabeni@redhat.com \
    --cc=yujie.liu@intel.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