]> Cypherpunks repositories - gostls13.git/commit
os/exec: reduce arbitrary sleeps in TestWaitid
authorBryan C. Mills <bcmills@google.com>
Wed, 12 Oct 2022 19:11:16 +0000 (15:11 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 13 Oct 2022 20:21:32 +0000 (20:21 +0000)
commit498ee73a4b9f48c0916bb5a2bdd22ddf6aca79c6
treeaf9654c0ecd76ed233915235130950ff6b16f43e
parent379a49c593ce3c2e8e57039e05e90aa466363092
os/exec: reduce arbitrary sleeps in TestWaitid

If we use the "pipetest" helper command instead of "sleep",
we can use its stdout pipe to determine when the process
is ready to handle a SIGSTOP, and we can additionally check
that sending a SIGCONT actually causes the process to continue.

This also allows us to remove the "sleep" helper command,
making the test file somewhat more concise.

Noticed while looking into #50138.

Change-Id: If4fdee4b1ddf28c6ed07ec3268c81b73c2600238
Reviewed-on: https://go-review.googlesource.com/c/go/+/442576
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
src/os/exec/exec_posix_test.go