From: Willy Tarreau <w@1wt.eu>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/nolibc: don't download GCC toolchain for clang-only architectures
Date: Mon, 2 Nov 2026 09:03:40 +0100 [thread overview]
Message-ID: <auhD3A1lacnykjNs@1wt.eu> (raw)
In-Reply-To: <20261102-nolibc-gcc-download-v1-1-17704b116c83@weissschuh.net>
Hi Thomas!
On Mon, Nov 02, 2026 at 03:19:59AM +0000, Thomas Weißschuh wrote:
> If no GCC toolchain exists the download will fail.
>
> Fixes: 4b4f56583850 ("selftests/nolibc: prepare for clang-only architectures")
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> tools/testing/selftests/nolibc/run-tests.sh | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/testing/selftests/nolibc/run-tests.sh
> index 2844fed26df1..cc91b8656b20 100755
> --- a/tools/testing/selftests/nolibc/run-tests.sh
> +++ b/tools/testing/selftests/nolibc/run-tests.sh
> @@ -144,6 +144,9 @@ need_gcc() {
> download_crosstool() {
> arch="$(crosstool_arch "$1")"
> abi="$(crosstool_abi "$1")"
> + gcc="$(need_gcc "$1")"
> +
> + [ -z "$gcc" ] && return
I know I'm picky, but this expression leaves in error in "$?" on success
(i.e. if we'd ever want to use set -e it would detect a failure when gcc
is set). A cleaner approach is to write it as an assert using "||":
[ -n "$gcc" ] || return
This one either fails '-n "$gcc"' and triggers the return or suceeds
and leaves a successful return code.
> archive_name="${hostarch}-gcc-${crosstool_version}-nolibc-${arch}-${abi}.tar.gz"
> url="https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/${hostarch}/${crosstool_version}/${archive_name}"
>
> ---
> base-commit: 228a318052869ab08f01f53b5cedfae0e930f6dd
> change-id: 20261102-nolibc-gcc-download-7c72df57961a
I'm fine with the change whatever its form anyway.
Reviewed-by: Willy Tarreau <w@1wt.eu>
thanks!
Willy
prev parent reply other threads:[~2026-11-02 8:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 3:19 Thomas Weißschuh
2026-11-02 8:03 ` Willy Tarreau [this message]
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=auhD3A1lacnykjNs@1wt.eu \
--to=w@1wt.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
/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
all inboxes | Powered by JetHome®