From: Kirill Isakov Date: Sat, 14 Aug 2021 18:58:55 +0000 (+0600) Subject: Improve failure detection in the test suite. X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=4203f7c88d5f17dc10075d371ca97aa6359ba71b;p=tinc Improve failure detection in the test suite. --- diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml index 26829ccf..a52803b2 100644 --- a/.builds/freebsd.yml +++ b/.builds/freebsd.yml @@ -1,6 +1,7 @@ image: freebsd/13.x packages: + - coreutils - autotools - openssl - lzo2 diff --git a/test/compression.test b/test/compression.test index 7c69c2ca..f0952a4f 100755 --- a/test/compression.test +++ b/test/compression.test @@ -106,13 +106,13 @@ for level in $levels; do wait_script foo hosts/bar-up wait_script bar hosts/foo-up - ip netns exec foo \ - socat -u TCP4-LISTEN:$recv_port_foo,reuseaddr OPEN:"$tmp_file",creat & - - ip netns exec bar \ - socat -u OPEN:"$ref_file" TCP4:$ip_foo:$recv_port_foo,retry=30 & + try_limit_time 60 sh </dev/null; then - if is_busybox; then - # busybox does not support --foreground - try_limit_time() { - time=$1 - shift - timeout "$time" "$@" - } - else - # BSD and GNU timeout do not require special handling - try_limit_time() { - time=$1 - shift - timeout --foreground "$time" "$@" - } - fi + try_limit_time() { + time=$1 + shift + timeout "$time" "$@" + } else try_limit_time() { echo >&2 "timeout was not found, running without time limits!"