aboutgitcodebugslistschat
path: root/test/lib/term
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-09-14 11:52:14 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-09-14 20:49:08 +0200
commitb323e5f43999a5ab38196502bb97bcd695538906 (patch)
treefc8796b01e9fead8251034053e53b4e9a02d6e2a /test/lib/term
parent9fc476af6ebcef88e128fb681631c3a39243f4f2 (diff)
downloadpasst-b323e5f43999a5ab38196502bb97bcd695538906.tar
passt-b323e5f43999a5ab38196502bb97bcd695538906.tar.gz
passt-b323e5f43999a5ab38196502bb97bcd695538906.tar.bz2
passt-b323e5f43999a5ab38196502bb97bcd695538906.tar.lz
passt-b323e5f43999a5ab38196502bb97bcd695538906.tar.xz
passt-b323e5f43999a5ab38196502bb97bcd695538906.tar.zst
passt-b323e5f43999a5ab38196502bb97bcd695538906.zip
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 <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'test/lib/term')
-rwxr-xr-xtest/lib/term2
1 files changed, 1 insertions, 1 deletions
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}"