]> Cypherpunks repositories - gostls13.git/commit
runtime: skip TestLockOSThreadAvoidsStatePropagation if one can't unshare
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 20 Dec 2018 20:21:45 +0000 (20:21 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 21 Dec 2018 18:42:22 +0000 (18:42 +0000)
commit429bae715876c69853bb63db1733f580e293c916
tree8221714d4662026f340046c6c3841d4ed9b1a6a0
parent90dca98d33055b8365d9e7e40ebb4ca478daf77e
runtime: skip TestLockOSThreadAvoidsStatePropagation if one can't unshare

This change splits a testprog out of TestLockOSThreadExit and makes it
its own test. Then, this change makes the testprog exit prematurely with
a special message if unshare fails with EPERM because not all of the
builders allow the user to call the unshare syscall.

Also, do some minor cleanup on the TestLockOSThread* tests.

Fixes #29366.

Change-Id: Id8a9f6c4b16e26af92ed2916b90b0249ba226dbe
Reviewed-on: https://go-review.googlesource.com/c/155437
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/proc_test.go
src/runtime/testdata/testprog/lockosthread.go
src/runtime/testdata/testprog/syscalls.go
src/runtime/testdata/testprog/syscalls_linux.go [new file with mode: 0644]