[KVM-AUTOTEST PATCH] KVM test: timedrift: open load sessions before taking initial time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Michael Goldish <mgoldish@xxxxxxxxxx>
---
 client/tests/kvm/tests/timedrift.py |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/client/tests/kvm/tests/timedrift.py b/client/tests/kvm/tests/timedrift.py
index 194f09c..9cb7489 100644
--- a/client/tests/kvm/tests/timedrift.py
+++ b/client/tests/kvm/tests/timedrift.py
@@ -82,15 +82,8 @@ def run_timedrift(test, params, env):
         # Set the VM's CPU affinity
         prev_affinity = set_cpu_affinity(vm.get_pid(), cpu_mask)
 
-        # Get time before load
-        # (ht stands for host time, gt stands for guest time)
-        (ht0, gt0) = kvm_test_utils.get_time(session,
-                                             time_command,
-                                             time_filter_re,
-                                             time_format)
-
         try:
-            # Run some load on the guest
+            # Open shell sessions with the guest
             logging.info("Starting load on guest...")
             for i in range(guest_load_instances):
                 load_session = vm.remote_login()
@@ -99,6 +92,15 @@ def run_timedrift(test, params, env):
                 load_session.set_output_prefix("(guest load %d) " % i)
                 load_session.set_output_func(logging.debug)
                 guest_load_sessions.append(load_session)
+
+            # Get time before load
+            # (ht stands for host time, gt stands for guest time)
+            (ht0, gt0) = kvm_test_utils.get_time(session,
+                                                 time_command,
+                                                 time_filter_re,
+                                                 time_format)
+
+            # Run some load on the guest
             for load_session in guest_load_sessions:
                 load_session.sendline(guest_load_command)
 
-- 
1.5.4.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux