* [PATCH] selftests/nolibc: don't download GCC toolchain for clang-only architectures
@ 2026-11-02 3:19 Thomas Weißschuh
2026-11-02 8:03 ` Willy Tarreau
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Weißschuh @ 2026-11-02 3:19 UTC (permalink / raw)
To: Willy Tarreau; +Cc: linux-kernel, Thomas Weißschuh
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
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
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests/nolibc: don't download GCC toolchain for clang-only architectures
2026-11-02 3:19 [PATCH] selftests/nolibc: don't download GCC toolchain for clang-only architectures Thomas Weißschuh
@ 2026-11-02 8:03 ` Willy Tarreau
0 siblings, 0 replies; 2+ messages in thread
From: Willy Tarreau @ 2026-11-02 8:03 UTC (permalink / raw)
To: Thomas Weißschuh; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-02 8:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 3:19 [PATCH] selftests/nolibc: don't download GCC toolchain for clang-only architectures Thomas Weißschuh
2026-11-02 8:03 ` Willy Tarreau
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®