From: Austin Clements Date: Mon, 7 Nov 2022 15:24:23 +0000 (-0500) Subject: misc/cgo/test: skip Test9400 on Alpine X-Git-Tag: go1.20rc1~394 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=42105eb8a5b59e715573f5299218e12be2dbb050;p=gostls13.git misc/cgo/test: skip Test9400 on Alpine Alpine has a known issue where setgid clobbers the Go stack (#39857). misc/cgo/test skips other tests that use setgid on Alpine, but not this one. It's not clear to me why this test *used to* pass, but when I refactored misc/cgo/test in CL 447355 it started failing. Disable this test on Alpine, like the other setgid tests. Change-Id: I2e646ef55e2201a4f0b377319d719a011ec847f0 Reviewed-on: https://go-review.googlesource.com/c/go/+/448355 TryBot-Result: Gopher Robot Run-TryBot: Austin Clements Reviewed-by: Cherry Mui --- diff --git a/misc/cgo/test/cgo_linux_test.go b/misc/cgo/test/cgo_linux_test.go index 2b6fe558d5..3a1cf98c2a 100644 --- a/misc/cgo/test/cgo_linux_test.go +++ b/misc/cgo/test/cgo_linux_test.go @@ -30,7 +30,14 @@ func TestSetgidStress(t *testing.T) { testSetgidStress(t) } -func Test1435(t *testing.T) { test1435(t) } -func Test6997(t *testing.T) { test6997(t) } -func Test9400(t *testing.T) { test9400(t) } +func Test1435(t *testing.T) { test1435(t) } +func Test6997(t *testing.T) { test6997(t) } + +func Test9400(t *testing.T) { + if _, err := os.Stat("/etc/alpine-release"); err == nil { + t.Skip("setgid is broken with musl libc - go.dev/issue/39857") + } + test9400(t) +} + func TestBuildID(t *testing.T) { testBuildID(t) }