On Wed, Feb 20, 2019 at 04:40:16PM +0100, Paolo Bonzini wrote: > If the socket is connecting or connected, tcp_chr_update_read_handler will > be called but it should not set the NetListener's callbacks again. > Otherwise, tcp_chr_accept is invoked while the socket is in connected > state and you get an assertion failure. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > chardev/char-socket.c | 2 +- > tests/test-char.c | 95 > +++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 96 insertions(+), 1 deletion(-)
> diff --git a/tests/test-char.c b/tests/test-char.c > index 63b4d32..f1dec89 100644 > --- a/tests/test-char.c > +++ b/tests/test-char.c > @@ -1346,6 +1437,10 @@ int main(int argc, char **argv) > SOCKET_SERVER_TEST(unix, &unixaddr); > SOCKET_CLIENT_TEST(unix, &unixaddr); > #endif > + g_test_add_data_func("/char/socket/server/two-clients/tcp", &tcpaddr, > + char_socket_server_two_clients_test); > + g_test_add_data_func("/char/socket/server/two-clients/unix", &unixaddr, > + char_socket_server_two_clients_test); The use of "unixaddr" needs to be inside a "#ifndef WIN32" conditional. If that is fixed, then consider it Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|