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 <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442262
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
Darek Stojaczyk 2019-01-28 07:57:55 +01:00 committed by Jim Harris
parent 9042f3468b
commit 6903c407a5

View File

@ -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