[Bug 36814] New: Tests for connection failures fail

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 3 22:38:39 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=36814

           Summary: Tests for connection failures fail
           Product: Telepathy
           Version: git master
          Platform: Other
               URL: http://cgit.freedesktop.org/~jonny/telepathy-idle/log?
                    h=test-fixes
        OS/Version: All
            Status: NEW
          Keywords: patch
          Severity: normal
          Priority: medium
         Component: idle
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: jonny.lamb at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org
                CC: will.thompson at collabora.co.uk, debarshi.ray at gmail.com


If you change the server connection parameter from "localhost" to "127.0.0.1"
all the tests pass. Alarm bells are ringing -- not *another* ipv6 buildbot
problem!

The problem is that in a test like connect/connect-fail.py, the server is
listening on one port but the connection is tried on a completely different
one. So idle is given "localhost", it resolves as two addresses (in this order
in my testing): 127.0.0.1, and ::1.

Idle tries to connect to 127.0.0.1 on the wrong port -- failure, this is good.
Idle now tries to connect to ::1 on the wrong port -- it just sits at trying to
connect and as a result the test times out. 

So now there appear to be a few fixes possible:

 1. Make the buildbot stop advertising localhost as ::1.
 2. Give the buildbot a loopback ipv6 address.

These two are kind of rubbish, as all stock /etc/hosts have localhost resolving
to 127.0.0.1 and ::1 these days, so no.

 3. Hard-code 127.0.0.1 in the test code instead of localhost so no resolving
is done.
 4. Make idle timeout after 5 seconds or something for connections.

I can't think of a way of making idle be able to detect this crap.

Anyway, I've done 3 to get the tests passing again. le thoughts?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list