]> Cypherpunks.ru repositories - gostls13.git/commitdiff
all: skip unsupported tests on AIX
authorClément Chigot <clement.chigot@atos.net>
Fri, 2 Nov 2018 09:09:30 +0000 (10:09 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 2 Nov 2018 16:12:08 +0000 (16:12 +0000)
This commit skips tests which aren't yet supported on AIX.

nosplit.go is disabled because stackGuardMultiplier is increased for
syscalls.

Change-Id: Ib5ff9a4539c7646bcb6caee159f105ff8a160ad7
Reviewed-on: https://go-review.googlesource.com/c/146939
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>

src/cmd/internal/obj/x86/issue19518_test.go
src/cmd/internal/obj/x86/obj6_test.go
src/debug/elf/file_test.go
src/runtime/crash_test.go
src/runtime/pprof/pprof_test.go
src/runtime/runtime-gdb_test.go
test/nosplit.go

index 2fe227ee3f2396b440c39eb1d3c278c81ae6f9af..fa2beb8aad39f88a58c5d34a0d3553b2f771529c 100644 (file)
@@ -11,7 +11,6 @@ import (
        "os"
        "os/exec"
        "path/filepath"
-       "strings"
        "testing"
 )
 
@@ -68,13 +67,8 @@ func objdumpOutput(t *testing.T) []byte {
                testenv.GoToolPath(t), "build", "-o",
                filepath.Join(tmpdir, "output"))
 
-       var env []string
-       for _, v := range os.Environ() {
-               if !strings.HasPrefix(v, "GOARCH=") {
-                       env = append(env, v)
-               }
-       }
-       cmd.Env = append(env, "GOARCH=amd64")
+       cmd.Env = append(os.Environ(), "GOARCH=amd64", "GOOS=linux")
+
        out, err := cmd.CombinedOutput()
        if err != nil {
                t.Fatalf("error %s output %s", err, out)
index 2f6296ce8bb4a96e247f7a768b6c9950010bbc05..c5399744f2d18761e4a03af33018d6b715051fca 100644 (file)
@@ -99,13 +99,7 @@ func asmOutput(t *testing.T, s string) []byte {
                testenv.GoToolPath(t), "tool", "asm", "-S", "-dynlink",
                "-o", filepath.Join(tmpdir, "output.6"), tmpfile.Name())
 
-       var env []string
-       for _, v := range os.Environ() {
-               if !strings.HasPrefix(v, "GOARCH=") {
-                       env = append(env, v)
-               }
-       }
-       cmd.Env = append(env, "GOARCH=amd64")
+       cmd.Env = append(os.Environ(), "GOARCH=amd64", "GOOS=linux")
        asmout, err := cmd.CombinedOutput()
        if err != nil {
                t.Fatalf("error %s output %s", err, asmout)
index 11d8992b714686c737f95e4d6fdbee9776eefcac..d7c1e9f800d8622c17b44cce3b54473718909f5b 100644 (file)
@@ -784,7 +784,7 @@ func TestCompressedSection(t *testing.T) {
 func TestNoSectionOverlaps(t *testing.T) {
        // Ensure cmd/link outputs sections without overlaps.
        switch runtime.GOOS {
-       case "android", "darwin", "js", "nacl", "plan9", "windows":
+       case "aix", "android", "darwin", "js", "nacl", "plan9", "windows":
                t.Skipf("cmd/link doesn't produce ELF binaries on %s", runtime.GOOS)
        }
        _ = net.ResolveIPAddr // force dynamic linkage
index 6835cacb3f782753e94040d8bca4428ce3413982..6fba4dd91a1daab76788ccfa309ebc05e9f621f1 100644 (file)
@@ -623,6 +623,9 @@ func TestBadTraceback(t *testing.T) {
 }
 
 func TestTimePprof(t *testing.T) {
+       if runtime.GOOS == "aix" {
+               t.Skip("pprof not yet available on AIX (see golang.org/issue/28555)")
+       }
        fn := runTestProg(t, "testprog", "TimeProf")
        fn = strings.TrimSpace(fn)
        defer os.Remove(fn)
index 593924183f67e8bd7357197f110efac638270a60..a1089c8fdf90d50467e1ba3e6f884e8b8cbfca21 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build !nacl,!js
+// +build !aix,!nacl,!js
 
 package pprof
 
index 7672e45b0346585192760ebb877792e8794913f2..5d358137085eb98675ab74fb003ab0479239798d 100644 (file)
@@ -36,6 +36,8 @@ func checkGdbEnvironment(t *testing.T) {
                if runtime.GOARCH == "mips" {
                        t.Skip("skipping gdb tests on linux/mips; see https://golang.org/issue/25939")
                }
+       case "aix":
+               t.Skip("gdb does not work on AIX; see golang.org/issue/28558")
        }
        if final := os.Getenv("GOROOT_FINAL"); final != "" && runtime.GOROOT() != final {
                t.Skip("gdb test can fail with GOROOT_FINAL pending")
index 1855c010ae3a18b8e2085ba71766a6ca3ed0dd52..734f456cc990c8c3fb456931044a7e2fabc29068 100644 (file)
@@ -1,4 +1,4 @@
-// +build !nacl,!js,!gcflags_noopt
+// +build !nacl,!js,!aix,!gcflags_noopt
 // run
 
 // Copyright 2014 The Go Authors. All rights reserved.