All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] iotests: 147: Don't test inet6 if not available
Date: Wed, 17 May 2017 20:21:23 +0800	[thread overview]
Message-ID: <20170517122123.GD17629@lemon.lan> (raw)
In-Reply-To: <20170505104128.GC12773@redhat.com>

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

  reply	other threads:[~2017-05-17 12:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=20170517122123.GD17629@lemon.lan \
    --to=famz@redhat.com \
    --cc=berrange@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.