]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: execute TestSpuriousWakeupsNeverHangSemasleep in parallel
authorBryan C. Mills <bcmills@google.com>
Mon, 22 Nov 2021 19:37:41 +0000 (14:37 -0500)
committerBryan C. Mills <bcmills@google.com>
Mon, 22 Nov 2021 20:34:40 +0000 (20:34 +0000)
This test spends most of its time sleeping and waiting on a subprocess
to sleep. It seems like a prime candidate to run in parallel, although
we may need to relax its hard-coded 2s timeout on the sleep(1)
subprocess.

For #48770

Change-Id: I4e839739fe82446615f9894c1904c87e5f3cf386
Reviewed-on: https://go-review.googlesource.com/c/go/+/366256
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>

src/runtime/semasleep_test.go

index bc73140a2ad4ce07ca146d695e882d72e0a5c480..0057b0729ebbfc06d6a1a6fc619cf06a8f3c28e4 100644 (file)
@@ -21,6 +21,7 @@ func TestSpuriousWakeupsNeverHangSemasleep(t *testing.T) {
        if *flagQuick {
                t.Skip("-quick")
        }
+       t.Parallel() // Waits for a program to sleep for 1s.
 
        exe, err := buildTestProg(t, "testprog")
        if err != nil {