]> Cypherpunks repositories - gostls13.git/commit
runtime: regression test for semasleep indefinite hang
authorEmmanuel T Odeke <emmanuel@orijtech.com>
Wed, 12 Sep 2018 18:22:42 +0000 (12:22 -0600)
committerEmmanuel Odeke <emm.odeke@gmail.com>
Thu, 13 Sep 2018 03:07:59 +0000 (03:07 +0000)
commit1b9374450bbf3372f18915deb58ed11a072eef4a
tree1e3d13b1fc0e4572c1625fb9077e740dc25c498f
parentde28555c0b33fcaa02779d55ea9289135280ae9f
runtime: regression test for semasleep indefinite hang

A regression test in which: for a program that invokes semasleep,
we send non-terminal signals such as SIGIO.
Since the signal wakes up pthread_cond_timedwait_relative_np,
after CL 133655, we should only re-spin for the amount of
time left, instead of re-spinning with the original duration
which would cause an indefinite spin.

Updates #27520

Change-Id: I744a6d04cf8923bc4e13649446aff5e42b7de5d8
Reviewed-on: https://go-review.googlesource.com/135015
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/semasleep_test.go [new file with mode: 0644]