Signed-off-by: Chris Evich <[email protected]>
---
client/tests/kvm/tests/boot_savevm.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/client/tests/kvm/tests/boot_savevm.py
b/client/tests/kvm/tests/boot_savevm.py
index bc3003c..950b6f8 100644
--- a/client/tests/kvm/tests/boot_savevm.py
+++ b/client/tests/kvm/tests/boot_savevm.py
@@ -24,9 +24,11 @@ def run_boot_savevm(test, params, env):
cycle_duration_threshold = float(params.get("cycle_duration_threshold"))
savevm_cycles = int(params.get("savevm_cycles"))
assert cycle_duration_threshold > 0.5
+ assert cycle_duration_threshold <= 100.0
assert savevm_cycles > 1
def _do_cycle(cycle_number):
+ logging.debug("Beginning cycle %d" % cycle_number)
time.sleep(savevm_delay)
try:
vm.monitor.cmd("stop")
@@ -61,8 +63,11 @@ def run_boot_savevm(test, params, env):
duration = end_time - start_time
assert duration > min_duration # sanity check
if cycle_number == 0: # simplify outer for loop
- max_duration = duration * (1.0 + cycle_duration_threshold)
+ max_duration = duration * (1.0 + (cycle_duration_threshold/100.0))
+ logging.debug("First cycle lasted %0.4f seconds" % duration)
else:
+ logging.debug("Cycle %d lasted %0.4f seconds, threshold is %0.4f" %
+ (cycle_number, duration, max_duration))
if duration > max_duration:
overrun = max_duration - duration;
raise error.TestFail("savevm cycle %d took %0.4f seconds
longer than %0.4f." %
--
1.7.1
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest