From: Miroslav Lichvar Date: Wed, 13 Jan 2021 15:59:17 +0000 (+0100) Subject: test: fix port selection to disable grep output X-Git-Tag: 4.1-pre1~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=624b76e86ea7f0f110f10f11299ffe91100af282;p=thirdparty%2Fchrony.git test: fix port selection to disable grep output --- diff --git a/test/system/test.common b/test/system/test.common index 1e488195..4e5fa024 100644 --- a/test/system/test.common +++ b/test/system/test.common @@ -180,7 +180,7 @@ get_free_port() { while true; do port=$((RANDOM % 10000 + 10000)) - netstat -aln | grep '^\(tcp\|udp\).*[:.]'"$port " && continue + netstat -aln | grep -q '^\(tcp\|udp\).*[:.]'"$port " && continue break done