Skip to content

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

@ChrisHines

Description

@ChrisHines

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeOS-WindowsTestingAn issue that has been verified to require only test changes, not just a test failure.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions