From 07c73e67c5f37cee5e6ab6c82faba09f4579fb99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Wed, 22 Nov 2017 18:54:01 +0100 Subject: [PATCH] Fix the vmnames in time_manage test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This test relies on outdated first vm name, while there is "main_vm" parameter pointing to the correct name. Also it stores all created vmnames, but instead of relying on this variable it tries to create the name in later loops. Ideally one would store the actual vm objects, but let's use this as a hotfix. Signed-off-by: Lukáš Doktor --- qemu/tests/time_manage.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qemu/tests/time_manage.py b/qemu/tests/time_manage.py index b82e19de..a6e04f65 100644 --- a/qemu/tests/time_manage.py +++ b/qemu/tests/time_manage.py @@ -54,7 +54,7 @@ def run(test, params, env): curr_time = [] timedrift = [] totaldrift = [] - vmnames = ["virt-tests-vm1"] + vmnames = [params["main_vm"]] # Run some load on the host logging.info("Starting load on host.") @@ -86,8 +86,7 @@ def run(test, params, env): while itr <= int(params["max_itrs"]): for vmid, se in enumerate(sessions): # Get the respective vm object - vmname = "virt-tests-vm%d" % (vmid + 1) - vm = env.get_vm(vmname) + vm = env.get_vm(vmnames[vmid]) # Run current iteration logging.info( "Rebooting:vm%d iteration %d " % ((vmid + 1), itr)) -- GitLab