30574 test: don't leak two messages and a pending call per run

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
test-client: don't leak NodeInfo and one proxy

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
test-client: wait for disconnection, to get more state freed

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
interfaces test: don't call an undefined function on failure, just use set -e

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
registrations test: bin some unused variables

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
test-variant-recursion: free our GValues and the output string correctly

Previously, if we'd freed the GValues, it would have crashed, because
g_value_take_boxed on a value of type G_TYPE_VALUE requires that the inner
GValue was g_malloc'd individually, but we were allocating them as a
block. This only "worked" because *none* of them were freed...

The returned string was also leaked; free it too, but only on success.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
test-variant-recursion: use a private bus so we can free it more thoroughly

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
30574 test: use a private bus so we can free it more thoroughly

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
registrations test: run the connections to completion and call dbus_shutdown

This frees more of the memory.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
test-types: use a private bus, and close it afterwards

This frees more of the memory.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Separate the test for shared-bus equivalence into its own binary

When valgrinding tests it's useful to avoid using the shared bus, which
cannot be closed. Move all the essential shared-bus use into a test which
can be treated specially.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
test-dbus-glib: free numerous leaked objects, and clean up more thoroughly

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Add infrastructure for running tests under valgrind

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Add a list of Valgrind suppressions for false-positives

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Fix yet another leak, this one caused by poor documentation (#29195)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
dbus_g_value_build_g_variant(): Fix NULL strv case

g_variant_new_strv(NULL, -1) is not accepted, but (NULL, 0) is good.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71811
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
dbus_g_value_build_g_variant(): Fix NULL string case

g_variant_new_string(NULL) is not accepted.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71811
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
dbus-binding-tool: check for valid interface, member and property names

Properties are currently allowed to be arbitrary UTF-8 since this matches
dbus-glib's runtime behaviour, although ideally new interfaces should
use the more restrictive member naming rules (leading to names like
MyProperty) for interop with QtDBus.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=7909
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>