]> Cypherpunks repositories - gostls13.git/commitdiff
os/exec: skip unsupported test on Android
authorElias Naur <mail@eliasnaur.com>
Sun, 7 Apr 2019 17:53:30 +0000 (19:53 +0200)
committerElias Naur <mail@eliasnaur.com>
Sun, 7 Apr 2019 18:34:41 +0000 (18:34 +0000)
The underlying system call tested by TestCredentialNoSetGroups
is blocked on Android.

Discovered while running all.bash from an Android device; the syscall
is only blocked in an app context.

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

src/os/exec/exec_posix_test.go

index 46799cdbdb67a943c6864e1c6ead41caef10af95..d4d67ac9336825ac2588dea9aec47cb870483051 100644 (file)
@@ -8,6 +8,7 @@ package exec_test
 
 import (
        "os/user"
+       "runtime"
        "strconv"
        "syscall"
        "testing"
@@ -15,6 +16,10 @@ import (
 )
 
 func TestCredentialNoSetGroups(t *testing.T) {
+       if runtime.GOOS == "android" {
+               t.Skip("unsupported on Android")
+       }
+
        u, err := user.Current()
        if err != nil {
                t.Fatalf("error getting current user: %v", err)