Code review comment for lp://staging/~lool/ubuntu-system-image/use-system-bus-instead-of-session-bus

Revision history for this message
Barry Warsaw (barry) wrote :

On Jul 30, 2013, at 10:48 AM, Loïc Minier wrote:

>Use system bus instead of session bus; this is helpful for the mocks to work
>like the real service and for consistency with production.

This generally looks good, except that running the test suite locally produces
errors for me, of the kind:

======================================================================
ERROR: test_cancel (systemimage.tests.test_dbus.TestDBus)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 175, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
    's', (bus_name,), **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'com.canonical.SystemImage': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./systemimage/tests/test_dbus.py", line 133, in setUp
    super().setUp()
  File "./systemimage/tests/test_dbus.py", line 69, in setUp
    'com.canonical.SystemImage', '/Service')
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 248, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 180, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 278, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /home/barry/projects/phone/client/.tox/py33/bin/python exited with status 2

I will investigate.

As for test_lp1199361, that one is a bit flaky on some hardware. I haven't
figured out why though, and it does seem to pass for me on my desktop and the
buildds.

« Back to merge proposal