Skip to content

Commit a782472

Browse files
author
Bryan C. Mills
committed
cmd/go: delete flaky TestQEMUUserMode
If QEMU user-mode is actually a supported configuration, then per http://golang.org/wiki/PortingPolicy it needs to have a builder running tests for all packages, not just a simple “hello world” program. Updates #1508 Updates #13024 Fixes #35457 Change-Id: Ib6122b06ad1d265550a0e92131506266495893cc Reviewed-on: https://go-review.googlesource.com/c/go/+/206137 Run-TryBot: Bryan C. Mills <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent ae4534e commit a782472

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

src/cmd/go/go_test.go

-46
Original file line numberDiff line numberDiff line change
@@ -5185,52 +5185,6 @@ func TestUpxCompression(t *testing.T) {
51855185
}
51865186
}
51875187

5188-
// Test that Go binaries can be run under QEMU in user-emulation mode
5189-
// (See issue #13024).
5190-
func TestQEMUUserMode(t *testing.T) {
5191-
if testing.Short() && testenv.Builder() == "" {
5192-
t.Skipf("skipping in -short mode on non-builder")
5193-
}
5194-
5195-
testArchs := []struct {
5196-
g, qemu string
5197-
}{
5198-
{"arm", "arm"},
5199-
{"arm64", "aarch64"},
5200-
}
5201-
5202-
tg := testgo(t)
5203-
defer tg.cleanup()
5204-
tg.tempFile("main.go", `package main; import "fmt"; func main() { fmt.Print("hello qemu-user") }`)
5205-
tg.parallel()
5206-
src, obj := tg.path("main.go"), tg.path("main")
5207-
5208-
for _, arch := range testArchs {
5209-
arch := arch
5210-
t.Run(arch.g, func(t *testing.T) {
5211-
qemu := "qemu-" + arch.qemu
5212-
testenv.MustHaveExecPath(t, qemu)
5213-
5214-
out, err := exec.Command(qemu, "--version").CombinedOutput()
5215-
if err != nil {
5216-
t.Fatalf("%s --version failed: %v", qemu, err)
5217-
}
5218-
5219-
tg.setenv("GOARCH", arch.g)
5220-
tg.run("build", "-o", obj, src)
5221-
5222-
out, err = exec.Command(qemu, obj).CombinedOutput()
5223-
if err != nil {
5224-
t.Logf("%s output:\n%s\n", qemu, out)
5225-
t.Fatalf("%s failed with %v", qemu, err)
5226-
}
5227-
if want := "hello qemu-user"; string(out) != want {
5228-
t.Errorf("bad output from %s:\ngot %s; want %s", qemu, out, want)
5229-
}
5230-
})
5231-
}
5232-
}
5233-
52345188
func TestCacheListStale(t *testing.T) {
52355189
tooSlow(t)
52365190
if strings.Contains(os.Getenv("GODEBUG"), "gocacheverify") {

0 commit comments

Comments
 (0)