[PATCH] qemu-kvm tests: Create make target for install tests

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

 



In order to make it convenient to run unit tests on
KVM autotest, add rules to install the flat files to
$(PREFIX)/share/qemu/tests.

Also, add a unittests.cfg file, a simple .ini file
that contains unittest definitions. The unittest
definitions work like this:

[unittest_name]
file = foo.flat # Name of the flat file to be used
smp = 2 # Number of processors the VM will use during this test
extra_params = -cpu qemu64,+x2apic # Additional parameters used

For rpms, other patches defining qemu-kvm-tests.rpm will follow.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx>
---
 kvm/test/Makefile              |    6 ++++-
 kvm/test/config-x86-common.mak |    2 +
 kvm/test/x86/unittests.cfg     |   52 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 1 deletions(-)
 create mode 100644 kvm/test/x86/unittests.cfg

diff --git a/kvm/test/Makefile b/kvm/test/Makefile
index 18e25c6..456ceae 100644
--- a/kvm/test/Makefile
+++ b/kvm/test/Makefile
@@ -1,7 +1,7 @@
 
 include config.mak
 
-DESTDIR :=
+DESTDIR := $(PREFIX)/share/qemu/tests
 
 .PHONY: arch_clean clean
 
@@ -56,5 +56,9 @@ $(libcflat): $(cflatobjs)
 
 -include .*.d
 
+install:
+	mkdir -p $(DESTDIR)
+	install $(tests_and_config) $(DESTDIR)
+
 clean: arch_clean
 	$(RM) kvmctl kvmtrace *.o *.a .*.d $(libcflat) $(cflatobjs)
diff --git a/kvm/test/config-x86-common.mak b/kvm/test/config-x86-common.mak
index 0e1ccce..689e6b4 100644
--- a/kvm/test/config-x86-common.mak
+++ b/kvm/test/config-x86-common.mak
@@ -27,6 +27,8 @@ tests-common = $(TEST_DIR)/vmexit.flat $(TEST_DIR)/tsc.flat \
                $(TEST_DIR)/realmode.flat $(TEST_DIR)/msr.flat \
                $(TEST_DIR)/hypercall.flat $(TEST_DIR)/sieve.flat
 
+tests_and_config = $(tests-common) $(TEST_DIR)/unittests.cfg
+
 test_cases: $(tests-common) $(tests)
 
 $(TEST_DIR)/%.o: CFLAGS += -std=gnu99 -ffreestanding -I lib -I lib/x86
diff --git a/kvm/test/x86/unittests.cfg b/kvm/test/x86/unittests.cfg
new file mode 100644
index 0000000..4a40989
--- /dev/null
+++ b/kvm/test/x86/unittests.cfg
@@ -0,0 +1,52 @@
+# Define your new unittest following the convention:
+# [unittest_name]
+# file = foo.flat # Name of the flat file to be used
+# smp = 2 # Number of processors the VM will use during this test
+# extra_params = -cpu qemu64,+x2apic # Additional parameters used
+
+[apic]
+file = apic.flat
+smp = 2
+extra_params: -cpu qemu64,+x2apic
+
+[smptest]
+file = smptest.flat
+smp = 2
+
+[smptest3]
+file = smptest.flat
+smp = 3
+
+[vmexit]
+file = vmexit.flat
+smp = 2
+
+[access]
+file = access.flat
+
+[emulator]
+file = emulator.flat
+
+[hypercall]
+file = hypercall.flat
+
+[idt_test]
+file = idt_test.flat
+
+[msr]
+file = msr.flat
+
+[port80]
+file = port80.flat
+
+[realmode]
+file = realmode.flat
+
+[sieve]
+file = sieve.flat
+
+[tsc]
+file = tsc.flat
+
+[xsave]
+file = xsave.flat
-- 
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