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

cmd/go: tests are skipped when GOOS/GOARCH do not match the installed toolchain #53936

bcmills opened this issue Jul 18, 2022 · 1 comment
GoCommand NeedsFix


Copy link

bcmills commented Jul 18, 2022

The test binary for cmd/go currently skips itself completely when its GOOS or GOARCH doesn't match the GOOS or GOARCH of the installed toolchain:;l=196-214;drc=c2edb2c841149f2e56963071065d52247e24092a

Unfortunately, that makes it much more difficult than necessary to diagnose test failures that are specific to a GOOS or GOARCH, especially when those tests can be run natively (such as for 386 on an amd64 host) or under emulation (such as for tests that happen to mostly-work under QEMU).

The problem is especially acute now that we have fuzzing: 386 builds lack fuzzer instrumentation (so tests on that architecture behave substantially differently than on amd64), and many tests of the fuzzer are implemented as cmd/go script tests so that they can check the behavior of go test -fuzz=. end-to-end.

I have a pending fix for this in CL 356611.

@bcmills bcmills self-assigned this Jul 18, 2022
@bcmills bcmills added Testing GoCommand NeedsFix labels Jul 18, 2022
@bcmills bcmills added this to the Go1.20 milestone Jul 18, 2022
Copy link

gopherbot commented Jul 18, 2022

Change mentions this issue: cmd/go: run tests when cmd/go is cross-compiled

@bcmills bcmills removed the Testing label Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
GoCommand NeedsFix
None yet

No branches or pull requests

2 participants