diff options
author | Laurent Vivier <lvivier@redhat.com> | 2016-10-17 12:30:24 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-10-28 09:36:58 +1100 |
commit | 30ca440eec9fe1d7eec5a48addac656438778278 (patch) | |
tree | 68e20f4d2ffa59169c9597ee0e1fac8b6d4a210e /tests/virtio-9p-test.c | |
parent | a980f7f2c2f4d7e9a1eba4f804cd66dbd458b6d4 (diff) |
tests: enable virtio tests on SPAPR
but disable MSI-X tests on SPAPR as we can't check the result
(the memory region used on PC is not readable on SPAPR).
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/virtio-9p-test.c')
-rw-r--r-- | tests/virtio-9p-test.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/virtio-9p-test.c b/tests/virtio-9p-test.c index 851ec99404..693920af5f 100644 --- a/tests/virtio-9p-test.c +++ b/tests/virtio-9p-test.c @@ -11,6 +11,7 @@ #include "libqtest.h" #include "qemu-common.h" #include "libqos/libqos-pc.h" +#include "libqos/libqos-spapr.h" #include "libqos/virtio.h" #include "libqos/virtio-pci.h" #include "standard-headers/linux/virtio_ids.h" @@ -22,13 +23,22 @@ static char *test_share; static QOSState *qvirtio_9p_start(void) { + const char *arch = qtest_get_arch(); const char *cmd = "-fsdev local,id=fsdev0,security_model=none,path=%s " "-device virtio-9p-pci,fsdev=fsdev0,mount_tag=%s"; test_share = g_strdup("/tmp/qtest.XXXXXX"); g_assert_nonnull(mkdtemp(test_share)); - return qtest_pc_boot(cmd, test_share, mount_tag); + if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { + return qtest_pc_boot(cmd, test_share, mount_tag); + } + if (strcmp(arch, "ppc64") == 0) { + return qtest_spapr_boot(cmd, test_share, mount_tag); + } + + g_printerr("virtio-9p tests are only available on x86 or ppc64\n"); + exit(EXIT_FAILURE); } static void qvirtio_9p_stop(QOSState *qs) |