From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Fam Zheng" <fam@euphon.net>,
qemu-devel@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>,
pbonzini@redhat.com,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v3 5/6] test-char: skip tcp tests if ipv4 check failed
Date: Tue, 16 Jul 2019 11:24:44 +0100 [thread overview]
Message-ID: <20190716102444.GE11261@redhat.com> (raw)
In-Reply-To: <2cbc75cf-887d-630d-f4e9-835d8ad135f1@redhat.com>
On Mon, Jul 15, 2019 at 06:45:28PM +0200, Philippe Mathieu-Daudé wrote:
> On 7/13/19 4:33 PM, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> > tests/Makefile.include | 2 +-
> > tests/test-char.c | 17 +++++++++++++----
> > 2 files changed, 14 insertions(+), 5 deletions(-)
> >
> > diff --git a/tests/Makefile.include b/tests/Makefile.include
> > index a983dd32da..2bddebaf4b 100644
> > --- a/tests/Makefile.include
> > +++ b/tests/Makefile.include
> > @@ -523,7 +523,7 @@ tests/check-qlit$(EXESUF): tests/check-qlit.o $(test-util-obj-y)
> > tests/check-qom-interface$(EXESUF): tests/check-qom-interface.o $(test-qom-obj-y)
> > tests/check-qom-proplist$(EXESUF): tests/check-qom-proplist.o $(test-qom-obj-y)
> >
> > -tests/test-char$(EXESUF): tests/test-char.o $(test-util-obj-y) $(qtest-obj-y) $(test-io-obj-y) $(chardev-obj-y)
> > +tests/test-char$(EXESUF): tests/test-char.o $(test-util-obj-y) $(qtest-obj-y) $(test-io-obj-y) $(chardev-obj-y) tests/socket-helpers.o
> > tests/test-coroutine$(EXESUF): tests/test-coroutine.o $(test-block-obj-y)
> > tests/test-aio$(EXESUF): tests/test-aio.o $(test-block-obj-y)
> > tests/test-aio-multithread$(EXESUF): tests/test-aio-multithread.o $(test-block-obj-y)
> > diff --git a/tests/test-char.c b/tests/test-char.c
> > index f9440cdcfd..2dde620afc 100644
> > --- a/tests/test-char.c
> > +++ b/tests/test-char.c
> > @@ -15,6 +15,7 @@
> > #include "io/channel-socket.h"
> > #include "qapi/qobject-input-visitor.h"
> > #include "qapi/qapi-visit-sockets.h"
> > +#include "socket-helpers.h"
> >
> > static bool quit;
> >
> > @@ -1356,11 +1357,17 @@ static void char_hotswap_test(void)
> >
> > int main(int argc, char **argv)
> > {
> > + bool has_ipv4, has_ipv6;
> > +
> > qemu_init_main_loop(&error_abort);
> > socket_init();
> >
> > g_test_init(&argc, &argv, NULL);
> >
> > + if (socket_check_protocol_support(&has_ipv4, &has_ipv6) < 0) {
> > + return -1;
> > + }
> > +
> > module_call_init(MODULE_INIT_QOM);
> > qemu_add_opts(&qemu_chardev_opts);
> >
> > @@ -1438,10 +1445,12 @@ int main(int argc, char **argv)
> > g_test_add_data_func("/char/socket/client/wait-conn-fdpass/" # name, \
> > &client6 ##name, char_socket_client_test)
> >
> > - SOCKET_SERVER_TEST(tcp, &tcpaddr);
> > - SOCKET_CLIENT_TEST(tcp, &tcpaddr);
> > - g_test_add_data_func("/char/socket/server/two-clients/tcp", &tcpaddr,
> > - char_socket_server_two_clients_test);
> > + if (has_ipv4) {
>
> Why not if(has_ipv4 || has_ipv6) ?
The 'tcpaddr' data is initialized with an IPv4 address only.
>
> > + SOCKET_SERVER_TEST(tcp, &tcpaddr);
> > + SOCKET_CLIENT_TEST(tcp, &tcpaddr);
> > + g_test_add_data_func("/char/socket/server/two-clients/tcp", &tcpaddr,
> > + char_socket_server_two_clients_test);
> > + }
> > #ifndef WIN32
> > SOCKET_SERVER_TEST(unix, &unixaddr);
> > SOCKET_CLIENT_TEST(unix, &unixaddr);
> >
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 :|
next prev parent reply other threads:[~2019-07-16 10:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-13 14:33 [Qemu-devel] [PATCH v3 0/6] tests/docker: add podman support Marc-André Lureau
2019-07-13 14:33 ` [Qemu-devel] [PATCH v3 1/6] docker.py: add --run-as-current-user Marc-André Lureau
2019-07-15 9:57 ` Daniel P. Berrangé
2019-07-15 14:38 ` Alex Bennée
2019-07-15 16:43 ` Philippe Mathieu-Daudé
2019-07-13 14:33 ` [Qemu-devel] [PATCH v3 2/6] docker.py: add podman support Marc-André Lureau
2019-07-15 9:58 ` Daniel P. Berrangé
2019-07-13 14:33 ` [Qemu-devel] [PATCH v3 3/6] tests/docker: " Marc-André Lureau
2019-07-15 9:46 ` Daniel P. Berrangé
2019-07-15 14:39 ` Alex Bennée
2019-08-23 12:26 ` Markus Armbruster
2019-08-23 12:28 ` Markus Armbruster
2019-07-13 14:33 ` [Qemu-devel] [PATCH v3 4/6] tests: specify the address family when checking bind Marc-André Lureau
2019-07-15 9:37 ` Daniel P. Berrangé
2019-07-13 14:33 ` [Qemu-devel] [PATCH v3 5/6] test-char: skip tcp tests if ipv4 check failed Marc-André Lureau
2019-07-15 9:38 ` Daniel P. Berrangé
2019-07-15 16:45 ` Philippe Mathieu-Daudé
2019-07-16 10:24 ` Daniel P. Berrangé [this message]
2019-07-13 14:33 ` [Qemu-devel] [PATCH v3 6/6] test: skip tests if socket_check_protocol_support() failed Marc-André Lureau
2019-07-15 9:40 ` Daniel P. Berrangé
2019-07-15 10:25 ` Marc-André Lureau
2019-07-15 10:29 ` Daniel P. Berrangé
2019-07-14 3:20 ` [Qemu-devel] [PATCH v3 0/6] tests/docker: add podman support no-reply
2019-09-05 16:15 ` David Hildenbrand
2019-09-05 16:19 ` David Hildenbrand
2019-09-05 16:33 ` Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190716102444.GE11261@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=fam@euphon.net \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).