Skip to content

Commit

Permalink
Merge pull request #4214 from qcheng-redhat/vsock_failures
Browse files Browse the repository at this point in the history
Fix vsock tests random timing issue
  • Loading branch information
XueqiangWei authored Nov 25, 2024
2 parents eeb5c78 + 935f8e6 commit 627f764
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions qemu/tests/migration_with_vsock.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def input_character_vsock():

vsock_test_tool = params["vsock_test_tool"]
vm = env.get_vm(params["main_vm"])
vm.verify_alive()
session = vm.wait_for_login()
if vsock_test_tool == "nc_vsock":
tool_bin = compile_nc_vsock(test, vm, session)
Expand Down
1 change: 1 addition & 0 deletions qemu/tests/vsock_hotplug.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def run(test, params, env):

linux_modules.load_module("vhost_vsock")
vm = env.get_vm(params["main_vm"])
vm.verify_alive()
session = vm.wait_for_login()
guest_cid = utils_vsock.get_guest_cid(3)
vsock_id = "hotplugged_vsock"
Expand Down
1 change: 1 addition & 0 deletions qemu/tests/vsock_negative_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def run(test, params, env):
"""

vm = env.get_vm(params["main_vm"])
vm.verify_alive()
session = vm.wait_for_login()
vsock_test_tool = params["vsock_test_tool"]
if vsock_test_tool == "nc_vsock":
Expand Down
2 changes: 2 additions & 0 deletions qemu/tests/vsock_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def vsock_listen(tool_bin, port, session):
session.read_nonblocking(0, timeout=10)
LOG_JOB.info("Listening to the vsock port from guest: %s", lstn_cmd)
session.sendline(lstn_cmd)
time.sleep(5)


def check_received_data(test, session, pattern):
Expand Down Expand Up @@ -207,6 +208,7 @@ def clean(tmp_file):

vm = env.get_vm(params["main_vm"])
tmp_file = "/tmp/vsock_file_%s" % utils_misc.generate_random_string(6)
vm.verify_alive()
session = vm.wait_for_login()
vsock_dev = params["vsocks"].split()[0]
guest_cid = vm.devices.get(vsock_dev).get_param("guest-cid")
Expand Down

0 comments on commit 627f764

Please sign in to comment.