On 04/01/2023 21.10, Laurent Vivier wrote:
On 1/4/23 19:37, Thomas Huth wrote:
On 03/01/2023 12.00, Laurent Vivier wrote:
Signed-off-by: Laurent Vivier <lviv...@redhat.com>
Acked-by: Michael S. Tsirkin <m...@redhat.com>
---
Notes:
v4:
- rework EXPECT_STATE()
- use g_dir_make_tmp()
v3:
- Add "-M none" to avoid error:
"No machine specified, and there is no default"
v2:
- Fix ipv6 free port allocation
- Check for IPv4, IPv6, AF_UNIX
- Use g_mkdtemp() rather than g_file_open_tmp()
- Use socketpair() in test_stream_fd()
v1: compared to v14 of "qapi: net: add unix socket type support to
netdev backend":
- use IP addresses 127.0.0.1 and ::1 rather than localhost
tests/qtest/meson.build | 2 +
tests/qtest/netdev-socket.c | 434 ++++++++++++++++++++++++++++++++++++
2 files changed, 436 insertions(+)
create mode 100644 tests/qtest/netdev-socket.c
FYI, the test also does not work on FreeBSD. It hangs on both, FreeBSD 12
and 13:
https://cirrus-ci.com/task/5024964768694272?logs=build#L6937
https://cirrus-ci.com/task/5379344567107584?logs=build#L6938
Thanks.
Are you sure it's this test?
Since it's hanging at the same spot in both jobs, I'm pretty sure, yes.
The "/netdev/stream/inet/ipv6" seems to be the last one of the series (if I
compare with previous machines) and it is OK in the logs.
I don't understand where it can hang as we have an internal 5 seconds
timeout (in EXPECT_STATE()).
And I don't understand why we have only /netdev/stream tests and no
/netdev/dgram tests.
Is it possible to have more details?
You can reproduce the issue locally on a KVM-enabled Linux box by running:
make vm-build-freebsd J=4 TARGET_LIST=loongarch64-softmmu \
BUILD_TARGET=check-qtest EXTRA_CONFIGURE_OPTS=--enable-werror \
DEBUG=1
And if I'm running the test manually there, I get this error message:
qemu-system-loongarch64: -netdev
stream,id=st0,server=true,addr.type=unix,addr.path=/tmp/netdev-socket.8JXDY1/stream_unix_abstract,addr.abstract=on:
Parameter 'addr.abstract' is unexpected
Looking at qapi/sockets.json, the "abstract" parameter is only available
with CONFIG_LINUX, so this cannot work on FreeBSD, indeed. Maybe it should
be switched to CONFIG_POSIX? Otherwise you need to check for Linux in your
qtest, I think.
HTH,
Thomas