Moved binding/listening on the server socket from
barrier.barrier.run_server() to a separate class
(barrier.listen_server). Added a keyword argument to barrier to pass
a listen_server instance to use it when it needs access to the server
socket. When a listen_server instance is not given to barrier it will
create one in run_server() (preserving the old semantics). Updated
barriertest (used by server side profiler support code) to reuse a
listen_server instance in almost all its barrier instances (thus
hopefully fixing an issue where we rebind too fast on the same port when
packets are in transit from an old connection and get a ECONNRESET on a
new connection because of this). Updated unittests.
Signed-off-by: Mihai Rusu <dizzy@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4314 592f7852-d20e-0410-864c-8624ca9c26a4
4 files changed