]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/test: skip Setgid test on Android
authorElias Naur <mail@eliasnaur.com>
Sun, 7 Apr 2019 22:16:40 +0000 (00:16 +0200)
committerElias Naur <mail@eliasnaur.com>
Mon, 8 Apr 2019 05:56:14 +0000 (05:56 +0000)
The setgid syscall is blocked on Android in app context.

Change-Id: I1ff25840bbc25d472ad4e29eb1b51f183a6c4392
Reviewed-on: https://go-review.googlesource.com/c/go/+/170949
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
misc/cgo/test/cgo_linux_test.go

index c2e96b5387d45e39a70b02f623d320a7a0d1440a..7b56e11a27df3b7d9717c1849d09565706c9d61a 100644 (file)
@@ -4,8 +4,16 @@
 
 package cgotest
 
-import "testing"
+import (
+       "runtime"
+       "testing"
+)
 
-func TestSetgid(t *testing.T)  { testSetgid(t) }
+func TestSetgid(t *testing.T) {
+       if runtime.GOOS == "android" {
+               t.Skip("unsupported on Android")
+       }
+       testSetgid(t)
+}
 func Test6997(t *testing.T)    { test6997(t) }
 func TestBuildID(t *testing.T) { testBuildID(t) }