* [PATCH] qemu-kvm tests: Create make target for install tests
@ 2010-06-24 23:29 Lucas Meneghel Rodrigues
2010-06-28 20:25 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Lucas Meneghel Rodrigues @ 2010-06-24 23:29 UTC (permalink / raw)
To: kvm; +Cc: avi, mgoldish, Lucas Meneghel Rodrigues
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@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] qemu-kvm tests: Create make target for install tests
2010-06-24 23:29 [PATCH] qemu-kvm tests: Create make target for install tests Lucas Meneghel Rodrigues
@ 2010-06-28 20:25 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2010-06-28 20:25 UTC (permalink / raw)
To: Lucas Meneghel Rodrigues; +Cc: kvm, avi, mgoldish
On Thu, Jun 24, 2010 at 08:29:51PM -0300, Lucas Meneghel Rodrigues wrote:
> 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@redhat.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-28 20:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-24 23:29 [PATCH] qemu-kvm tests: Create make target for install tests Lucas Meneghel Rodrigues
2010-06-28 20:25 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox