tests/qtest: Skip running virtio-net-test cases that require socketpair() for win32

Some of the virtio-net-test test cases require socketpair() to do the
test setup. Skip them for win32.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220925113032.1949844-29-bmeng.cn@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Bin Meng 2022-09-25 19:30:06 +08:00 committed by Thomas Huth
parent 786e46ee68
commit cac4373aa0

View File

@ -165,8 +165,6 @@ static void stop_cont_test(void *obj, void *data, QGuestAllocator *t_alloc)
rx_stop_cont_test(dev, t_alloc, rx, sv[0]);
}
#endif
static void hotplug(void *obj, void *data, QGuestAllocator *t_alloc)
{
QVirtioPCIDevice *dev = obj;
@ -286,6 +284,8 @@ static void *virtio_net_test_setup(GString *cmd_line, void *arg)
return sv;
}
#endif /* _WIN32 */
static void large_tx(void *obj, void *data, QGuestAllocator *t_alloc)
{
QVirtioNet *dev = obj;
@ -319,16 +319,15 @@ static void *virtio_net_test_setup_nosocket(GString *cmd_line, void *arg)
static void register_virtio_net_test(void)
{
QOSGraphTestOptions opts = {
.before = virtio_net_test_setup,
};
QOSGraphTestOptions opts = { 0 };
qos_add_test("hotplug", "virtio-net-pci", hotplug, &opts);
#ifndef _WIN32
opts.before = virtio_net_test_setup;
qos_add_test("hotplug", "virtio-net-pci", hotplug, &opts);
qos_add_test("basic", "virtio-net", send_recv_test, &opts);
qos_add_test("rx_stop_cont", "virtio-net", stop_cont_test, &opts);
#endif
qos_add_test("announce-self", "virtio-net", announce_self, &opts);
#endif
/* These tests do not need a loopback backend. */
opts.before = virtio_net_test_setup_nosocket;