qos-test: spapr-phb test node
Convert tests/spapr-phb-test to a qgraph test node, spapr-phb-test. This test adds another spapr-pci-host-bridge device in the ppc64/pseries machine Signed-off-by: Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
96900e1610
commit
dca063065a
@ -235,7 +235,6 @@ check-qtest-ppc-y += tests/boot-serial-test$(EXESUF)
|
|||||||
check-qtest-ppc-$(CONFIG_M48T59) += tests/m48t59-test$(EXESUF)
|
check-qtest-ppc-$(CONFIG_M48T59) += tests/m48t59-test$(EXESUF)
|
||||||
|
|
||||||
check-qtest-ppc64-y += $(check-qtest-ppc-y)
|
check-qtest-ppc64-y += $(check-qtest-ppc-y)
|
||||||
check-qtest-ppc64-$(CONFIG_PSERIES) += tests/spapr-phb-test$(EXESUF)
|
|
||||||
check-qtest-ppc64-$(CONFIG_PSERIES) += tests/device-plug-test$(EXESUF)
|
check-qtest-ppc64-$(CONFIG_PSERIES) += tests/device-plug-test$(EXESUF)
|
||||||
check-qtest-ppc64-$(CONFIG_POWERNV) += tests/pnv-xscom-test$(EXESUF)
|
check-qtest-ppc64-$(CONFIG_POWERNV) += tests/pnv-xscom-test$(EXESUF)
|
||||||
check-qtest-ppc64-y += tests/migration-test$(EXESUF)
|
check-qtest-ppc64-y += tests/migration-test$(EXESUF)
|
||||||
@ -755,6 +754,7 @@ qos-test-obj-y += tests/nvme-test.o
|
|||||||
qos-test-obj-y += tests/pci-test.o
|
qos-test-obj-y += tests/pci-test.o
|
||||||
qos-test-obj-y += tests/pcnet-test.o
|
qos-test-obj-y += tests/pcnet-test.o
|
||||||
qos-test-obj-y += tests/sdhci-test.o
|
qos-test-obj-y += tests/sdhci-test.o
|
||||||
|
qos-test-obj-y += tests/spapr-phb-test.o
|
||||||
qos-test-obj-$(CONFIG_VHOST_NET_USER) += tests/vhost-user-test.o $(chardev-obj-y) $(test-io-obj-y)
|
qos-test-obj-$(CONFIG_VHOST_NET_USER) += tests/vhost-user-test.o $(chardev-obj-y) $(test-io-obj-y)
|
||||||
qos-test-obj-y += tests/virtio-test.o
|
qos-test-obj-y += tests/virtio-test.o
|
||||||
qos-test-obj-$(CONFIG_VIRTFS) += tests/virtio-9p-test.o
|
qos-test-obj-$(CONFIG_VIRTFS) += tests/virtio-9p-test.o
|
||||||
@ -777,7 +777,6 @@ tests/rtc-test$(EXESUF): tests/rtc-test.o
|
|||||||
tests/m48t59-test$(EXESUF): tests/m48t59-test.o
|
tests/m48t59-test$(EXESUF): tests/m48t59-test.o
|
||||||
tests/hexloader-test$(EXESUF): tests/hexloader-test.o
|
tests/hexloader-test$(EXESUF): tests/hexloader-test.o
|
||||||
tests/endianness-test$(EXESUF): tests/endianness-test.o
|
tests/endianness-test$(EXESUF): tests/endianness-test.o
|
||||||
tests/spapr-phb-test$(EXESUF): tests/spapr-phb-test.o $(libqos-obj-y)
|
|
||||||
tests/prom-env-test$(EXESUF): tests/prom-env-test.o $(libqos-obj-y)
|
tests/prom-env-test$(EXESUF): tests/prom-env-test.o $(libqos-obj-y)
|
||||||
tests/rtas-test$(EXESUF): tests/rtas-test.o $(libqos-spapr-obj-y)
|
tests/rtas-test$(EXESUF): tests/rtas-test.o $(libqos-spapr-obj-y)
|
||||||
tests/fdc-test$(EXESUF): tests/fdc-test.o
|
tests/fdc-test$(EXESUF): tests/fdc-test.o
|
||||||
|
@ -7,29 +7,25 @@
|
|||||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||||
* See the COPYING file in the top-level directory.
|
* See the COPYING file in the top-level directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
|
|
||||||
#include "libqtest.h"
|
#include "libqtest.h"
|
||||||
|
#include "libqos/qgraph.h"
|
||||||
|
|
||||||
#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
|
/* Tests only initialization so far. TODO: Replace with functional tests,
|
||||||
|
* for example by producing pci-bus.
|
||||||
/* Tests only initialization so far. TODO: Replace with functional tests */
|
*/
|
||||||
static void test_phb_device(void)
|
static void test_phb_device(void *obj, void *data, QGuestAllocator *alloc)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
static void register_phb_test(void)
|
||||||
{
|
{
|
||||||
int ret;
|
qos_add_test("spapr-phb-test", "ppc64/pseries",
|
||||||
|
test_phb_device, &(QOSGraphTestOptions) {
|
||||||
g_test_init(&argc, &argv, NULL);
|
.edge.before_cmd_line = "-device spapr-pci-host-bridge"
|
||||||
qtest_add_func("/spapr-phb/device", test_phb_device);
|
",index=30",
|
||||||
|
});
|
||||||
qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=30");
|
|
||||||
|
|
||||||
ret = g_test_run();
|
|
||||||
|
|
||||||
qtest_end();
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
libqos_init(register_phb_test);
|
||||||
|
Loading…
Reference in New Issue
Block a user