mirror of
https://github.com/golang/go
synced 2024-11-22 15:04:52 -07:00
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>
This commit is contained in:
parent
761db3e7f0
commit
6bdca82030
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user