From b323e5f43999a5ab38196502bb97bcd695538906 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 14 Sep 2022 11:52:14 +0200 Subject: test: term: When checking if status line is a number, hide errors 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 Reviewed-by: David Gibson --- 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}" -- cgit v1.2.3