Skip to contentSkip to conversation

KVM test: timedrift: open load sessions before taking initial time

PATCH New Michael Goldish 1 participant 1 message Mar 24, 2010 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM test: timedrift: open load sessions before taking initial time

---
 client/tests/kvm/tests/timedrift.py |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
client/tests/kvm/tests/timedrift.py +10 -8
index 194f09c..9cb7489 100644
@@ -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)
 
Signature · 1 line
1.5.4.1