Commit 85525c56 authored by Clément Chigot's avatar Clément Chigot Committed by Brad Fitzpatrick

all: skip unsupported tests on AIX

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/146939Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
parent 3a0d6091
...@@ -11,7 +11,6 @@ import ( ...@@ -11,7 +11,6 @@ import (
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"strings"
"testing" "testing"
) )
...@@ -68,13 +67,8 @@ func objdumpOutput(t *testing.T) []byte { ...@@ -68,13 +67,8 @@ func objdumpOutput(t *testing.T) []byte {
testenv.GoToolPath(t), "build", "-o", testenv.GoToolPath(t), "build", "-o",
filepath.Join(tmpdir, "output")) filepath.Join(tmpdir, "output"))
var env []string cmd.Env = append(os.Environ(), "GOARCH=amd64", "GOOS=linux")
for _, v := range os.Environ() {
if !strings.HasPrefix(v, "GOARCH=") {
env = append(env, v)
}
}
cmd.Env = append(env, "GOARCH=amd64")
out, err := cmd.CombinedOutput() out, err := cmd.CombinedOutput()
if err != nil { if err != nil {
t.Fatalf("error %s output %s", err, out) t.Fatalf("error %s output %s", err, out)
......
...@@ -99,13 +99,7 @@ func asmOutput(t *testing.T, s string) []byte { ...@@ -99,13 +99,7 @@ func asmOutput(t *testing.T, s string) []byte {
testenv.GoToolPath(t), "tool", "asm", "-S", "-dynlink", testenv.GoToolPath(t), "tool", "asm", "-S", "-dynlink",
"-o", filepath.Join(tmpdir, "output.6"), tmpfile.Name()) "-o", filepath.Join(tmpdir, "output.6"), tmpfile.Name())
var env []string cmd.Env = append(os.Environ(), "GOARCH=amd64", "GOOS=linux")
for _, v := range os.Environ() {
if !strings.HasPrefix(v, "GOARCH=") {
env = append(env, v)
}
}
cmd.Env = append(env, "GOARCH=amd64")
asmout, err := cmd.CombinedOutput() asmout, err := cmd.CombinedOutput()
if err != nil { if err != nil {
t.Fatalf("error %s output %s", err, asmout) t.Fatalf("error %s output %s", err, asmout)
......
...@@ -784,7 +784,7 @@ func TestCompressedSection(t *testing.T) { ...@@ -784,7 +784,7 @@ func TestCompressedSection(t *testing.T) {
func TestNoSectionOverlaps(t *testing.T) { func TestNoSectionOverlaps(t *testing.T) {
// Ensure cmd/link outputs sections without overlaps. // Ensure cmd/link outputs sections without overlaps.
switch runtime.GOOS { 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) t.Skipf("cmd/link doesn't produce ELF binaries on %s", runtime.GOOS)
} }
_ = net.ResolveIPAddr // force dynamic linkage _ = net.ResolveIPAddr // force dynamic linkage
......
...@@ -623,6 +623,9 @@ func TestBadTraceback(t *testing.T) { ...@@ -623,6 +623,9 @@ func TestBadTraceback(t *testing.T) {
} }
func TestTimePprof(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 := runTestProg(t, "testprog", "TimeProf")
fn = strings.TrimSpace(fn) fn = strings.TrimSpace(fn)
defer os.Remove(fn) defer os.Remove(fn)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build !nacl,!js // +build !aix,!nacl,!js
package pprof package pprof
......
...@@ -36,6 +36,8 @@ func checkGdbEnvironment(t *testing.T) { ...@@ -36,6 +36,8 @@ func checkGdbEnvironment(t *testing.T) {
if runtime.GOARCH == "mips" { if runtime.GOARCH == "mips" {
t.Skip("skipping gdb tests on linux/mips; see https://golang.org/issue/25939") 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 { if final := os.Getenv("GOROOT_FINAL"); final != "" && runtime.GOROOT() != final {
t.Skip("gdb test can fail with GOROOT_FINAL pending") t.Skip("gdb test can fail with GOROOT_FINAL pending")
......
// +build !nacl,!js,!gcflags_noopt // +build !nacl,!js,!aix,!gcflags_noopt
// run // run
// Copyright 2014 The Go Authors. All rights reserved. // Copyright 2014 The Go Authors. All rights reserved.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment