Bug 36814 - Tests for connection failures fail
Summary: Tests for connection failures fail
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: idle (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Debarshi Ray
QA Contact: Telepathy bugs list
URL: http://cgit.freedesktop.org/~jonny/te...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-05-03 13:38 UTC by Jonny Lamb
Modified: 2011-05-04 03:13 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Jonny Lamb 2011-05-03 13:38:37 UTC
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?
Comment 1 Jonny Lamb 2011-05-04 03:13:55 UTC
I merged my branch for now.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.