aboutsummaryrefslogtreecommitdiff
path: root/misc/cgo
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2022-11-07 10:24:23 -0500
committerAustin Clements <austin@google.com>2022-11-07 21:15:29 +0000
commit42105eb8a5b59e715573f5299218e12be2dbb050 (patch)
treeafd1a6d143d6d887e6678fb2c0bde1fa749b18e7 /misc/cgo
parente7422b05915759a8e4a8f38382ffd4d38d4fa2ea (diff)
downloadgo-42105eb8a5b59e715573f5299218e12be2dbb050.tar.gz
go-42105eb8a5b59e715573f5299218e12be2dbb050.zip
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 <gobot@golang.org> Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'misc/cgo')
-rw-r--r--misc/cgo/test/cgo_linux_test.go13
1 files changed, 10 insertions, 3 deletions
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) }