* [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available
@ 2017-05-05 10:21 Fam Zheng
2017-05-05 10:41 ` Daniel P. Berrange
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Fam Zheng @ 2017-05-05 10:21 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Max Reitz, qemu-block
This is the case in our docker tests, as we use --net=none there. Skip
this method.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/qemu-iotests/147 | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147
index 32afea6..db34838 100755
--- a/tests/qemu-iotests/147
+++ b/tests/qemu-iotests/147
@@ -147,6 +147,13 @@ class BuiltinNBD(NBDBlockdevAddBase):
self._server_down()
def test_inet6(self):
+ try:
+ socket.getaddrinfo("::0", "0", socket.AF_INET6,
+ socket.SOCK_STREAM, socket.IPPROTO_TCP,
+ socket.AI_ADDRCONFIG | socket.AI_CANONNAME)
+ except socket.gaierror:
+ # IPv6 not available, skip
+ return
address = { 'type': 'inet',
'data': {
'host': '::1',
--
2.9.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available
2017-05-05 10:21 [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available Fam Zheng
@ 2017-05-05 10:41 ` Daniel P. Berrange
2017-05-17 12:21 ` Fam Zheng
2017-05-17 2:13 ` Fam Zheng
2017-05-17 12:27 ` Kevin Wolf
2 siblings, 1 reply; 8+ messages in thread
From: Daniel P. Berrange @ 2017-05-05 10:41 UTC (permalink / raw)
To: Fam Zheng; +Cc: qemu-devel, Kevin Wolf, qemu-block, Max Reitz
On Fri, May 05, 2017 at 06:21:53PM +0800, Fam Zheng wrote:
> This is the case in our docker tests, as we use --net=none there. Skip
> this method.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> tests/qemu-iotests/147 | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147
> index 32afea6..db34838 100755
> --- a/tests/qemu-iotests/147
> +++ b/tests/qemu-iotests/147
> @@ -147,6 +147,13 @@ class BuiltinNBD(NBDBlockdevAddBase):
> self._server_down()
>
> def test_inet6(self):
> + try:
> + socket.getaddrinfo("::0", "0", socket.AF_INET6,
> + socket.SOCK_STREAM, socket.IPPROTO_TCP,
> + socket.AI_ADDRCONFIG | socket.AI_CANONNAME)
> + except socket.gaierror:
> + # IPv6 not available, skip
> + return
FWIW, in test-io-channel-socket.c we call getaddrinfo() and also check
bind() succeeds (use port==0 to let it select a free port to test bind
on), before assuming IPv6 is working.
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 :|
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available
2017-05-05 10:21 [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available Fam Zheng
2017-05-05 10:41 ` Daniel P. Berrange
@ 2017-05-17 2:13 ` Fam Zheng
2017-05-17 11:59 ` Kevin Wolf
2017-05-17 12:27 ` Kevin Wolf
2 siblings, 1 reply; 8+ messages in thread
From: Fam Zheng @ 2017-05-17 2:13 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, qemu-block, Max Reitz
On Fri, 05/05 18:21, Fam Zheng wrote:
> This is the case in our docker tests, as we use --net=none there. Skip
> this method.
Ping. Is this patch okay?
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> tests/qemu-iotests/147 | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147
> index 32afea6..db34838 100755
> --- a/tests/qemu-iotests/147
> +++ b/tests/qemu-iotests/147
> @@ -147,6 +147,13 @@ class BuiltinNBD(NBDBlockdevAddBase):
> self._server_down()
>
> def test_inet6(self):
> + try:
> + socket.getaddrinfo("::0", "0", socket.AF_INET6,
> + socket.SOCK_STREAM, socket.IPPROTO_TCP,
> + socket.AI_ADDRCONFIG | socket.AI_CANONNAME)
> + except socket.gaierror:
> + # IPv6 not available, skip
> + return
> address = { 'type': 'inet',
> 'data': {
> 'host': '::1',
> --
> 2.9.3
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available
2017-05-17 2:13 ` Fam Zheng
@ 2017-05-17 11:59 ` Kevin Wolf
2017-05-17 12:10 ` Fam Zheng
0 siblings, 1 reply; 8+ messages in thread
From: Kevin Wolf @ 2017-05-17 11:59 UTC (permalink / raw)
To: Fam Zheng; +Cc: qemu-devel, qemu-block, Max Reitz
Am 17.05.2017 um 04:13 hat Fam Zheng geschrieben:
> On Fri, 05/05 18:21, Fam Zheng wrote:
> > This is the case in our docker tests, as we use --net=none there. Skip
> > this method.
>
> Ping. Is this patch okay?
I thought you might want to respond to Dan's comment. If you don't plan
to make the change he suggests, let me know and I'll queue the patch as
it is.
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available
2017-05-17 11:59 ` Kevin Wolf
@ 2017-05-17 12:10 ` Fam Zheng
2017-05-17 12:15 ` Daniel P. Berrange
0 siblings, 1 reply; 8+ messages in thread
From: Fam Zheng @ 2017-05-17 12:10 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel, qemu-block, Max Reitz
On Wed, 05/17 13:59, Kevin Wolf wrote:
> Am 17.05.2017 um 04:13 hat Fam Zheng geschrieben:
> > On Fri, 05/05 18:21, Fam Zheng wrote:
> > > This is the case in our docker tests, as we use --net=none there. Skip
> > > this method.
> >
> > Ping. Is this patch okay?
>
> I thought you might want to respond to Dan's comment. If you don't plan
> to make the change he suggests, let me know and I'll queue the patch as
> it is.
This check is enough for me and I think it's good to go.
Fam
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available
2017-05-17 12:10 ` Fam Zheng
@ 2017-05-17 12:15 ` Daniel P. Berrange
0 siblings, 0 replies; 8+ messages in thread
From: Daniel P. Berrange @ 2017-05-17 12:15 UTC (permalink / raw)
To: Fam Zheng; +Cc: Kevin Wolf, qemu-devel, qemu-block, Max Reitz
On Wed, May 17, 2017 at 08:10:51PM +0800, Fam Zheng wrote:
> On Wed, 05/17 13:59, Kevin Wolf wrote:
> > Am 17.05.2017 um 04:13 hat Fam Zheng geschrieben:
> > > On Fri, 05/05 18:21, Fam Zheng wrote:
> > > > This is the case in our docker tests, as we use --net=none there. Skip
> > > > this method.
> > >
> > > Ping. Is this patch okay?
> >
> > I thought you might want to respond to Dan's comment. If you don't plan
> > to make the change he suggests, let me know and I'll queue the patch as
> > it is.
>
> This check is enough for me and I think it's good to go.
That's fine with me - i didn't intend my comments to be a blocker. In
general getaddrinfo should only return IPv6 addrs, if IPv6 is actually
usable.
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 :|
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available
2017-05-05 10:41 ` Daniel P. Berrange
@ 2017-05-17 12:21 ` Fam Zheng
0 siblings, 0 replies; 8+ messages in thread
From: Fam Zheng @ 2017-05-17 12:21 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: qemu-devel, Kevin Wolf, qemu-block, Max Reitz
On Fri, 05/05 11:41, Daniel P. Berrange wrote:
> On Fri, May 05, 2017 at 06:21:53PM +0800, Fam Zheng wrote:
> > This is the case in our docker tests, as we use --net=none there. Skip
> > this method.
> >
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> > tests/qemu-iotests/147 | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147
> > index 32afea6..db34838 100755
> > --- a/tests/qemu-iotests/147
> > +++ b/tests/qemu-iotests/147
> > @@ -147,6 +147,13 @@ class BuiltinNBD(NBDBlockdevAddBase):
> > self._server_down()
> >
> > def test_inet6(self):
> > + try:
> > + socket.getaddrinfo("::0", "0", socket.AF_INET6,
> > + socket.SOCK_STREAM, socket.IPPROTO_TCP,
> > + socket.AI_ADDRCONFIG | socket.AI_CANONNAME)
> > + except socket.gaierror:
> > + # IPv6 not available, skip
> > + return
>
> FWIW, in test-io-channel-socket.c we call getaddrinfo() and also check
> bind() succeeds (use port==0 to let it select a free port to test bind
> on), before assuming IPv6 is working.
Well it then sounds like we should check bind(port=NBD_PORT). But if we do that,
it looks like a slightly bigger topic, for example a previous run not cleanup?
Let's leave it for now.
Fam
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available
2017-05-05 10:21 [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available Fam Zheng
2017-05-05 10:41 ` Daniel P. Berrange
2017-05-17 2:13 ` Fam Zheng
@ 2017-05-17 12:27 ` Kevin Wolf
2 siblings, 0 replies; 8+ messages in thread
From: Kevin Wolf @ 2017-05-17 12:27 UTC (permalink / raw)
To: Fam Zheng; +Cc: qemu-devel, Max Reitz, qemu-block
Am 05.05.2017 um 12:21 hat Fam Zheng geschrieben:
> This is the case in our docker tests, as we use --net=none there. Skip
> this method.
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-05-17 12:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-05 10:21 [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available Fam Zheng
2017-05-05 10:41 ` Daniel P. Berrange
2017-05-17 12:21 ` Fam Zheng
2017-05-17 2:13 ` Fam Zheng
2017-05-17 11:59 ` Kevin Wolf
2017-05-17 12:10 ` Fam Zheng
2017-05-17 12:15 ` Daniel P. Berrange
2017-05-17 12:27 ` Kevin Wolf
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).