Skip to contentSkip to conversation

KVM test: Add subtest clock_getres

PATCH New Lucas Meneghel Rodrigues 1 participant 1 message Nov 11, 2010 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM test: Add subtest clock_getres

In order to track a regression that happens using kvmclock in guests, add test of the clock_getres() syscall, to see what is the clocksource resolution reported by the guest. This, combined with variants that set different -cpu params for the qemu command line, will give us the desired outcome.

---
 client/tests/kvm/deps/test_clock_getres/Makefile   |   11 ++++
 .../kvm/deps/test_clock_getres/test_clock_getres.c |   58 ++++++++++++++++++++
 client/tests/kvm/tests/clock_getres.py             |   44 +++++++++++++++
 client/tests/kvm/tests_base.cfg.sample             |    3 +
 4 files changed, 116 insertions(+), 0 deletions(-)
 create mode 100644 client/tests/kvm/deps/test_clock_getres/Makefile
 create mode 100644 client/tests/kvm/deps/test_clock_getres/test_clock_getres.c
 create mode 100644 client/tests/kvm/tests/clock_getres.py
client/tests/kvm/deps/test_clock_getres/Makefile new file +11 -0
new file mode 100644
index 0000000..b4f73c7
@@ -0,0 +1,11 @@
+CC = gcc
+PROG = test_clock_getres
+SRC = test_clock_getres.c
+LIBS = -lrt
+
+all: $(PROG)
+
+$(PROG):
+	$(CC) $(LIBS) -o $(PROG) $(SRC)
+clean:
+	rm -f $(PROG)
client/tests/kvm/deps/test_clock_getres/test_clock_getres.c new file +58 -0

58 lines not on this page · raw message

client/tests/kvm/tests/clock_getres.py new file +44 -0

44 lines not on this page · raw message

client/tests/kvm/tests_base.cfg.sample +3 -0
index 40ecf4a..7e36841 100644
@@ -663,6 +663,9 @@ variants:
                 image_name_snapshot1 = sn1
                 image_name_snapshot2 = sn2
 
+    - clock_getres: install setup unattended_install.cdrom
+        type = clock_getres
+
     # system_powerdown, system_reset and shutdown *must* be the last ones
     # defined (in this order), since the effect of such tests can leave
     # the VM on a bad state.
Signature · 1 line
1.7.2.3