autotest: match exact address in waitforlisten function

Current behaviour will match anything that contain address. Change this
to match whole address only.

Change-Id: I6343fb91ed624cba41adbc33d711fb48c2f167a1
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/431530
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Pawel Wodkowski 2018-10-31 15:33:43 +01:00 committed by Jim Harris
parent 08f64b5761
commit ea0744f435

View File

@ -314,12 +314,12 @@ function waitforlisten() {
fi fi
if hash ss; then if hash ss; then
if $ns_cmd ss -lx | grep -q $rpc_addr; then if $ns_cmd ss -lx | egrep -q "\s+$rpc_addr\s+"; then
ret=0 ret=0
fi fi
else else
# if system doesn't have ss, just assume it has netstat # if system doesn't have ss, just assume it has netstat
if $ns_cmd netstat -an -x | grep -iw LISTENING | grep -q $rpc_addr; then if $ns_cmd netstat -an -x | grep -iw LISTENING | egrep -q "\s+$rpc_addr\$"; then
ret=0 ret=0
fi fi
fi fi