diff options
author | Michael Pratt <mpratt@google.com> | 2022-08-19 17:38:00 -0400 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2022-08-22 14:48:53 +0000 |
commit | 6bdca82030779e3b9032324e68a3feacb85bc9bc (patch) | |
tree | 14d6e82d43a15d7daef680f91c6f44a29ffc76c7 /misc/cgo | |
parent | 761db3e7f07ec358323589eab72b153339036086 (diff) | |
download | go-6bdca82030779e3b9032324e68a3feacb85bc9bc.tar.gz go-6bdca82030779e3b9032324e68a3feacb85bc9bc.zip |
misc/cgo/test: disable setgid tests with musl
We don't have a good musl detection mechanism, so we detect Alpine (the
most common user of musl) instead.
For #39857.
For #19938.
Change-Id: I2fa39248682aed75884476374fe2212be4427347
Reviewed-on: https://go-review.googlesource.com/c/go/+/425001
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'misc/cgo')
-rw-r--r-- | misc/cgo/test/cgo_linux_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/misc/cgo/test/cgo_linux_test.go b/misc/cgo/test/cgo_linux_test.go index 7c4628c493..f7c07582a4 100644 --- a/misc/cgo/test/cgo_linux_test.go +++ b/misc/cgo/test/cgo_linux_test.go @@ -5,6 +5,7 @@ package cgotest import ( + "os" "runtime" "testing" ) @@ -13,6 +14,9 @@ func TestSetgid(t *testing.T) { if runtime.GOOS == "android" { t.Skip("unsupported on Android") } + if _, err := os.Stat("/etc/alpine-release"); err == nil { + t.Skip("setgid is broken with musl libc - go.dev/issue/39857") + } testSetgid(t) } @@ -20,6 +24,9 @@ func TestSetgidStress(t *testing.T) { if runtime.GOOS == "android" { t.Skip("unsupported on Android") } + if _, err := os.Stat("/etc/alpine-release"); err == nil { + t.Skip("setgid is broken with musl libc - go.dev/issue/39857") + } testSetgidStress(t) } |