summaryrefslogtreecommitdiffstats
path: root/misc/cgo/test/cgo_linux_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/test/cgo_linux_test.go')
-rw-r--r--misc/cgo/test/cgo_linux_test.go43
1 files changed, 43 insertions, 0 deletions
diff --git a/misc/cgo/test/cgo_linux_test.go b/misc/cgo/test/cgo_linux_test.go
new file mode 100644
index 0000000..3a1cf98
--- /dev/null
+++ b/misc/cgo/test/cgo_linux_test.go
@@ -0,0 +1,43 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cgotest
+
+import (
+ "os"
+ "runtime"
+ "testing"
+)
+
+func TestSetgid(t *testing.T) {
+ if runtime.GOOS == "android" {
+ t.Skip("unsupported on Android")
+ }
+ if _, err := os.Stat("/etc/alpine-release"); err == nil {
+ t.Skip("setgid is broken with musl libc - go.dev/issue/39857")
+ }
+ testSetgid(t)
+}
+
+func TestSetgidStress(t *testing.T) {
+ if runtime.GOOS == "android" {
+ t.Skip("unsupported on Android")
+ }
+ if _, err := os.Stat("/etc/alpine-release"); err == nil {
+ t.Skip("setgid is broken with musl libc - go.dev/issue/39857")
+ }
+ testSetgidStress(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) }