diff --git a/misc/cgo/test/cgo_linux_test.go b/misc/cgo/test/cgo_linux_test.go index 7c4628c49330c0..f7c07582a4d432 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) }