diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2020-12-28 00:12:06 -0800 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2020-12-28 00:12:16 -0800 |
| commit | 07569dac4e7e03715b4171a46c220cd5d4d6295b (patch) | |
| tree | 3baa59f2a7d8147d7b39b519ef9d12c2178a4b8e /src/syscall | |
| parent | 76136be02701aab8a4b546956f1847d28dbe0ba2 (diff) | |
| parent | 1d78139128d6d839d7da0aeb10b3e51b6c7c0749 (diff) | |
| download | go-07569dac4e7e03715b4171a46c220cd5d4d6295b.tar.xz | |
[dev.regabi] all: merge master (1d78139) into dev.regabi
Merge List:
+ 2020-12-26 1d78139128 runtime/cgo: fix Android build with NDK 22
+ 2020-12-25 2018b68a65 net/mail: don't use MDT in test
+ 2020-12-23 b116404444 runtime: shift timeHistogram buckets and allow negative durations
+ 2020-12-23 8db7e2fecd runtime: fix allocs-by-size and frees-by-size buckets
+ 2020-12-23 fb96f07e1a runtime: fix nStackRoots comment about stack roots
+ 2020-12-23 d1502b3c72 lib/time, time/tzdata: update tzdata to 2020e
+ 2020-12-23 30c99cbb7a cmd/go: add the Retract field to 'go help mod edit' definition of the GoMod struct
+ 2020-12-23 49d0b239cb doc: fix a typo in contribute.html
+ 2020-12-23 98a73030b0 cmd/go: in 'go get', promote named implicit dependencies to explicit
+ 2020-12-23 fd6ba1c8a2 os/signal: fix a deadlock with syscall.AllThreadsSyscall() use
+ 2020-12-23 b0b0d98283 runtime: linux iscgo support for not blocking nptl signals
+ 2020-12-22 223331fc0c cmd/go/internal/modload: add hint for missing implicit dependency
Change-Id: I76d79f17c546cab03fab1facc36cc3f834d9d126
Diffstat (limited to 'src/syscall')
| -rw-r--r-- | src/syscall/syscall_linux_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/syscall/syscall_linux_test.go b/src/syscall/syscall_linux_test.go index 153d0efef1..adeb7c9ebb 100644 --- a/src/syscall/syscall_linux_test.go +++ b/src/syscall/syscall_linux_test.go @@ -597,6 +597,14 @@ func compareStatus(filter, expect string) error { return nil } +// killAThread locks the goroutine to an OS thread and exits; this +// causes an OS thread to terminate. +func killAThread(c <-chan struct{}) { + runtime.LockOSThread() + <-c + return +} + // TestSetuidEtc performs tests on all of the wrapped system calls // that mirror to the 9 glibc syscalls with POSIX semantics. The test // here is considered authoritative and should compile and run @@ -647,6 +655,11 @@ func TestSetuidEtc(t *testing.T) { } for i, v := range vs { + // Generate some thread churn as we execute the tests. + c := make(chan struct{}) + go killAThread(c) + close(c) + if err := v.fn(); err != nil { t.Errorf("[%d] %q failed: %v", i, v.call, err) continue |
