[PATCH] KVM test: Disable HPET on windows timedrift tests

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

 



By default, HPET is enabled on qemu and no time drift
mitigation is being made for it. So, add -no-hpet
if qemu supports it, during windows timedrift tests.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx>
---
 client/tests/kvm/kvm_vm.py             |    9 +++++++++
 client/tests/kvm/tests_base.cfg.sample |    2 ++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index ff69aed..4856ebe 100755
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -292,6 +292,12 @@ class VM:
             return (" -chardev file,id=testlog,path=%s"
                     " -device testdev,chardev=testlog" % filename)
 
+        def add_no_hpet(help):
+            if has_option(help, "no-hpet"):
+                return " -no-hpet"
+            else:
+                return ""
+
         # End of command line option wrappers
 
         if name is None: name = self.name
@@ -429,6 +435,9 @@ class VM:
         if params.get("testdev") == "yes":
             qemu_cmd += add_testdev(help, self.get_testlog_filename())
 
+        if params.get("disable_hpet") == "yes":
+            qemu_cmd += add_no_hpet(help)
+
         # If the PCI assignment step went OK, add each one of the PCI assigned
         # devices to the qemu command line.
         if self.pci_assignable:
diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
index c678898..7f59bfc 100644
--- a/client/tests/kvm/tests_base.cfg.sample
+++ b/client/tests/kvm/tests_base.cfg.sample
@@ -1047,6 +1047,8 @@ variants:
         stress_boot:
             alive_test_cmd = systeminfo
         timedrift:
+            # Timedrift compensation on Windows with hpet does not happen
+            disable_hpet = yes
             extra_params += " -rtc-td-hack"
             time_command = "echo TIME: %date% %time%"
             time_filter_re = "(?<=TIME: \w\w\w ).{19}(?=\.\d\d)"
-- 
1.7.0.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