[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <47d80432-3838-4fc7-898c-9a9154080113@leemhuis.info>
Date: Mon, 13 Oct 2025 08:52:54 +0200
From: Thorsten Leemhuis <linux@...mhuis.info>
To: Kevin Locke <kevin@...inlocke.name>, Jonathan Corbet <corbet@....net>,
Randy Dunlap <rdunlap@...radead.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tools: fix == bashism in kernel-chktaint
On 10/11/25 23:04, Kevin Locke wrote:
> When /bin/sh is a shell other than bash, invoking kernel-chktaint with
> at least one argument may produce error messages such as the following
> (produced by [dash] with argument 1024):
>
> ./kernel-chktaint: 22: [: 1024x: unexpected operator
> ./kernel-chktaint: 22: [: 1024x: unexpected operator
>
> This occurs because the == operator is not specified for [test in POSIX]
> and is not supported by all shells, as noted by shellcheck [SC3014].
>
> To fix the issue and avoid the error message, replace == with =.
Many thx for this!
Acked-by: Thorsten Leemhuis <linux@...mhuis.info>
BTW, I doubt that anyone cares, but I wonder if these are really necessary:
> [dash]: https://git.kernel.org/pub/scm/utils/dash/dash.git
> [test in POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/test.html
> [SC3014]: https://www.shellcheck.net/wiki/SC3014
And maybe they should be proper link tags (with references at the end),
as mentioned in
https://www.kernel.org/doc/html/latest/process/5.Posting.html (search
for "optional-other-stuff"). But overall I guess those links are not
really worth it.
Ciao, Thorsten
Powered by blists - more mailing lists