mirror of
https://github.com/golang/go
synced 2024-11-26 17:16:54 -07:00
all: disable tests that fail on Alpine
These changes are enough to pass all.bash using the disabled linux-amd64-alpine builder via debugnewvm. For #19938. For #39857. Change-Id: I7d160612259c77764b70d429ad94f0864689cdce Reviewed-on: https://go-review.googlesource.com/c/go/+/419995 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
f2a9f3e2e0
commit
1b7e71e8ae
@ -10,6 +10,7 @@ package cgotest
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
@ -145,6 +146,11 @@ func test1435(t *testing.T) {
|
|||||||
if syscall.Getuid() != 0 {
|
if syscall.Getuid() != 0 {
|
||||||
t.Skip("skipping root only test")
|
t.Skip("skipping root only test")
|
||||||
}
|
}
|
||||||
|
if runtime.GOOS == "linux" {
|
||||||
|
if _, err := os.Stat("/etc/alpine-release"); err == nil {
|
||||||
|
t.Skip("skipping failing test on alpine - go.dev/issue/19938")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Launch some threads in C.
|
// Launch some threads in C.
|
||||||
const cts = 5
|
const cts = 5
|
||||||
|
@ -34,6 +34,10 @@ func TestCrossPackageTests(t *testing.T) {
|
|||||||
case "arm64":
|
case "arm64":
|
||||||
t.Skip("Can't exec cmd/go subprocess on iOS.")
|
t.Skip("Can't exec cmd/go subprocess on iOS.")
|
||||||
}
|
}
|
||||||
|
case "linux":
|
||||||
|
if _, err := os.Stat("/etc/alpine-release"); err == nil {
|
||||||
|
t.Skip("skipping failing test on alpine - go.dev/issue/39857")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GOPATH, err := os.MkdirTemp("", "cgotest")
|
GOPATH, err := os.MkdirTemp("", "cgotest")
|
||||||
|
@ -46,6 +46,13 @@ func TestMain(m *testing.M) {
|
|||||||
fmt.Printf("SKIP - short mode and $GO_BUILDER_NAME not set\n")
|
fmt.Printf("SKIP - short mode and $GO_BUILDER_NAME not set\n")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
if runtime.GOOS == "linux" {
|
||||||
|
if _, err := os.Stat("/etc/alpine-release"); err == nil {
|
||||||
|
fmt.Printf("SKIP - skipping failing test on alpine - go.dev/issue/19938\n")
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
log.SetFlags(log.Lshortfile)
|
log.SetFlags(log.Lshortfile)
|
||||||
os.Exit(testMain(m))
|
os.Exit(testMain(m))
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,12 @@ func testMain(m *testing.M) int {
|
|||||||
fmt.Printf("SKIP - short mode and $GO_BUILDER_NAME not set\n")
|
fmt.Printf("SKIP - short mode and $GO_BUILDER_NAME not set\n")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
if runtime.GOOS == "linux" {
|
||||||
|
if _, err := os.Stat("/etc/alpine-release"); err == nil {
|
||||||
|
fmt.Printf("SKIP - skipping failing test on alpine - go.dev/issue/19938\n")
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
GOOS = goEnv("GOOS")
|
GOOS = goEnv("GOOS")
|
||||||
GOARCH = goEnv("GOARCH")
|
GOARCH = goEnv("GOARCH")
|
||||||
|
@ -516,6 +516,9 @@ func TestSetuidEtc(t *testing.T) {
|
|||||||
if syscall.Getuid() != 0 {
|
if syscall.Getuid() != 0 {
|
||||||
t.Skip("skipping root only test")
|
t.Skip("skipping root only test")
|
||||||
}
|
}
|
||||||
|
if _, err := os.Stat("/etc/alpine-release"); err == nil {
|
||||||
|
t.Skip("skipping glibc test on alpine - go.dev/issue/19938")
|
||||||
|
}
|
||||||
vs := []struct {
|
vs := []struct {
|
||||||
call string
|
call string
|
||||||
fn func() error
|
fn func() error
|
||||||
|
Loading…
Reference in New Issue
Block a user