From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH] test: term: When checking if status line is a number, hide errors Date: Wed, 14 Sep 2022 11:57:55 +0200 Message-ID: <20220914095755.2359997-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2991728960540637350==" --===============2991728960540637350== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit We use the [ "$x" -eq "$x" ] syntax to check if $x is a number. The behaviour is clearly implied by POSIX, but some shells might actually report the (intended) error, and dash floods script.log with "Illegal number" error messages. Hide them. Signed-off-by: Stefano Brivio --- test/lib/term | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lib/term b/test/lib/term index b31deac..eade2cd 100755 --- a/test/lib/term +++ b/test/lib/term @@ -232,7 +232,7 @@ pane_status() { [ ${DEMO} -eq 1 ] && return 0 __status="$(pane_parse "${1}")" - while ! [ "${__status}" -eq "${__status}" ]; do + while ! [ "${__status}" -eq "${__status}" ] 2>/dev/null; do sleep 1 pane_run "${1}" 'echo $?' pane_wait "${1}" -- 2.35.1 --===============2991728960540637350==--