I don't want to merge this as-is, but I have a guess about what's going on...
[...]
> I'd like some smart server expert advice there for the TestCmdServeChrooting.test_serve_tcp.
[...]
> + if sys.platform.startswith('freebsd'):
> + # Something fishy is going on there, the server is able to publish
> + # the port it is listening too, yet the client can't connect...
> + # The assertion below should fail when the problem is fixed or the
> + # test rewritten.
> + self.assertRaises(AttributeError, getattr, self, 'client_resp')
That is odd. By this point bind and listen have been called, which I would have
thought would be enough.
Perhaps it's an IPv6 vs. IPv4 issue? Currently bzr doesn't specify the address
family, it passes AF_UNSPEC to getaddrinfo and uses the address family (and
socktype and proto and address) returned from that. And it'll use
bzrlib.smart.medium.BZR_DEFAULT_INTERFACE (i.e. None) as the host for
getaddrinfo, hmm...
Does the test work if you change it to pass "--port=127.0.0.1:0"? The test
assumes 127.0.0.1 later, so it's reasonable to explicitly pass it here.
If not, does 'netstat -l' (or the equivalent?) report when you do "bzr serve --port
0"?
review needs-info
I don't want to merge this as-is, but I have a guess about what's going on...
[...] ooting. test_serve_ tcp. startswith( 'freebsd' ): es(AttributeErr or, getattr, self, 'client_resp')
> I'd like some smart server expert advice there for the TestCmdServeChr
[...]
> + if sys.platform.
> + # Something fishy is going on there, the server is able to publish
> + # the port it is listening too, yet the client can't connect...
> + # The assertion below should fail when the problem is fixed or the
> + # test rewritten.
> + self.assertRais
That is odd. By this point bind and listen have been called, which I would have
thought would be enough.
Perhaps it's an IPv6 vs. IPv4 issue? Currently bzr doesn't specify the address smart.medium. BZR_DEFAULT_ INTERFACE (i.e. None) as the host for
family, it passes AF_UNSPEC to getaddrinfo and uses the address family (and
socktype and proto and address) returned from that. And it'll use
bzrlib.
getaddrinfo, hmm...
Does the test work if you change it to pass "--port= 127.0.0. 1:0"? The test
assumes 127.0.0.1 later, so it's reasonable to explicitly pass it here.
If not, does 'netstat -l' (or the equivalent?) report when you do "bzr serve --port
0"?
[...] tests/test_ smart_transport .py' l(expected_ response, client_ sock.recv( 50), l(expected_ response, osutils. recv_all( client_ sock, 50),
> === modified file 'bzrlib/
[...]
> - self.assertEqua
> + self.assertEqua
This change isn't controversial at all :)
-Andrew.