From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: <shuah@kernel.org>, Po-Hsu Lin <po-hsu.lin@canonical.com>,
<linux-kselftest@vger.kernel.org>, <kuba@kernel.org>
Cc: <davem@davemloft.net>, <edumazet@google.com>,
<netdev@vger.kernel.org>, <pabeni@redhat.com>, <horms@kernel.org>,
<edoardo.canepa@canonical.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] selftests: net: use BASH for bareudp testing
Date: Tue, 28 Oct 2025 14:58:09 +0100 [thread overview]
Message-ID: <010a2743-b732-4e4f-b877-fed340ab3b8f@intel.com> (raw)
In-Reply-To: <20251027095710.2036108-2-po-hsu.lin@canonical.com>
On 10/27/25 10:57, Po-Hsu Lin wrote:
> In bareudp.sh, this script uses /bin/sh and it will load another lib.sh
> BASH script at the very beginning.
>
> But on some operating systems like Ubuntu, /bin/sh is actually pointed to
> DASH, thus it will try to run BASH commands with DASH and consequently
> leads to syntax issues:
> # ./bareudp.sh: 4: ./lib.sh: Bad substitution
> # ./bareudp.sh: 5: ./lib.sh: source: not found
> # ./bareudp.sh: 24: ./lib.sh: Syntax error: "(" unexpected
>
> Fix this by explicitly using BASH for bareudp.sh. This fixes test
> execution failures on systems where /bin/sh is not BASH.
>
> Reported-by: Edoardo Canepa <edoardo.canepa@canonical.com>
> Link: https://bugs.launchpad.net/bugs/2129812
> Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
> ---
> tools/testing/selftests/net/bareudp.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/bareudp.sh b/tools/testing/selftests/net/bareudp.sh
> index 4046131e7888..d9e5b967f815 100755
> --- a/tools/testing/selftests/net/bareudp.sh
> +++ b/tools/testing/selftests/net/bareudp.sh
> @@ -1,4 +1,4 @@
> -#!/bin/sh
> +#!/bin/bash
> # SPDX-License-Identifier: GPL-2.0
>
> # Test various bareudp tunnel configurations.
this is of course a correct fix,
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
what about extending checkpatch to avoid such issues in the future?
I remember at least a few such cases fixes, and I don't pay that much
attention
next prev parent reply other threads:[~2025-10-28 13:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 9:57 [PATCH 0/1] selftests: net: use BASH for bareudp testing Po-Hsu Lin
2025-10-27 9:57 ` [PATCH 1/1] " Po-Hsu Lin
2025-10-28 13:58 ` Przemek Kitszel [this message]
2025-10-30 1:00 ` [PATCH 0/1] " 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=010a2743-b732-4e4f-b877-fed340ab3b8f@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=davem@davemloft.net \
--cc=edoardo.canepa@canonical.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=po-hsu.lin@canonical.com \
--cc=shuah@kernel.org \
/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