]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tests/qgraph: add generic PCI testcases
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Oct 2018 17:00:19 +0000 (19:00 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Mar 2019 16:28:25 +0000 (17:28 +0100)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/Makefile.include
tests/pci-test.c [new file with mode: 0644]

index 4b545ac905b43da51e10607443bcd0a645562c57..4391b7f98475948baf136c0f5c75de1fc29a7534 100644 (file)
@@ -760,6 +760,7 @@ qos-test-obj-y += tests/libqos/arm-xilinx-zynq-a9-machine.o
 qos-test-obj-y += tests/libqos/x86_64_pc-machine.o
 
 # Tests
+qos-test-obj-y += tests/pci-test.o
 qos-test-obj-y += tests/sdhci-test.o
 
 check-unit-y += tests/test-qgraph$(EXESUF)
diff --git a/tests/pci-test.c b/tests/pci-test.c
new file mode 100644 (file)
index 0000000..ff80985
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * QTest testcase for PCI
+ *
+ * Copyright (c) 2018 Red Hat, Inc.
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+#include "libqtest.h"
+#include "libqos/qgraph.h"
+#include "libqos/pci.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void nop(void *obj, void *data, QGuestAllocator *alloc)
+{
+}
+
+static void register_pci_test(void)
+{
+    qos_add_test("nop", "pci-device", nop, NULL);
+}
+
+libqos_init(register_pci_test);