mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 20:12:44 +00:00
Improve reliability of stdout tests.
If the test runner is under heavy load, the command we are testing may succeed in printing to stdout before the dummy receiver has terminated. Add a short delay to reduce the likelihood of this happening. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47572
This commit is contained in:
parent
0b4539ee54
commit
b697835ce6
@ -70,6 +70,7 @@ stdout_head() {
|
||||
stdout_body() {
|
||||
(
|
||||
trap "" PIPE
|
||||
sleep 1
|
||||
echo " $a $b" | asa 2>stderr
|
||||
echo $? >result
|
||||
) | true
|
||||
|
@ -138,6 +138,7 @@ atf_check_stdout()
|
||||
{
|
||||
(
|
||||
trap "" PIPE
|
||||
sleep 1
|
||||
cmp "$@" 2>stderr
|
||||
echo $? >result
|
||||
) | true
|
||||
|
1
usr.bin/env/tests/env_test.sh
vendored
1
usr.bin/env/tests/env_test.sh
vendored
@ -139,6 +139,7 @@ stdout_body()
|
||||
{
|
||||
(
|
||||
trap "" PIPE
|
||||
sleep 1
|
||||
env 2>stderr
|
||||
echo $? >result
|
||||
) | true
|
||||
|
Loading…
Reference in New Issue
Block a user