On 20/10/22 11:16, Laurent Vivier wrote:
Signed-off-by: Laurent Vivier <lviv...@redhat.com>
Acked-by: Michael S. Tsirkin <m...@redhat.com>
---
tests/qtest/meson.build | 1 +
tests/qtest/netdev-socket.c | 417 ++++++++++++++++++++++++++++++++++++
2 files changed, 418 insertions(+)
create mode 100644 tests/qtest/netdev-socket.c
+int main(int argc, char **argv)
+{
+ int ret;
+
+ g_test_init(&argc, &argv, NULL);
+
+ qtest_add_func("/netdev/stream/inet/ipv4", test_stream_inet_ipv4);
+ qtest_add_func("/netdev/stream/inet/ipv6", test_stream_inet_ipv6);
+ qtest_add_func("/netdev/stream/unix", test_stream_unix);
+ qtest_add_func("/netdev/stream/unix/abstract", test_stream_unix_abstract);
+ qtest_add_func("/netdev/stream/fd", test_stream_fd);
The stream tests don't work for me (testing on Darwin).
ERROR:../../tests/qtest/netdev-socket.c:99:test_stream_inet_ipv4:assertion
failed (resp == "st0: index=0,type=stream,\r\n"):
("st0:index=0,type=stream,connection error\r\n" == "st0:
index=0,type=stream,\r\n")
+ qtest_add_func("/netdev/dgram/inet", test_dgram_inet);
+ qtest_add_func("/netdev/dgram/mcast", test_dgram_mcast);
+ qtest_add_func("/netdev/dgram/unix", test_dgram_unix);
+ qtest_add_func("/netdev/dgram/fd", test_dgram_fd);
The dgram ones work.
+ ret = g_test_run();
+
+ return ret;
+}