Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: some tests fails on Windows with CGO_ENABLED=0 #51695

Closed
henryas opened this issue Mar 16, 2022 · 5 comments
Closed

runtime: some tests fails on Windows with CGO_ENABLED=0 #51695

henryas opened this issue Mar 16, 2022 · 5 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@henryas
Copy link

henryas commented Mar 16, 2022

What version of Go are you using (go version)?

go version go1.18 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

OS: Windows 11

set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\henry\AppData\Local\go-build
set GOENV=C:\Users\henry\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\henry\go\pkg\mod
set GONOPROXY=github.com/henryas
set GONOSUMDB=github.com/henryas
set GOOS=windows
set GOPATH=C:\Users\henry\go
set GOPRIVATE=github.com/henryas
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Users\henry\Programs\Go\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Users\henry\Programs\Go\go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.18
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fmessage-length=0 -fdebug-prefix-map=C:\Users\henry\AppData\Local\Temp\go-build230480319=/tmp/go-build -gno-record-gcc-switches

What did you do?

I tried to build go1.18 from source, by running all.bat. CGO_ENABLED is set to 0 (false). Antivirus is turned off.

What did you expect to see?

It should build and pass the tests.

What did you see instead?

It builds fine but fails the tests. Here are the failed tests:

--- FAIL: TestVectoredHandlerDontCrashOnLibrary (0.24s)
signal_windows_test.go:37: failed to build go library: exit status 1
go: no Go source files
--- FAIL: TestLibraryCtrlHandler (0.06s)
signal_windows_test.go:161: failed to build go library: exit status 1
go: no Go source files
FAIL
FAIL runtime 83.530s

@ianlancetaylor ianlancetaylor changed the title Windows: Go1.18 build from source test failure runtime: some tests fails on Windows with CGO_ENABLED=0 Mar 16, 2022
@ianlancetaylor ianlancetaylor added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 16, 2022
@ianlancetaylor ianlancetaylor added this to the Go1.19 milestone Mar 16, 2022
@ianlancetaylor ianlancetaylor self-assigned this Mar 16, 2022
@ianlancetaylor
Copy link
Contributor

@gopherbot Please open backport issues

These tests will fail if run with CGO_ENABLED=0. The fix is trivial and test-only. We may as well backport it.

@gopherbot
Copy link

Backport issue(s) opened: #51696 (for 1.17), #51697 (for 1.18).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@gopherbot
Copy link

Change https://go.dev/cl/392916 mentions this issue: runtime: call testenv.MustHaveCGO in a couple of tests

@bcmills bcmills added the Testing An issue that has been verified to require only test changes, not just a test failure. label Mar 17, 2022
@gopherbot
Copy link

Change https://go.dev/cl/393698 mentions this issue: [release-branch.go1.17] runtime: call testenv.MustHaveCGO in a couple of tests

@gopherbot
Copy link

Change https://go.dev/cl/393699 mentions this issue: [release-branch.go1.18] runtime: call testenv.MustHaveCGO in a couple of tests

gopherbot pushed a commit that referenced this issue Mar 28, 2022
… of tests

For #51695
Fixes #51697

Change-Id: Icfe9d26ecc28a7db9040d50d4661cf9e8245471e
Reviewed-on: https://go-review.googlesource.com/c/go/+/392916
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
(cherry picked from commit 2d32594)
Reviewed-on: https://go-review.googlesource.com/c/go/+/393699
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
gopherbot pushed a commit that referenced this issue Mar 28, 2022
… of tests

For #51695
Fixes #51696

Change-Id: Icfe9d26ecc28a7db9040d50d4661cf9e8245471e
Reviewed-on: https://go-review.googlesource.com/c/go/+/392916
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
(cherry picked from commit 2d32594)
Reviewed-on: https://go-review.googlesource.com/c/go/+/393698
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
@golang golang locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

4 participants