Commit ea0744f4 authored by Pawel Wodkowski's avatar Pawel Wodkowski Committed by Jim Harris
Browse files

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: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/431530


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 08f64b57
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -314,12 +314,12 @@ function waitforlisten() {
		fi

		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
			fi
		else
			# 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
			fi
		fi