GNOME Bugzilla – Bug 697261
incomplete GTestDBus sandboxing
Last modified: 2013-08-23 17:35:04 UTC
I recently upgraded to GNOME 3.8 from Debian experimental (as opposed to the pile of installations-from-source I was previously using) and now the Folks tests fail: * GIO tries to activate gvfs, which isn't available because the GTestDBus environment has no service-activation by default * the Telepathy bits try to use the "starter bus" which points to the real session, so they can't take the AccountManager bus name Workaround: run them with: GIO_USE_VFS=local DBUS_STARTER_ADDRESS= DBUS_STARTER_BUS_TYPE= \ DBUS_SESSION_BUS_ADDRESS= I'll add those to the test-case base class (arguably, GTestDBus should do at least some of that, though).
Created attachment 240623 [details] [review] tracker tests: do not request starting all Tracker services We don't care about tracker-miner-fs etc. for these tests; all we want to do is stop any running Tracker stuff. D-Bus service activation will ensure that we get the necessary services when they're needed, without starting the unnecessary ones. (This fixes the Tracker tests on a system without tracker-miner-fs.)
Created attachment 240624 [details] [review] all tests: disable non-local GIO VFS backends, such as gvfs
Created attachment 240625 [details] [review] tests: clear out various D-Bus-related variables The actual terminal in gnome-terminal 3.8 is an activatable service, so it has DBUS_STARTER_ADDRESS in its environment. telepathy-glib prefers DBUS_STARTER_ADDRESS over DBUS_SESSION_BUS_ADDRESS, but GTestDBus doesn't clear or set the former, only the latter; so we end up trying to use the real bus when run under a recent gnome-terminal. See also <https://bugs.freedesktop.org/show_bug.cgi?id=63119>.
Created attachment 240626 [details] [review] Do not distribute _gen/param-spec-struct.h in tarballs or scan it with g-i It isn't self-contained, and provokes a (non-fatal) syntax error from g-ir-scanner.
Review of attachment 240623 [details] [review]: ++
Review of attachment 240624 [details] [review]: ++
Review of attachment 240625 [details] [review]: Have you filed a bug against GTestDBus for this? The patch looks good, but if you do file a bug against GTestDBus, please add a FIXME referencing it. Thanks!
Review of attachment 240626 [details] [review]: I don’t know this bit of the code base well enough to review this properly; but it’s copied from Telepathy so I defer to your expertise.
Comment on attachment 240623 [details] [review] tracker tests: do not request starting all Tracker services 53337413f
Comment on attachment 240624 [details] [review] all tests: disable non-local GIO VFS backends, such as gvfs bfab3ee2
Comment on attachment 240625 [details] [review] tests: clear out various D-Bus-related variables 1322054
(In reply to comment #7) > Have you filed a bug against GTestDBus for this? The patch looks good, but if > you do file a bug against GTestDBus, please add a FIXME referencing it. Thanks! For reference, bug #697348 has been filed against GTestDBus. (In reply to comment #8) > Review of attachment 240626 [details] [review]: > > I don’t know this bit of the code base well enough to review this properly; but > it’s copied from Telepathy so I defer to your expertise. i.e. “Please commit it if you think it’s the right fix”.
(In reply to comment #12) > i.e. “Please commit it if you think it’s the right fix”. Committed for 0.9.6.