From 6903c407a5e9ddc73069545af8bc9a0e254a1e19 Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Mon, 28 Jan 2019 07:57:55 +0100 Subject: [PATCH] test/common: suppress waitforlisten output on BSD We currently use: `./rpc.py 1>&2 2>/dev/null` And apparently our stdout redirection gets treated as a python argument, which is not what we intended. This caused waitforlisten function to print some unnecessary messages. To fix, we could either wrap python with extra brackets `$(./rpc.py) 1>&2 2>/dev/null` or use &>/dev/null. We go with the latter. Fixes #616 Change-Id: I49d2380392435447b7b93259055c1d02c4b9c157 Signed-off-by: Darek Stojaczyk Reviewed-on: https://review.gerrithub.io/c/442262 Tested-by: SPDK CI Jenkins Reviewed-by: Pawel Wodkowski Reviewed-by: Ben Walker Reviewed-by: Karol Latecki Reviewed-by: Jim Harris Chandler-Test-Pool: SPDK Automated Test System --- test/common/autotest_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 28760ff01..63befe252 100644 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -370,7 +370,7 @@ function waitforlisten() { # On FreeBSD netstat output 'State' column is missing for Unix sockets. # To workaround this issue just try to use provided address. # XXX: This solution could be used for other distros. - if $rootdir/scripts/rpc.py -t 1 -s "$rpc_addr" get_rpc_methods 1>&2 2>/dev/null; then + if $rootdir/scripts/rpc.py -t 1 -s "$rpc_addr" get_rpc_methods &>/dev/null; then break fi fi