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: tests fail to build when CGO_ENABLED=0 on Windows #22680

Closed
ChrisHines opened this issue Nov 12, 2017 · 6 comments
Closed

runtime: tests fail to build when CGO_ENABLED=0 on Windows #22680

ChrisHines opened this issue Nov 12, 2017 · 6 comments
Labels
FrozenDueToAge OS-Windows Testing An issue that has been verified to require only test changes, not just a test failure.

Comments

@ChrisHines
Copy link
Contributor

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

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Chris\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\Chris\Go
set GORACE=
set GOROOT=F:\GoTip\go
set GOTMPDIR=
set GOTOOLDIR=F:\GoTip\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
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

What did you do?

F:\GoTip\go\src> set
... snip ...
CGO_ENABLED=0
... snip ...
GOPATH=C:\Users\Chris\Go
GOROOT=F:\GoTip\go
GOROOT_BOOTSTRAP=C:\Go
... snip ...

F:\GoTip\go\src> git rev-parse HEAD
d005736213d7c9518ea1e05c63826783839dbed6

F:\GoTip\go\src> all.bat
... snip ...
ok      mime/multipart  0.851s
ok      mime/quotedprintable    0.773s
# runtime_test
runtime\syscall_windows_test.go:541:2: undefined: testWindowsStackMemory
ok      net     7.893s
ok      net/http        3.584s
... snip ...
FAIL    runtime [build failed]
... snip ...
2017/11/12 11:13:30 Failed: exit status 2

What did you expect to see?

All tests pass.

What did you see instead?

Build failure in test code.

@alexbrainman I believe this problem was introduced in this commit: 923299a.

@mvdan mvdan added OS-Windows Testing An issue that has been verified to require only test changes, not just a test failure. labels Nov 12, 2017
@gopherbot
Copy link

Change https://golang.org/cl/77430 mentions this issue: runtime: make TestWindowsStackMemory build even with CGO_ENABLED=0 set

@alexbrainman
Copy link
Member

@alexbrainman I believe this problem was introduced in this commit: 923299a.

My fault. Does https://go-review.googlesource.com/#/c/go/+/77430 fixes your problem?

@bradfitz I am surprised we have no CGO_ENABLED=0 windows builder. We have 3 amd64 builders, should we convert one into CGO_ENABLED=0 builder?

Thank you

Alex

@ChrisHines
Copy link
Contributor Author

@alexbrainman Yes, that worked. I downloaded your CL and ran all.bat. The result:

ALL TESTS PASSED

@alexbrainman
Copy link
Member

ALL TESTS PASSED

Cool, thank you.

Alex

@bradfitz
Copy link
Contributor

Filed #22705 for the builder omission.

@alexbrainman
Copy link
Member

Filed #22705 for the builder omission.

Thank you.

Alex

@golang golang locked and limited conversation to collaborators Nov 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge OS-Windows 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

5 participants