From: Michael Goldish <[email protected]> Sleep at the end of the iteration, after checking the md5sum for the first time. This enables us to pass the barrier very quickly in some cases. (Currently we sleep first and check the md5sum later.)
Signed-off-by: Michael Goldish <[email protected]> diff --git a/client/tests/kvm_runtest_2/kvm_guest_wizard.py b/client/tests/kvm_runtest_2/kvm_guest_wizard.py index afe6b02..c89e12e 100644 --- a/client/tests/kvm_runtest_2/kvm_guest_wizard.py +++ b/client/tests/kvm_runtest_2/kvm_guest_wizard.py @@ -51,8 +51,6 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, output_dir, failure_message = None - iteration = 0 - # Main loop while True: # Check for timeouts @@ -63,13 +61,6 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, output_dir, failure_message = "guest is stuck" break - # Sleep for a while - if iteration == 0 and sleep_duration == 1.0: - time.sleep(0.5) - else: - time.sleep(sleep_duration) - iteration += 1 - # Make sure vm is alive if not vm.is_alive(): failure_message = "VM is dead" @@ -108,6 +99,9 @@ def barrier_2(vm, words, fail_if_stuck_for, stuck_detection_history, output_dir, # Limit queue length to stuck_detection_history prev_whole_image_md5sums = prev_whole_image_md5sums[:stuck_detection_history] + # Sleep for a while + time.sleep(sleep_duration) + # Failure message = "Barrier failed at step %s after %.2f seconds (%s)" % \ (current_step_num, time.time() - start_time, failure_message) -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
