[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 28/54] tests/qtest: Skip running virtio-net-test cases that re
From: |
Bin Meng |
Subject: |
[PATCH v4 28/54] tests/qtest: Skip running virtio-net-test cases that require socketpair() for win32 |
Date: |
Tue, 27 Sep 2022 19:06:06 +0800 |
From: Bin Meng <bin.meng@windriver.com>
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>
---
(no changes since v2)
Changes in v2:
- Change to skip only part of the virtio-net-test cases that require
socketpair() intead of disabling all of them
tests/qtest/virtio-net-test.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tests/qtest/virtio-net-test.c b/tests/qtest/virtio-net-test.c
index 6ded252901..dff43f0f60 100644
--- a/tests/qtest/virtio-net-test.c
+++ b/tests/qtest/virtio-net-test.c
@@ -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;
--
2.34.1
- [PATCH v4 18/54] tests/qtest: vhost-user-test: Avoid using hardcoded /tmp, (continued)
- [PATCH v4 18/54] tests/qtest: vhost-user-test: Avoid using hardcoded /tmp, Bin Meng, 2022/09/27
- [PATCH v4 27/54] hw/usb: dev-mtp: Use g_mkdir(), Bin Meng, 2022/09/27
- [PATCH v4 29/54] tests/qtest: Build test-filter-{mirror, redirector} cases for posix only, Bin Meng, 2022/09/27
- [PATCH v4 33/54] tests/qtest: Use send/recv for socket communication, Bin Meng, 2022/09/27
- [PATCH v4 31/54] accel/qtest: Implement a portable qtest accelerator, Bin Meng, 2022/09/27
- [PATCH v4 26/54] fsdev/virtfs-proxy-helper: Use g_mkdir(), Bin Meng, 2022/09/27
- [PATCH v4 28/54] tests/qtest: Skip running virtio-net-test cases that require socketpair() for win32,
Bin Meng <=
- [PATCH v4 30/54] tests/qtest: qmp-test: Skip running test_qmp_oob for win32, Bin Meng, 2022/09/27
- [PATCH v4 13/54] tests/qtest: ide-test: Avoid using hardcoded /tmp, Bin Meng, 2022/09/27
- [PATCH v4 17/54] tests/qtest: vhost-user-blk-test: Avoid using hardcoded /tmp, Bin Meng, 2022/09/27
- [PATCH v4 35/54] tests/qtest: libqtest: Install signal handler via signal(), Bin Meng, 2022/09/27
- [PATCH v4 36/54] tests/qtest: Support libqtest to build and run on Windows, Bin Meng, 2022/09/27
- [PATCH v4 38/54] tests/qtest: bios-tables-test: Adapt the case for win32, Bin Meng, 2022/09/27
- [PATCH v4 39/54] tests/qtest: boot-serial-test: Close the serial file before starting QEMU, Bin Meng, 2022/09/27