diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2024-11-14 19:41:35 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2024-11-14 19:41:47 +0000 |
commit | b697835ce614de2fa30ba066983d7e71c48f34ce (patch) | |
tree | 57a548acd301b9be50e1dd7c6cef3ff35c8ed3b3 | |
parent | 0b4539ee542f7011160c07bf52af7f16739f4a92 (diff) |
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
-rw-r--r-- | usr.bin/asa/tests/asa_test.sh | 1 | ||||
-rwxr-xr-x | usr.bin/cmp/tests/cmp_test2.sh | 1 | ||||
-rw-r--r-- | usr.bin/env/tests/env_test.sh | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/asa/tests/asa_test.sh b/usr.bin/asa/tests/asa_test.sh index 91515bb55d95..2b8fecb12d98 100644 --- a/usr.bin/asa/tests/asa_test.sh +++ b/usr.bin/asa/tests/asa_test.sh @@ -70,6 +70,7 @@ stdout_head() { stdout_body() { ( trap "" PIPE + sleep 1 echo " $a $b" | asa 2>stderr echo $? >result ) | true diff --git a/usr.bin/cmp/tests/cmp_test2.sh b/usr.bin/cmp/tests/cmp_test2.sh index 2ec6071851d3..bca8fc18a6b8 100755 --- a/usr.bin/cmp/tests/cmp_test2.sh +++ b/usr.bin/cmp/tests/cmp_test2.sh @@ -138,6 +138,7 @@ atf_check_stdout() { ( trap "" PIPE + sleep 1 cmp "$@" 2>stderr echo $? >result ) | true diff --git a/usr.bin/env/tests/env_test.sh b/usr.bin/env/tests/env_test.sh index 2dc8f1a4c911..3210361eb223 100644 --- a/usr.bin/env/tests/env_test.sh +++ b/usr.bin/env/tests/env_test.sh @@ -139,6 +139,7 @@ stdout_body() { ( trap "" PIPE + sleep 1 env 2>stderr echo $? >result ) | true |