Skip to content

Commit 6bdca82

Browse files
prattmicgopherbot
authored andcommitted
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 <[email protected]> Run-TryBot: Michael Pratt <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Michael Pratt <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 761db3e commit 6bdca82

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: misc/cgo/test/cgo_linux_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package cgotest
66

77
import (
8+
"os"
89
"runtime"
910
"testing"
1011
)
@@ -13,13 +14,19 @@ func TestSetgid(t *testing.T) {
1314
if runtime.GOOS == "android" {
1415
t.Skip("unsupported on Android")
1516
}
17+
if _, err := os.Stat("/etc/alpine-release"); err == nil {
18+
t.Skip("setgid is broken with musl libc - go.dev/issue/39857")
19+
}
1620
testSetgid(t)
1721
}
1822

1923
func TestSetgidStress(t *testing.T) {
2024
if runtime.GOOS == "android" {
2125
t.Skip("unsupported on Android")
2226
}
27+
if _, err := os.Stat("/etc/alpine-release"); err == nil {
28+
t.Skip("setgid is broken with musl libc - go.dev/issue/39857")
29+
}
2330
testSetgidStress(t)
2431
}
2532

0 commit comments

Comments
 (0)