gdbus-serialization: use check_serialization() instead of dbus-daemon
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 21 Apr 2015 19:46:47 +0000 (20:46 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 8 May 2015 15:03:57 +0000 (16:03 +0100)
commitf42d2c1b54541cf8d4e399f5c6d27d3ac40fc1a9
tree421a04175b2d10247a6e035413d072141f4965ce
parent23a5352cd8a1f247ac831ebada9dbc9f5d24476f
gdbus-serialization: use check_serialization() instead of dbus-daemon

This test originally did not connect to the bus, which meant it was
omitted from commits like 415a8d81 that made sure none of GLib tests
rely on the presence of an existing session bus. (In particular,
Debian autobuilders don't have a session bus.)

When test_double_array() was added, environments like the Debian
autobuilders didn't catch the fact that this test relied on having a
session bus, because it is often skipped in minimal environments
due to its libdbus-1 dependency.

We don't actually need to connect to a dbus-daemon here: it's enough
to convert the message from GVariant to D-Bus serialization, and
back into an in-memory representation through libdbus. That's what
check_serialization() does, and I've verified that when I re-introduce
bug #732754 by reverting commits 627b49b and 2268628 locally, this
test still fails.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=744895
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
gio/tests/gdbus-serialization.c