Bug#835915: kde-runtime: please use dbus-run-session, or dbus-daemon directly, in tests
Source: kde-runtime
Version: 16.08.0-1
Severity: minor
Tags: upstream
User: dbus@packages.debian.org
Usertags: dbus-launch dbus-launch-for-tests
(Opening this as a separate bug because it isn't in the same category
as the usual autopkgtest-explicitly-using-dbus-launch issues that
Maximiliano is taking care of.)
As described in <https://lists.debian.org/debian-devel/2016/08/msg00554.html>
I'm trying to reduce how much dbus-launch is used in Debian.
This package currently uses dbus-launch in one of its unit tests.
As far as I could tell, it leaks a dbus-daemon process, but I could be
wrong.
This is really an upstream bug - Debian doesn't currently seem to run
the tests, either at build time or from autopkgtest.
This Flatpak commit illustrates how eval `dbus-launch` can be replaced
by invoking dbus-daemon directly, avoiding the X11-specific dbus-launch:
<https://github.com/flatpak/flatpak/commit/6cc8062cfb3f9410d54a27e7ccca77c103e441e8>.
Directly executing dbus-daemon from C/C++ code can be done similarly,
for example in GLib-flavoured C in
<https://cgit.freedesktop.org/dbus/dbus/tree/test/test-utils-glib.c>
(search for "--print-address").
Alternatively, the test executable (I didn't check what executable this code
ended up in) could be run through dbus-run-session(1), which is available
since dbus 1.8, the upstream "old stable" branch available in Debian stable:
dbus-run-session -- some-test
Thanks,
S
Reply to: