mirror of
https://github.com/opnsense/src.git
synced 2026-02-19 02:30:08 -05: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 (cherry picked from commit b697835ce614de2fa30ba066983d7e71c48f34ce)
This commit is contained in:
parent
d94ff663b6
commit
0ff2b4a85b
3 changed files with 3 additions and 0 deletions
|
|
@ -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 a new issue