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 <f...@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