diff --git a/virttest/utils_libvirt/libvirt_network.py b/virttest/utils_libvirt/libvirt_network.py index c98c24fcb2..2f80917871 100644 --- a/virttest/utils_libvirt/libvirt_network.py +++ b/virttest/utils_libvirt/libvirt_network.py @@ -127,7 +127,7 @@ def _check_socket(): cmdRes = remote.run_remote_cmd(cmd, params) if expected_network_conn_num: - pat_str = r".*%s:%s.*ESTABLISHED.*%s.*" % ( + pat_str = r".*%s.*%s.*ESTABLISHED.*%s.*" % ( server_ip, port_to_check, service_to_check, @@ -144,7 +144,7 @@ def _check_socket(): return None if port_to_check != "4915": - pat_str = r".*%s:%s.*ESTABLISHED.*%s.*" % ( + pat_str = r".*%s.*%s.*ESTABLISHED.*%s.*" % ( server_ip, port_to_check, service_to_check,