]> Cypherpunks.ru repositories - gostls13.git/commitdiff
misc/cgo/test: skip Test9400 on Alpine
authorAustin Clements <austin@google.com>
Mon, 7 Nov 2022 15:24:23 +0000 (10:24 -0500)
committerAustin Clements <austin@google.com>
Mon, 7 Nov 2022 21:15:29 +0000 (21:15 +0000)
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>
misc/cgo/test/cgo_linux_test.go

index 2b6fe558d58ebe1cd230fcf10fad306820fc093f..3a1cf98c2a49594986b1ff5c5d727a30194020f6 100644 (file)
@@ -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) }