upstart tests for initctl show-config and check-config fail in a chroot

Bug #728988 reported by James Hunt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart
Fix Released
Undecided
James Hunt

Bug Description

Running "make check" in a chroot environment (schroot, pbuilder, PPA) will fail due to dbus not being configured:

__________________
process 21149: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
__________________

This bug is to resolve this issue and remove the need for these particular tests to detect they are running in a chroot and disable themselves (ugh!)

James Hunt (jamesodhunt)
Changed in upstart:
assignee: nobody → James Hunt (jamesodhunt)
Revision history for this message
James Hunt (jamesodhunt) wrote :

Also, note that there is odd dbus-ness using "bzr bd":

_______________________________________________________

Testing show_config
...no emits, no start on, no stop on
BAD: wrong value for output[0], expected 'foo' got 'initctl: Unable to connect to session bus: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.'
        at tests/test_initctl.c:10954 (test_show_config).
/bin/bash: line 5: 32180 Aborted (core dumped) ${dir}$tst
FAIL: test_initctl
_______________________________________________________

The crucial line being:

initctl: Unable to connect to session bus: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.'

This might be caused by dpkg-buildpackage unsetting DBUS_SESSION_BUS_ADDRESS ?

Revision history for this message
James Hunt (jamesodhunt) wrote :

The best I could do here is to make the Upstart tests "chroot-aware": if they detect they are running in a chroot *and* that D-Bus hasn't been configured, we conditionally do not run tests requiring a working D-Bus system. This then places the onus on the chroot environment to work correctly (ie install dbus package and run "dbus-uuidgen --ensure").

Changed in upstart:
status: New → Fix Committed
James Hunt (jamesodhunt)
Changed in upstart:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.