From 70f73592d39c9250a17574700c5d554877d64a21 Mon Sep 17 00:00:00 2001 From: Roman Scherer Date: Sun, 7 Dec 2025 11:31:23 +0100 Subject: [PATCH] gnu: go-1.21: Disable failing tests on arm architectures. * gnu/packages/golang.scm (go-1.21)[arguments]<#:phases>{patch-source}: Add phase disabling tests on arm architectures. Change-Id: I6b07de4d6eee755502f02d6961f1a51066003721 Signed-off-by: Andreas Enge --- gnu/packages/golang.scm | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 14c31fde2939b633685e1f7562dccf2b8ddc3aeb..96348efd29bb5de6883740c57550eecb0e9ecc18 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -667,7 +667,6 @@ in the style of communicating sequential processes (@dfn{CSP}).") #~(modify-phases #$phases (delete 'skip-TestGoPathShlibGccgo-tests) (delete 'patch-source) - (delete 'disable-more-tests) (add-after 'unpack 'patch-os-tests (lambda _ (substitute* "src/os/os_test.go" @@ -717,6 +716,45 @@ in the style of communicating sequential processes (@dfn{CSP}).") (substitute* "src/cmd/cgo/internal/testsanitizers/asan_test.go" ((".*arena_fail.*") "")))) + (replace 'disable-more-tests + (lambda _ + #$@(cond + ((target-aarch64?) + ;; https://go-review.googlesource.com/c/go/+/151303 + ;; This test is known buggy on aarch64 and is enabled and + ;; disabled upstream with some regularity. + #~((substitute* "src/plugin/plugin_test.go" + (("package plugin_test") + (string-append "//go:build !(linux && arm64)\n\n" + "package plugin_test"))) + ;; collect2: fatal error: cannot find 'ld' + ;; Disable testshared by adding a build constraint that + ;; excludes linux/arm64. + (substitute* "src/cmd/cgo/internal/testshared/shared_test.go" + (("package shared_test") + (string-append "//go:build !(linux && arm64)\n\n" + "package shared_test"))) + (substitute* "src/cmd/dist/test.go" + ((".*testcshared.*") "") + ((".*testshared.*") "")))) + ((target-arm32?) + ;; https://go-review.googlesource.com/c/go/+/151303 + ;; This test is known buggy on aarch64 so we disable + ;; it on armhf also since we emulate armhf on aarch64. + #~((substitute* "src/plugin/plugin_test.go" + (("package plugin_test") + (string-append "//go:build !(linux && arm)\n\n" + "package plugin_test"))) + ;; collect2: fatal error: cannot find 'ld' + (substitute* "src/cmd/cgo/internal/testshared/shared_test.go" + (("package shared_test") + (string-append "//go:build !(linux && arm)\n\n" + "package shared_test"))) + (substitute* "src/cmd/dist/test.go" + ((".*testcshared.*") "") + ((".*testshared.*") "")))) + (else (list #t))))) + (add-after 'enable-external-linking 'enable-external-linking-1.21 (lambda _ ;; Invoke GCC to link any archives created with GCC (that is,