Bug 48600

Summary: dbus-tube-chan test assumes abstract sockets are supported
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: tp-glibAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: dbus-tube-chan test: listen on a random address appropriate for the OS

Description Simon McVittie 2012-04-12 04:59:29 UTC
dbus-tube-chan.c assumes that abstract sockets are supported, which isn't true on most non-Linux platforms. For instance, see this log from Debian:

https://buildd.debian.org/status/fetch.php?pkg=telepathy-glib&arch=kfreebsd-i386&ver=0.18.0-1&stamp=1333416042
Comment 1 Simon McVittie 2012-04-12 06:02:20 UTC
Created attachment 59857 [details] [review]
dbus-tube-chan test: listen on a random address appropriate  for the OS

Instead of hard-coding the abstract Unix socket '\000dbus-tube-test',
listen on a random (abstract or real) Unix socket in /tmp if on Unix,
or a random port on 127.0.0.1 if not. These are the same listening
addresses I used in test/loopback.c in libdbus. The Unix version also
matches what the session bus normally uses.

This fixes the test on non-Linux Unix (not insisting on
abstract-namespace sockets working), when run twice in parallel on Linux
(not insisting on using a particular hard-coded name), and in theory
also on Windows (not trying to use Unix sockets).
Comment 2 Guillaume Desmottes 2012-04-12 06:48:50 UTC
Comment on attachment 59857 [details] [review]
dbus-tube-chan test: listen on a random address appropriate  for the OS

Review of attachment 59857 [details] [review]:
-----------------------------------------------------------------

++
Comment 3 Simon McVittie 2012-04-12 08:07:32 UTC
Thanks, fixed in git for 0.18.1, 0.19.0

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.