When performing X11 autolaunch, libdbus refuses to do anything if DISPLAY isn't set. However, the regression test assumes that, if enabled, autolaunch will work. For instance, this is a problem when building dbus in a minimal chroot with no X server, but with X11 support enabled (as is done in Debian).
Created attachment 50544 [details] [review] Don't assume that X11 autolaunch will work if DISPLAY is unset In practice, it won't; other forms of autolaunch (like Mac OS launchd) might, but we can't really assert either way.
I actually wonder whether to just disable test-autolaunch altogether, unless we can find something like Debian's xvfb-run (which runs a specified app under a temporary Xvfb server). It seems to me as though this test doesn't necessarily really test anything, and at worst it spuriously fails (in a minimal environment, with inaccessible X, etc.). It'd also be easy for it to leak a dbus-daemon/dbus-launch pair, which isn't ideal.
(In reply to comment #0) > When performing X11 autolaunch, libdbus refuses to do anything if DISPLAY > isn't set. However, the regression test assumes that, if enabled, autolaunch > will work. > > For instance, this is a problem when building dbus in a minimal chroot with > no X server, but with X11 support enabled (as is done in Debian). I'd like the Debian package build to be able to run the tests, one day...
Comment on attachment 50544 [details] [review] Don't assume that X11 autolaunch will work if DISPLAY is unset Review of attachment 50544 [details] [review]: ----------------------------------------------------------------- Looks good.
(In reply to comment #4) > Comment on attachment 50544 [details] [review] [review] > Don't assume that X11 autolaunch will work if DISPLAY is unset > > Review of attachment 50544 [details] [review] [review]: > ----------------------------------------------------------------- > > Looks good. Ops, need include "dbus/dbus-sysdeps.h" to fix build, introduced by calling _dbus_getenv().
(In reply to comment #5) > Ops, need include "dbus/dbus-sysdeps.h" to fix build, introduced by calling > _dbus_getenv(). When I wrote the patch, this file included dbus/dbus-sysdeps.h for _dbus_setenv, but I removed that in commit 412538b3b9. Reinstated and applied, 1.7.6.
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.