diff options
author | Austin Clements <austin@google.com> | 2022-11-07 10:24:23 -0500 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2022-11-07 21:15:29 +0000 |
commit | 42105eb8a5b59e715573f5299218e12be2dbb050 (patch) | |
tree | afd1a6d143d6d887e6678fb2c0bde1fa749b18e7 /misc | |
parent | e7422b05915759a8e4a8f38382ffd4d38d4fa2ea (diff) | |
download | go-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')
-rw-r--r-- | misc/cgo/test/cgo_linux_test.go | 13 |
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) } |