summaryrefslogtreecommitdiffstats
path: root/misc/cgo/test/cgo_linux_test.go
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:23:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:23:18 +0000
commit43a123c1ae6613b3efeed291fa552ecd909d3acf (patch)
treefd92518b7024bc74031f78a1cf9e454b65e73665 /misc/cgo/test/cgo_linux_test.go
parentInitial commit. (diff)
downloadgolang-1.20-upstream.tar.xz
golang-1.20-upstream.zip
Adding upstream version 1.20.14.upstream/1.20.14upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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) }