diff options
Diffstat (limited to 'tests/qtest')
-rw-r--r-- | tests/qtest/e1000e-test.c | 4 | ||||
-rw-r--r-- | tests/qtest/libqtest.c | 4 | ||||
-rw-r--r-- | tests/qtest/npcm7xx_emc-test.c | 4 | ||||
-rw-r--r-- | tests/qtest/test-filter-mirror.c | 4 | ||||
-rw-r--r-- | tests/qtest/test-filter-redirector.c | 8 | ||||
-rw-r--r-- | tests/qtest/virtio-net-test.c | 10 |
6 files changed, 17 insertions, 17 deletions
diff --git a/tests/qtest/e1000e-test.c b/tests/qtest/e1000e-test.c index 0273fe4c15..e648fdd409 100644 --- a/tests/qtest/e1000e-test.c +++ b/tests/qtest/e1000e-test.c @@ -91,9 +91,9 @@ static void e1000e_send_verify(QE1000E *d, int *test_sockets, QGuestAllocator *a g_assert_cmphex(le32_to_cpu(descr.upper.data) & dsta_dd, ==, dsta_dd); /* Check data sent to the backend */ - ret = qemu_recv(test_sockets[0], &recv_len, sizeof(recv_len), 0); + ret = recv(test_sockets[0], &recv_len, sizeof(recv_len), 0); g_assert_cmpint(ret, == , sizeof(recv_len)); - ret = qemu_recv(test_sockets[0], buffer, 64, 0); + ret = recv(test_sockets[0], buffer, 64, 0); g_assert_cmpint(ret, >=, 5); g_assert_cmpstr(buffer, == , "TEST"); diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 41f4da4e54..9dac018fcb 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -94,8 +94,8 @@ static int socket_accept(int sock) struct timeval timeout = { .tv_sec = SOCKET_TIMEOUT, .tv_usec = 0 }; - if (qemu_setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, - (void *)&timeout, sizeof(timeout))) { + if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, + (void *)&timeout, sizeof(timeout))) { fprintf(stderr, "%s failed to set SO_RCVTIMEO: %s\n", __func__, strerror(errno)); close(sock); diff --git a/tests/qtest/npcm7xx_emc-test.c b/tests/qtest/npcm7xx_emc-test.c index 9eec71d87c..7c435ac915 100644 --- a/tests/qtest/npcm7xx_emc-test.c +++ b/tests/qtest/npcm7xx_emc-test.c @@ -521,12 +521,12 @@ static void emc_send_verify1(QTestState *qts, const EMCModule *mod, int fd, /* Check data sent to the backend. */ recv_len = ~0; - ret = qemu_recv(fd, &recv_len, sizeof(recv_len), MSG_DONTWAIT); + ret = recv(fd, &recv_len, sizeof(recv_len), MSG_DONTWAIT); g_assert_cmpint(ret, == , sizeof(recv_len)); g_assert(wait_socket_readable(fd)); memset(buffer, 0xff, sizeof(buffer)); - ret = qemu_recv(fd, buffer, test_size, MSG_DONTWAIT); + ret = recv(fd, buffer, test_size, MSG_DONTWAIT); g_assert_cmpmem(buffer, ret, test_data, test_size); } diff --git a/tests/qtest/test-filter-mirror.c b/tests/qtest/test-filter-mirror.c index 95367d14d3..da4f94de72 100644 --- a/tests/qtest/test-filter-mirror.c +++ b/tests/qtest/test-filter-mirror.c @@ -58,13 +58,13 @@ static void test_mirror(void) g_assert_cmpint(ret, ==, sizeof(send_buf) + sizeof(size)); close(send_sock[0]); - ret = qemu_recv(recv_sock[0], &len, sizeof(len), 0); + ret = recv(recv_sock[0], &len, sizeof(len), 0); g_assert_cmpint(ret, ==, sizeof(len)); len = ntohl(len); g_assert_cmpint(len, ==, sizeof(send_buf)); recv_buf = g_malloc(len); - ret = qemu_recv(recv_sock[0], recv_buf, len, 0); + ret = recv(recv_sock[0], recv_buf, len, 0); g_assert_cmpstr(recv_buf, ==, send_buf); g_free(recv_buf); diff --git a/tests/qtest/test-filter-redirector.c b/tests/qtest/test-filter-redirector.c index 4f3f59cba8..fc16cf7e8d 100644 --- a/tests/qtest/test-filter-redirector.c +++ b/tests/qtest/test-filter-redirector.c @@ -115,13 +115,13 @@ static void test_redirector_tx(void) g_assert_cmpint(ret, ==, sizeof(send_buf) + sizeof(size)); close(backend_sock[0]); - ret = qemu_recv(recv_sock, &len, sizeof(len), 0); + ret = recv(recv_sock, &len, sizeof(len), 0); g_assert_cmpint(ret, ==, sizeof(len)); len = ntohl(len); g_assert_cmpint(len, ==, sizeof(send_buf)); recv_buf = g_malloc(len); - ret = qemu_recv(recv_sock, recv_buf, len, 0); + ret = recv(recv_sock, recv_buf, len, 0); g_assert_cmpstr(recv_buf, ==, send_buf); g_free(recv_buf); @@ -182,13 +182,13 @@ static void test_redirector_rx(void) ret = iov_send(send_sock, iov, 2, 0, sizeof(size) + sizeof(send_buf)); g_assert_cmpint(ret, ==, sizeof(send_buf) + sizeof(size)); - ret = qemu_recv(backend_sock[0], &len, sizeof(len), 0); + ret = recv(backend_sock[0], &len, sizeof(len), 0); g_assert_cmpint(ret, ==, sizeof(len)); len = ntohl(len); g_assert_cmpint(len, ==, sizeof(send_buf)); recv_buf = g_malloc(len); - ret = qemu_recv(backend_sock[0], recv_buf, len, 0); + ret = recv(backend_sock[0], recv_buf, len, 0); g_assert_cmpstr(recv_buf, ==, send_buf); close(send_sock); diff --git a/tests/qtest/virtio-net-test.c b/tests/qtest/virtio-net-test.c index 8bf74e516c..a71395849f 100644 --- a/tests/qtest/virtio-net-test.c +++ b/tests/qtest/virtio-net-test.c @@ -87,11 +87,11 @@ static void tx_test(QVirtioDevice *dev, QVIRTIO_NET_TIMEOUT_US); guest_free(alloc, req_addr); - ret = qemu_recv(socket, &len, sizeof(len), 0); + ret = recv(socket, &len, sizeof(len), 0); g_assert_cmpint(ret, ==, sizeof(len)); len = ntohl(len); - ret = qemu_recv(socket, buffer, len, 0); + ret = recv(socket, buffer, len, 0); g_assert_cmpstr(buffer, ==, "TEST"); } @@ -202,11 +202,11 @@ static void announce_self(void *obj, void *data, QGuestAllocator *t_alloc) qobject_unref(rsp); /* Catch the first packet and make sure it's a RARP */ - ret = qemu_recv(sv[0], &len, sizeof(len), 0); + ret = recv(sv[0], &len, sizeof(len), 0); g_assert_cmpint(ret, ==, sizeof(len)); len = ntohl(len); - ret = qemu_recv(sv[0], buffer, len, 0); + ret = recv(sv[0], buffer, len, 0); g_assert_cmpint(*proto, ==, htons(ETH_P_RARP)); /* @@ -230,7 +230,7 @@ static void announce_self(void *obj, void *data, QGuestAllocator *t_alloc) while (true) { int saved_err; - ret = qemu_recv(sv[0], buffer, 60, MSG_DONTWAIT); + ret = recv(sv[0], buffer, 60, MSG_DONTWAIT); saved_err = errno; now = g_get_monotonic_time(); g_assert_cmpint(now, <, deadline); |