summaryrefslogtreecommitdiff
path: root/libgo/go/syscall/syscall_linux_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2018-09-26 15:17:30 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-09-26 15:17:30 +0000
commitdd554b787d0280566e891dba9e19dd718e68d42a (patch)
tree57f5e1807370604954ab0338603cc0503a68178b /libgo/go/syscall/syscall_linux_test.go
parent6693898454936b07c7e003de872149b4201e940c (diff)
syscall: don't assume we have a GETEUID system call
On Alpha GNU/Linux there is no geteuid system call, there is only getresuid. The raw geteuid system call is only used for testing, so just skip the test if it's not available. Reviewed-on: https://go-review.googlesource.com/137655 From-SVN: r264647
Diffstat (limited to 'libgo/go/syscall/syscall_linux_test.go')
-rw-r--r--libgo/go/syscall/syscall_linux_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/go/syscall/syscall_linux_test.go b/libgo/go/syscall/syscall_linux_test.go
index 99de6ebaf2f..77a822d97e7 100644
--- a/libgo/go/syscall/syscall_linux_test.go
+++ b/libgo/go/syscall/syscall_linux_test.go
@@ -302,6 +302,10 @@ func TestSyscallNoError(t *testing.T) {
t.Skip("skipping root only test")
}
+ if syscall.Sys_GETEUID == 0 {
+ t.Skip("skipping because there is no geteuid system call")
+ }
+
// Copy the test binary to a location that a non-root user can read/execute
// after we drop privileges
tempDir, err := ioutil.TempDir("", "TestSyscallNoError")