Skip to content

Commit

Permalink
all: disable tests that fail on Alpine
Browse files Browse the repository at this point in the history
These changes are enough to pass all.bash using the
disabled linux-amd64-alpine builder via debugnewvm.

For golang#19938.
For golang#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>
  • Loading branch information
rsc authored and jproberts committed Aug 10, 2022
1 parent 53f8e9b commit d5e7ab5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions misc/cgo/test/issue1435.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package cgotest
import (
"fmt"
"os"
"runtime"
"sort"
"strings"
"syscall"
Expand Down Expand Up @@ -145,6 +146,11 @@ func test1435(t *testing.T) {
if syscall.Getuid() != 0 {
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.
const cts = 5
Expand Down
4 changes: 4 additions & 0 deletions misc/cgo/test/pkg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ func TestCrossPackageTests(t *testing.T) {
case "arm64":
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")
Expand Down
7 changes: 7 additions & 0 deletions misc/cgo/testcarchive/carchive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ func TestMain(m *testing.M) {
fmt.Printf("SKIP - short mode and $GO_BUILDER_NAME not set\n")
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)
os.Exit(testMain(m))
}
Expand Down
6 changes: 6 additions & 0 deletions misc/cgo/testcshared/cshared_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ func testMain(m *testing.M) int {
fmt.Printf("SKIP - short mode and $GO_BUILDER_NAME not set\n")
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")
GOARCH = goEnv("GOARCH")
Expand Down
3 changes: 3 additions & 0 deletions src/syscall/syscall_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,9 @@ func TestSetuidEtc(t *testing.T) {
if syscall.Getuid() != 0 {
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 {
call string
fn func() error
Expand Down

0 comments on commit d5e7ab5

Please sign in to comment.