summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/twisted/Makefile.am25
-rw-r--r--test/twisted/account-bad-cm.py59
-rw-r--r--test/twisted/constants.py107
-rw-r--r--test/twisted/do-nothing.py8
-rw-r--r--test/twisted/managers/fakecm.manager7
-rw-r--r--test/twisted/mc-debug-server.c120
-rw-r--r--test/twisted/telepathy/clients/README (renamed from test/twisted/clients/README)0
-rw-r--r--test/twisted/telepathy/managers/README (renamed from test/twisted/managers/README)0
-rw-r--r--test/twisted/telepathy/managers/fakecm.manager15
-rw-r--r--test/twisted/test-account.py122
-rw-r--r--test/twisted/test-connect.py68
-rw-r--r--test/twisted/tools/Makefile.am6
-rw-r--r--test/twisted/tools/exec-with-log.sh.in20
-rw-r--r--test/twisted/tools/valgrind.supp871
14 files changed, 1341 insertions, 87 deletions
diff --git a/test/twisted/Makefile.am b/test/twisted/Makefile.am
index ecf4fb84..78397034 100644
--- a/test/twisted/Makefile.am
+++ b/test/twisted/Makefile.am
@@ -1,8 +1,24 @@
TWISTED_TESTS =
TWISTED_BASIC_TESTS = \
- test-account.py \
- test-connect.py
+ account-bad-cm.py \
+ do-nothing.py \
+ test-account.py \
+ test-connect.py
+
+# A debug version of the normal MC executable, which exits cleanly on
+# disconnection from D-Bus (so gcov info gets written out)
+noinst_PROGRAMS = mc-debug-server
+mc_debug_server_SOURCES = mc-debug-server.c
+mc_debug_server_LDADD = $(top_builddir)/src/libmissioncontrol-server.la
+
+INCLUDES = \
+ -I$(top_srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/src -I$(top_builddir)/src \
+ $(DBUS_CFLAGS) \
+ $(TELEPATHY_CFLAGS) \
+ -DMC_DISABLE_DEPRECATED \
+ -DLIBDIR="@libdir@" -DLIBVERSION="0"
TESTS =
@@ -28,12 +44,17 @@ check-twisted:
EXTRA_DIST = \
$(TWISTED_BASIC_TESTS) \
+ telepathy/clients/README \
+ telepathy/managers/fakecm.manager \
+ telepathy/managers/README \
+ constants.py \
fakeclient.py \
fakecm.py \
mctest.py \
servicetest.py
CLEANFILES = \
+ accounts/accounts.cfg \
mc-[1-9]*.log \
*.pyc \
*/*.pyc \
diff --git a/test/twisted/account-bad-cm.py b/test/twisted/account-bad-cm.py
new file mode 100644
index 00000000..d41a5e1c
--- /dev/null
+++ b/test/twisted/account-bad-cm.py
@@ -0,0 +1,59 @@
+print "Skipping test that is known to fail:"
+print " http://bugs.freedesktop.org/show_bug.cgi?id=20880"
+raise SystemExit(77)
+
+import dbus
+
+from servicetest import EventPattern, tp_name_prefix, tp_path_prefix, \
+ call_async
+from fakecm import start_fake_connection_manager
+from mctest import exec_test
+import constants as cs
+
+FakeCM_bus_name = "com.example.FakeCM"
+ConnectionManager_object_path = "/com/example/FakeCM/ConnectionManager"
+
+
+def test(q, bus, mc):
+ # Get the AccountManager interface
+ account_manager = bus.get_object(cs.AM, cs.AM_PATH)
+ account_manager_iface = dbus.Interface(account_manager, cs.AM)
+
+ # Create an account with a bad Connection_Manager - it should fail
+
+ params = dbus.Dictionary({"account": "someguy@example.com",
+ "password": "secrecy"}, signature='sv')
+ call_async(q, account_manager_iface, 'CreateAccount',
+ 'nonexistent_cm', # Connection_Manager
+ 'fakeprotocol', # Protocol
+ 'fakeaccount', #Display_Name
+ params, # Parameters
+ )
+ q.expect('dbus-error', method='CreateAccount')
+
+ # Create an account with a bad Protocol - it should fail
+
+ params = dbus.Dictionary({"account": "someguy@example.com",
+ "password": "secrecy"}, signature='sv')
+ call_async(q, account_manager_iface, 'CreateAccount',
+ 'fakecm', # Connection_Manager
+ 'nonexistent-protocol', # Protocol
+ 'fakeaccount', #Display_Name
+ params, # Parameters
+ )
+ q.expect('dbus-error', method='CreateAccount')
+
+ # Create an account with incomplete Parameters - it should fail
+
+ params = dbus.Dictionary({"account": "someguy@example.com"},
+ signature='sv')
+ call_async(q, account_manager_iface, 'CreateAccount',
+ 'fakecm', # Connection_Manager
+ 'fakeprotocol', # Protocol
+ 'fakeaccount', #Display_Name
+ params, # Parameters
+ )
+ q.expect('dbus-error', method='CreateAccount')
+
+if __name__ == '__main__':
+ exec_test(test, {})
diff --git a/test/twisted/constants.py b/test/twisted/constants.py
new file mode 100644
index 00000000..ed486ce1
--- /dev/null
+++ b/test/twisted/constants.py
@@ -0,0 +1,107 @@
+"""
+Some handy constants for other tests to share and enjoy.
+"""
+
+from dbus import PROPERTIES_IFACE, INTROSPECTABLE_IFACE
+from servicetest import tp_name_prefix, tp_path_prefix
+
+HT_CONTACT = 1
+HT_ROOM = 2
+
+CHANNEL = tp_name_prefix + ".Channel"
+CHANNEL_IFACE_GROUP = CHANNEL + ".Interface.Group"
+CHANNEL_IFACE_HOLD = CHANNEL + ".Interface.Hold"
+CHANNEL_IFACE_MEDIA_SIGNALLING = CHANNEL + ".Interface.MediaSignalling"
+CHANNEL_TYPE_TEXT = CHANNEL + ".Type.Text"
+CHANNEL_TYPE_TUBES = CHANNEL + ".Type.Tubes"
+CHANNEL_IFACE_TUBE = CHANNEL + ".Interface.Tube.DRAFT"
+CHANNEL_TYPE_STREAM_TUBE = CHANNEL + ".Type.StreamTube.DRAFT"
+CHANNEL_TYPE_DBUS_TUBE = CHANNEL + ".Type.DBusTube.DRAFT"
+CHANNEL_TYPE_STREAMED_MEDIA = CHANNEL + ".Type.StreamedMedia"
+CHANNEL_TYPE_TEXT = CHANNEL + ".Type.Text"
+
+TP_AWKWARD_PROPERTIES = tp_name_prefix + ".Properties"
+PROPERTY_FLAG_READ = 1
+PROPERTY_FLAG_WRITE = 2
+
+CHANNEL_TYPE = CHANNEL + '.ChannelType'
+TARGET_HANDLE_TYPE = CHANNEL + '.TargetHandleType'
+TARGET_HANDLE = CHANNEL + '.TargetHandle'
+TARGET_ID = CHANNEL + '.TargetID'
+REQUESTED = CHANNEL + '.Requested'
+INITIATOR_HANDLE = CHANNEL + '.InitiatorHandle'
+INITIATOR_ID = CHANNEL + '.InitiatorID'
+INTERFACES = CHANNEL + '.Interfaces'
+
+CONN = tp_name_prefix + ".Connection"
+CONN_IFACE_CONTACTS = CONN + '.Interface.Contacts'
+CONN_IFACE_CONTACT_CAPA = CONN + '.Interface.ContactCapabilities.DRAFT'
+CONN_IFACE_REQUESTS = CONN + '.Interface.Requests'
+
+ERROR = tp_name_prefix + '.Error'
+INVALID_ARGUMENT = ERROR + '.InvalidArgument'
+NOT_IMPLEMENTED = ERROR + '.NotImplemented'
+NOT_AVAILABLE = ERROR + '.NotAvailable'
+PERMISSION_DENIED = ERROR + '.PermissionDenied'
+
+TUBE_PARAMETERS = CHANNEL_IFACE_TUBE + '.Parameters'
+TUBE_STATE = CHANNEL_IFACE_TUBE + '.State'
+STREAM_TUBE_SERVICE = CHANNEL_TYPE_STREAM_TUBE + '.Service'
+DBUS_TUBE_SERVICE_NAME = CHANNEL_TYPE_DBUS_TUBE + '.ServiceName'
+DBUS_TUBE_DBUS_NAMES = CHANNEL_TYPE_DBUS_TUBE + '.DBusNames'
+
+TUBE_CHANNEL_STATE_LOCAL_PENDING = 0
+TUBE_CHANNEL_STATE_REMOTE_PENDING = 1
+TUBE_CHANNEL_STATE_OPEN = 2
+TUBE_CHANNEL_STATE_NOT_OFFERED = 3
+
+MEDIA_STREAM_TYPE_AUDIO = 0
+MEDIA_STREAM_TYPE_VIDEO = 1
+
+SOCKET_ADDRESS_TYPE_UNIX = 0
+SOCKET_ADDRESS_TYPE_ABSTRACT_UNIX = 1
+SOCKET_ADDRESS_TYPE_IPV4 = 2
+SOCKET_ADDRESS_TYPE_IPV6 = 3
+
+SOCKET_ACCESS_CONTROL_LOCALHOST = 0
+SOCKET_ACCESS_CONTROL_PORT = 1
+SOCKET_ACCESS_CONTROL_NETMASK = 2
+SOCKET_ACCESS_CONTROL_CREDENTIALS = 3
+
+TUBE_STATE_LOCAL_PENDING = 0
+TUBE_STATE_REMOTE_PENDING = 1
+TUBE_STATE_OPEN = 2
+TUBE_STATE_NOT_OFFERED = 3
+
+TUBE_TYPE_DBUS = 0
+TUBE_TYPE_STREAM = 1
+
+MEDIA_STREAM_DIRECTION_NONE = 0
+MEDIA_STREAM_DIRECTION_SEND = 1
+MEDIA_STREAM_DIRECTION_RECEIVE = 2
+MEDIA_STREAM_DIRECTION_BIDIRECTIONAL = 3
+
+MEDIA_STREAM_PENDING_LOCAL_SEND = 1
+MEDIA_STREAM_PENDING_REMOTE_SEND = 2
+
+MEDIA_STREAM_TYPE_AUDIO = 0
+MEDIA_STREAM_TYPE_VIDEO = 1
+
+MEDIA_STREAM_STATE_DISCONNECTED = 0
+MEDIA_STREAM_STATE_CONNECTING = 1
+MEDIA_STREAM_STATE_CONNECTED = 2
+
+MEDIA_STREAM_DIRECTION_NONE = 0
+MEDIA_STREAM_DIRECTION_SEND = 1
+MEDIA_STREAM_DIRECTION_RECEIVE = 2
+MEDIA_STREAM_DIRECTION_BIDIRECTIONAL = 3
+
+ACCOUNT = tp_name_prefix + '.Account'
+ACCOUNT_IFACE_AVATAR = ACCOUNT + '.Interface.Avatar'
+ACCOUNT_IFACE_NOKIA_COMPAT = ACCOUNT + '.Interface.Compat'
+ACCOUNT_IFACE_NOKIA_CONDITIONS = 'com.nokia.Account.Interface.Conditions'
+
+AM = tp_name_prefix + '.AccountManager'
+AM_IFACE_CREATION_DRAFT = AM + '.Interface.Creation.DRAFT'
+AM_IFACE_NOKIA_QUERY = 'com.nokia.AccountManager.Interface.Query'
+AM_PATH = tp_path_prefix + '/AccountManager'
diff --git a/test/twisted/do-nothing.py b/test/twisted/do-nothing.py
new file mode 100644
index 00000000..f8740175
--- /dev/null
+++ b/test/twisted/do-nothing.py
@@ -0,0 +1,8 @@
+from mctest import exec_test
+
+def test(q, bus, mc):
+ pass
+
+
+if __name__ == '__main__':
+ exec_test(test, {})
diff --git a/test/twisted/managers/fakecm.manager b/test/twisted/managers/fakecm.manager
deleted file mode 100644
index 60a45cf5..00000000
--- a/test/twisted/managers/fakecm.manager
+++ /dev/null
@@ -1,7 +0,0 @@
-[ConnectionManager]
-BusName=com.example.FakeCM
-ObjectPath=/com/example/FakeCM/ConnectionManager
-
-[Protocol fakeprotocol]
-param-nickname=s
-
diff --git a/test/twisted/mc-debug-server.c b/test/twisted/mc-debug-server.c
new file mode 100644
index 00000000..1bb640eb
--- /dev/null
+++ b/test/twisted/mc-debug-server.c
@@ -0,0 +1,120 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 8 -*- */
+/*
+ * This file is part of mission-control
+ *
+ * Copyright (C) 2007 Nokia Corporation.
+ *
+ * Contact: Naba Kumar <naba.kumar@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <glib.h>
+
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
+
+#include <telepathy-glib/debug.h>
+#include <telepathy-glib/util.h>
+
+#include "mcd-service.h"
+
+
+static void
+on_abort (McdService * mcd)
+{
+ g_debug ("Exiting now ...");
+
+ mcd_debug_print_tree (mcd);
+
+ g_object_unref (mcd);
+ g_debug ("MC now exits .. bye bye");
+ exit (0);
+}
+
+static DBusHandlerResult
+dbus_filter_function (DBusConnection *connection,
+ DBusMessage *message,
+ void *user_data)
+{
+ if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected") &&
+ !tp_strdiff (dbus_message_get_path (message), DBUS_PATH_LOCAL))
+ {
+ g_message ("Got disconnected from the session bus");
+ exit (69); /* EX_UNAVAILABLE */
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+int
+main (int argc, char **argv)
+{
+ TpDBusDaemon *bus_daemon = NULL;
+ McdService *mcd = NULL;
+ GError *error = NULL;
+ DBusConnection *connection;
+ int ret = 1;
+
+ g_type_init ();
+
+ mcd_debug_init ();
+ tp_debug_set_flags (g_getenv ("MC_TP_DEBUG"));
+
+ bus_daemon = tp_dbus_daemon_dup (&error);
+
+ if (bus_daemon == NULL)
+ {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ error = NULL;
+ goto out;
+ }
+
+ /* It appears that dbus-glib registers a filter that wrongly returns
+ * DBUS_HANDLER_RESULT_HANDLED for signals, so for *our* filter to have any
+ * effect, we need to install it as soon as possible */
+ connection = dbus_g_connection_get_connection (
+ ((TpProxy *) bus_daemon)->dbus_connection);
+ dbus_connection_add_filter (connection, dbus_filter_function, NULL, NULL);
+
+ mcd = mcd_service_new ();
+
+ /* Listen for suicide notification */
+ g_signal_connect_after (mcd, "abort", G_CALLBACK (on_abort), mcd);
+
+ /* connect */
+ mcd_mission_connect (MCD_MISSION (mcd));
+
+ /* MC initialization sets exit on disconnect - turn it off again, so we
+ * get a graceful exit from the above handler instead (to keep gcov
+ * happy) */
+ dbus_connection_set_exit_on_disconnect (connection, FALSE);
+
+ mcd_service_run (MCD_OBJECT (mcd));
+
+ ret = 0;
+
+out:
+ if (bus_daemon != NULL)
+ {
+ g_object_unref (bus_daemon);
+ }
+
+ return ret;
+}
diff --git a/test/twisted/clients/README b/test/twisted/telepathy/clients/README
index 7b725bf9..7b725bf9 100644
--- a/test/twisted/clients/README
+++ b/test/twisted/telepathy/clients/README
diff --git a/test/twisted/managers/README b/test/twisted/telepathy/managers/README
index d77437cb..d77437cb 100644
--- a/test/twisted/managers/README
+++ b/test/twisted/telepathy/managers/README
diff --git a/test/twisted/telepathy/managers/fakecm.manager b/test/twisted/telepathy/managers/fakecm.manager
new file mode 100644
index 00000000..23a074e5
--- /dev/null
+++ b/test/twisted/telepathy/managers/fakecm.manager
@@ -0,0 +1,15 @@
+[ConnectionManager]
+BusName=com.example.FakeCM
+ObjectPath=/com/example/FakeCM/ConnectionManager
+
+[Protocol fakeprotocol]
+param-account=s register required
+param-password=s register required secret
+param-nickname=s register
+param-register=b
+param-com.example.Badgerable.Badgered=b dbus-property
+param-secret-mushroom=s
+param-snakes=u
+default-register=0
+default-com.example.Badgerable.Badgered=0
+default-snakes=1
diff --git a/test/twisted/test-account.py b/test/twisted/test-account.py
index c9be1f2e..a49c0b74 100644
--- a/test/twisted/test-account.py
+++ b/test/twisted/test-account.py
@@ -1,8 +1,10 @@
import dbus
-from servicetest import EventPattern, tp_name_prefix, tp_path_prefix
+from servicetest import EventPattern, tp_name_prefix, tp_path_prefix, \
+ call_async
from fakecm import start_fake_connection_manager
from mctest import exec_test
+import constants as cs
FakeCM_bus_name = "com.example.FakeCM"
ConnectionManager_object_path = "/com/example/FakeCM/ConnectionManager"
@@ -10,46 +12,51 @@ ConnectionManager_object_path = "/com/example/FakeCM/ConnectionManager"
def test(q, bus, mc):
# Get the AccountManager interface
- account_manager = bus.get_object(
- tp_name_prefix + '.AccountManager',
- tp_path_prefix + '/AccountManager')
- account_manager_iface = dbus.Interface(account_manager,
- 'org.freedesktop.Telepathy.AccountManager')
+ account_manager = bus.get_object(cs.AM, cs.AM_PATH)
+ account_manager_iface = dbus.Interface(account_manager, cs.AM)
# Introspect AccountManager for debugging purpose
account_manager_introspected = account_manager.Introspect(
- dbus_interface='org.freedesktop.DBus.Introspectable')
+ dbus_interface=cs.INTROSPECTABLE_IFACE)
#print account_manager_introspected
# Check AccountManager has D-Bus property interface
- properties = account_manager.GetAll(
- 'org.freedesktop.Telepathy.AccountManager',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account_manager.GetAll(cs.AM,
+ dbus_interface=cs.PROPERTIES_IFACE)
assert properties is not None
- assert properties.get('Interfaces') == [
- 'org.freedesktop.Telepathy.AccountManager',
- 'com.nokia.AccountManager.Interface.Query',
- 'org.freedesktop.Telepathy.AccountManager.Interface.Creation.DRAFT'
- ], properties.get('Interfaces')
assert properties.get('ValidAccounts') == [], \
properties.get('ValidAccounts')
assert properties.get('InvalidAccounts') == [], \
properties.get('InvalidAccounts')
+ interfaces = properties.get('Interfaces')
+
+ # assert that current functionality exists
+ assert cs.AM_IFACE_CREATION_DRAFT in interfaces, interfaces
+ assert cs.AM_IFACE_NOKIA_QUERY in interfaces, interfaces
# Create an account
- params = dbus.Dictionary({"nickname": "fakenick"}, signature='sv')
- account_path = account_manager_iface.CreateAccount(
+ params = dbus.Dictionary({"account": "someguy@example.com",
+ "password": "secrecy"}, signature='sv')
+ call_async(q, account_manager_iface, 'CreateAccount',
'fakecm', # Connection_Manager
'fakeprotocol', # Protocol
'fakeaccount', #Display_Name
params, # Parameters
)
+ # the spec has no order guarantee here
+ signal, ret = q.expect_many(
+ EventPattern('dbus-signal', path=cs.AM_PATH,
+ signal='AccountValidityChanged', interface=cs.AM),
+ EventPattern('dbus-return', method='CreateAccount'),
+ )
+ account_path = ret.value[0]
+ assert signal.args == [account_path, True], signal.args
+
assert account_path is not None
# Check the account is correctly created
- properties = account_manager.GetAll(
- 'org.freedesktop.Telepathy.AccountManager',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account_manager.GetAll(cs.AM,
+ dbus_interface=cs.PROPERTIES_IFACE)
assert properties is not None
assert properties.get('ValidAccounts') == [account_path], properties
account_path = properties['ValidAccounts'][0]
@@ -60,26 +67,17 @@ def test(q, bus, mc):
account = bus.get_object(
tp_name_prefix + '.AccountManager',
account_path)
- account_iface = dbus.Interface(account,
- 'org.freedesktop.Telepathy.Account')
+ account_iface = dbus.Interface(account, cs.ACCOUNT)
+ account_props = dbus.Interface(account, cs.PROPERTIES_IFACE)
# Introspect Account for debugging purpose
account_introspected = account.Introspect(
- dbus_interface='org.freedesktop.DBus.Introspectable')
+ dbus_interface=cs.INTROSPECTABLE_IFACE)
#print account_introspected
# Check Account has D-Bus property interface
- properties = account.GetAll(
- 'org.freedesktop.Telepathy.Account',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account_props.GetAll(cs.ACCOUNT)
assert properties is not None
- assert 'org.freedesktop.Telepathy.Account' \
- in properties.get('Interfaces'), properties.get('Interfaces')
- assert 'org.freedesktop.Telepathy.Account.Interface.Avatar' \
- in properties.get('Interfaces'), properties.get('Interfaces')
- assert 'org.freedesktop.Telepathy.Account.Interface.Compat' \
- in properties.get('Interfaces'), properties.get('Interfaces')
- assert 'com.nokia.Account.Interface.Conditions' \
- in properties.get('Interfaces'), properties.get('Interfaces')
+
assert properties.get('DisplayName') == 'fakeaccount', \
properties.get('DisplayName')
assert properties.get('Icon') == '', properties.get('Icon')
@@ -91,27 +89,71 @@ def test(q, bus, mc):
assert properties.get('NormalizedName') == '', \
properties.get('NormalizedName')
+ interfaces = properties.get('Interfaces')
+ assert cs.ACCOUNT_IFACE_AVATAR in interfaces, interfaces
+ assert cs.ACCOUNT_IFACE_NOKIA_COMPAT in interfaces, interfaces
+ assert cs.ACCOUNT_IFACE_NOKIA_CONDITIONS in interfaces, interfaces
+
+ # sanity check
+ for k in properties:
+ assert account_props.Get(cs.ACCOUNT, k) == properties[k], k
+
+ # Alter some miscellaneous r/w properties
+
+ call_async(q, account_props, 'Set', cs.ACCOUNT, 'DisplayName',
+ 'Work account')
+ q.expect_many(
+ EventPattern('dbus-signal',
+ path=account_path,
+ signal='AccountPropertyChanged',
+ interface=cs.ACCOUNT,
+ args=[{'DisplayName': 'Work account'}]),
+ EventPattern('dbus-return', method='Set'),
+ )
+ assert account_props.Get(cs.ACCOUNT, 'DisplayName') == 'Work account'
+
+ call_async(q, account_props, 'Set', cs.ACCOUNT, 'Icon', 'im-jabber')
+ q.expect_many(
+ EventPattern('dbus-signal',
+ path=account_path,
+ signal='AccountPropertyChanged',
+ interface=cs.ACCOUNT,
+ args=[{'Icon': 'im-jabber'}]),
+ EventPattern('dbus-return', method='Set'),
+ )
+ assert account_props.Get(cs.ACCOUNT, 'Icon') == 'im-jabber'
+
+ call_async(q, account_props, 'Set', cs.ACCOUNT, 'Nickname', 'Joe Bloggs')
+ q.expect_many(
+ EventPattern('dbus-signal',
+ path=account_path,
+ signal='AccountPropertyChanged',
+ interface=cs.ACCOUNT,
+ args=[{'Nickname': 'Joe Bloggs'}]),
+ EventPattern('dbus-return', method='Set'),
+ )
+ assert account_props.Get(cs.ACCOUNT, 'Nickname') == 'Joe Bloggs'
+
# Delete the account
assert account_iface.Remove() is None
account_event, account_manager_event = q.expect_many(
EventPattern('dbus-signal',
path=account_path,
signal='Removed',
- interface='org.freedesktop.Telepathy.Account',
+ interface=cs.ACCOUNT,
args=[]
),
EventPattern('dbus-signal',
- path=tp_path_prefix + '/AccountManager',
+ path=cs.AM_PATH,
signal='AccountRemoved',
- interface='org.freedesktop.Telepathy.AccountManager',
+ interface=cs.AM,
args=[account_path]
),
)
# Check the account is correctly deleted
- properties = account_manager.GetAll(
- 'org.freedesktop.Telepathy.AccountManager',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account_manager.GetAll(cs.AM,
+ dbus_interface=cs.PROPERTIES_IFACE)
assert properties is not None
assert properties.get('ValidAccounts') == [], properties
assert properties.get('InvalidAccounts') == [], properties
diff --git a/test/twisted/test-connect.py b/test/twisted/test-connect.py
index dbb60739..f43cb21f 100644
--- a/test/twisted/test-connect.py
+++ b/test/twisted/test-connect.py
@@ -4,14 +4,13 @@ from servicetest import EventPattern, tp_name_prefix, tp_path_prefix
from fakecm import start_fake_connection_manager
from fakeclient import start_fake_client
from mctest import exec_test
+import constants as cs
-FakeCM_bus_name = "org.freedesktop.Telepathy.ConnectionManager.fakecm"
-ConnectionManager_object_path = \
- "/org/freedesktop/Telepathy/ConnectionManager/fakecm"
+FakeCM_bus_name = tp_name_prefix + ".ConnectionManager.fakecm"
+ConnectionManager_object_path = tp_path_prefix + "/ConnectionManager/fakecm"
-FakeClient_bus_name = "org.freedesktop.Telepathy.Client.fakeclient"
-Client_object_path = \
- "/org/freedesktop/Telepathy/Client/fakeclient"
+FakeClient_bus_name = tp_name_prefix + ".Client.fakeclient"
+Client_object_path = tp_path_prefix + "/Client/fakeclient"
def test(q, bus, mc):
@@ -19,10 +18,9 @@ def test(q, bus, mc):
ConnectionManager_object_path)
http_fixed_properties = dbus.Dictionary({
- 'org.freedesktop.Telepathy.Channel.TargetHandleType': 1L,
- 'org.freedesktop.Telepathy.Channel.ChannelType':
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT',
- 'org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service':
+ cs.CHANNEL + '.TargetHandleType': 1L,
+ cs.CHANNEL + '.ChannelType': cs.CHANNEL_TYPE_STREAM_TUBE,
+ cs.CHANNEL_TYPE_STREAM_TUBE + '.Service':
'http'
}, signature='sv')
caps = dbus.Array([http_fixed_properties], signature='a{sv}')
@@ -31,14 +29,12 @@ def test(q, bus, mc):
Client_object_path, caps)
# Get the AccountManager interface
- account_manager = bus.get_object(
- tp_name_prefix + '.AccountManager',
- tp_path_prefix + '/AccountManager')
- account_manager_iface = dbus.Interface(account_manager,
- 'org.freedesktop.Telepathy.AccountManager')
+ account_manager = bus.get_object(cs.AM, cs.AM_PATH)
+ account_manager_iface = dbus.Interface(account_manager, cs.AM)
# Create an account
- params = dbus.Dictionary({"nickname": "fakenick"}, signature='sv')
+ params = dbus.Dictionary({"account": "someguy@example.com",
+ "password": "secrecy"}, signature='sv')
account_path = account_manager_iface.CreateAccount(
'fakecm', # Connection_Manager
'fakeprotocol', # Protocol
@@ -51,23 +47,30 @@ def test(q, bus, mc):
account = bus.get_object(
tp_name_prefix + '.AccountManager',
account_path)
- account_iface = dbus.Interface(account,
- 'org.freedesktop.Telepathy.Account')
+ account_iface = dbus.Interface(account, cs.ACCOUNT)
+
+ # The account is initially valid but disabled
+ assert not account.Get(cs.ACCOUNT, 'Enabled',
+ dbus_interface=cs.PROPERTIES_IFACE)
+ assert account.Get(cs.ACCOUNT, 'Valid',
+ dbus_interface=cs.PROPERTIES_IFACE)
# Enable the account
- account.Set('org.freedesktop.Telepathy.Account',
- 'Enabled', True,
- dbus_interface='org.freedesktop.DBus.Properties')
+ account.Set(cs.ACCOUNT, 'Enabled', True,
+ dbus_interface=cs.PROPERTIES_IFACE)
q.expect('dbus-signal',
path=account_path,
signal='AccountPropertyChanged',
- interface='org.freedesktop.Telepathy.Account',
- args=[dbus.Dictionary({"Enabled": True}, signature='sv')])
+ interface=cs.ACCOUNT)
+
+ assert account.Get(cs.ACCOUNT, 'Enabled',
+ dbus_interface=cs.PROPERTIES_IFACE)
+ assert account.Get(cs.ACCOUNT, 'Valid',
+ dbus_interface=cs.PROPERTIES_IFACE)
# Check the requested presence is offline
- properties = account.GetAll(
- 'org.freedesktop.Telepathy.Account',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account.GetAll(cs.ACCOUNT,
+ dbus_interface=cs.PROPERTIES_IFACE)
assert properties is not None
# the requested presence is defined by Connection_Presence_Type:
# Connection_Presence_Type_Unset = 0
@@ -80,9 +83,9 @@ def test(q, bus, mc):
# Go online
requested_presence = dbus.Struct((dbus.UInt32(2L), dbus.String(u'brb'),
dbus.String(u'Be back soon!')))
- account.Set('org.freedesktop.Telepathy.Account',
+ account.Set(cs.ACCOUNT,
'RequestedPresence', requested_presence,
- dbus_interface='org.freedesktop.DBus.Properties')
+ dbus_interface=cs.PROPERTIES_IFACE)
e = q.expect('dbus-method-call', name='RequestConnection',
protocol='fakeprotocol')
@@ -98,17 +101,16 @@ def test(q, bus, mc):
assert e.caps == caps, e.caps
# Check the requested presence is online
- properties = account.GetAll(
- 'org.freedesktop.Telepathy.Account',
- dbus_interface='org.freedesktop.DBus.Properties')
+ properties = account.GetAll(cs.ACCOUNT,
+ dbus_interface=cs.PROPERTIES_IFACE)
assert properties is not None
assert properties.get('RequestedPresence') == requested_presence, \
properties.get('RequestedPresence')
new_channel = http_fixed_properties
handle = fake_conn.get_handle("buddy")
- new_channel['org.freedesktop.Telepathy.Channel.TargetID'] = "buddy"
- new_channel['org.freedesktop.Telepathy.Channel.TargetHandle'] = handle
+ new_channel[cs.CHANNEL + '.TargetID'] = "buddy"
+ new_channel[cs.CHANNEL + '.TargetHandle'] = handle
fake_conn.new_incoming_channel('/foobar', new_channel)
diff --git a/test/twisted/tools/Makefile.am b/test/twisted/tools/Makefile.am
index 633fee96..b5ade2ce 100644
--- a/test/twisted/tools/Makefile.am
+++ b/test/twisted/tools/Makefile.am
@@ -1,5 +1,7 @@
-exec-with-log.sh: exec-with-log.sh.in
- sed -e "s|[@]abs_top_builddir[@]|@abs_top_builddir@|g" $< > $@
+exec-with-log.sh: exec-with-log.sh.in Makefile
+ sed -e "s|[@]abs_top_srcdir[@]|@abs_top_srcdir@|g" \
+ -e "s|[@]abs_top_builddir[@]|@abs_top_builddir@|g" \
+ $< > $@
chmod +x $@
%.conf: %.conf.in
diff --git a/test/twisted/tools/exec-with-log.sh.in b/test/twisted/tools/exec-with-log.sh.in
index 0a44622e..afd808f6 100644
--- a/test/twisted/tools/exec-with-log.sh.in
+++ b/test/twisted/tools/exec-with-log.sh.in
@@ -4,10 +4,18 @@ cd "@abs_top_builddir@/test/twisted/tools"
# Run Mission Control in a private environment
export MC_DEBUG=2
+export MC_TP_DEBUG=all
export MC_CHANDLERS_DIR="@abs_top_builddir@/test/twisted/chandlers"
-export MC_CLIENTS_DIR="@abs_top_builddir@/test/twisted/clients"
-export MC_MANAGER_DIR="@abs_top_builddir@/test/twisted/managers"
export MC_ACCOUNT_DIR="@abs_top_builddir@/test/twisted/accounts"
+
+export XDG_DATA_HOME="@abs_top_builddir@/test/twisted"
+export XDG_DATA_DIRS="@abs_top_srcdir@/test/twisted"
+# FIXME: these two are probably superseded by XDG_DATA_*?
+export MC_CLIENTS_DIR="@abs_top_builddir@/test/twisted/telepathy/clients"
+export MC_MANAGER_DIR="@abs_top_builddir@/test/twisted/telepathy/managers"
+
+export G_DEBUG=fatal_criticals
+
#export MC_PROFILE_DIR=
ulimit -c unlimited
@@ -17,6 +25,10 @@ if test -n "$MISSIONCONTROL_TEST_VALGRIND"; then
export G_DEBUG=gc-friendly
export G_SLICE=always-malloc
MISSIONCONTROL_WRAPPER="valgrind --leak-check=full --num-callers=20"
+ MISSIONCONTROL_WRAPPER="$MISSIONCONTROL_WRAPPER --track-origins=yes"
+ MISSIONCONTROL_WRAPPER="$MISSIONCONTROL_WRAPPER -v"
+ MISSIONCONTROL_WRAPPER="$MISSIONCONTROL_WRAPPER --suppressions=@abs_top_srcdir@/test/twisted/tools/valgrind.supp"
+ MISSIONCONTROL_WRAPPER="$MISSIONCONTROL_WRAPPER --gen-suppressions=all"
elif test -n "$MISSIONCONTROL_TEST_REFDBG"; then
if test -z "$REFDBG_OPTIONS" ; then
export REFDBG_OPTIONS="btnum=10"
@@ -37,4 +49,6 @@ if [ -e "@abs_top_builddir@/test/twisted/accounts/accounts.cfg" ] ; then
exit 1
fi
-exec $MISSIONCONTROL_WRAPPER @abs_top_builddir@/server/mission-control
+exec @abs_top_builddir@/libtool --mode=execute \
+ $MISSIONCONTROL_WRAPPER \
+ @abs_top_builddir@/test/twisted/mc-debug-server
diff --git a/test/twisted/tools/valgrind.supp b/test/twisted/tools/valgrind.supp
new file mode 100644
index 00000000..5f757601
--- /dev/null
+++ b/test/twisted/tools/valgrind.supp
@@ -0,0 +1,871 @@
+# Valgrind error suppression file
+{
+ dbus-glib, https://bugs.freedesktop.org/show_bug.cgi?id=14125
+ Memcheck:Addr4
+ fun:g_hash_table_foreach
+ obj:/usr/lib/libdbus-glib-1.so.2.1.0
+ fun:g_object_run_dispose
+}
+
+{
+ libdbus shared connection via tp_get_bus (1)
+ Memcheck:Leak
+ fun:malloc
+ fun:dbus_malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (1)
+ Memcheck:Leak
+ fun:malloc
+ fun:dbus_malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (2)
+ Memcheck:Leak
+ fun:calloc
+ fun:dbus_malloc0
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (2)
+ Memcheck:Leak
+ fun:calloc
+ fun:dbus_malloc0
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (3)
+ Memcheck:Leak
+ fun:realloc
+ fun:dbus_realloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (3)
+ Memcheck:Leak
+ fun:realloc
+ fun:dbus_realloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (4)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (4)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (5)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (5)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (6)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (6)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (7)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (7)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (8)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (8)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (9)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (9)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (10)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (10)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (11)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (11)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (12)
+ Memcheck:Leak
+ fun:realloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (12)
+ Memcheck:Leak
+ fun:realloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (13. sigh.)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (13. sigh.)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (14)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (14)
+ Memcheck:Leak
+ fun:malloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ libdbus shared connection via tp_get_bus (15)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_get_bus
+}
+
+{
+ libdbus shared connection via tp_dbus_daemon_dup (15)
+ Memcheck:Leak
+ fun:calloc
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ obj:*/libdbus-1.so.*
+ fun:dbus_g_bus_get
+ fun:tp_dbus_daemon_dup
+}
+
+{
+ g_type_init cruft (1)
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ obj:/usr/lib/libgobject-2.0.so.*
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_init_with_debug_flags
+ fun:g_type_init
+ fun:main
+}
+
+{
+ g_type_init cruft (1), 2.16 version
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ obj:/usr/lib/libgobject-2.0.so.*
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_init_with_debug_flags
+ fun:g_type_init
+ fun:main
+}
+
+{
+ g_type_init cruft (3)
+ Memcheck:Leak
+ fun:realloc
+ fun:g_realloc
+ obj:/usr/lib/libgobject-2.0.so.*
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_register_static
+ fun:g_param_type_register_static
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_init_with_debug_flags
+ fun:g_type_init
+}
+
+{
+ g_type_init cruft (4)
+ Memcheck:Leak
+ fun:realloc
+ fun:g_realloc
+ fun:g_boxed_type_register_static
+ fun:g_value_array_get_type
+ fun:g_param_spec_types_init
+ fun:g_type_init_with_debug_flags
+ fun:g_type_init
+}
+
+{
+ g_type_init cruft (5)
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ obj:/usr/lib/libgobject-2.0.so.*
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_init_with_debug_flags
+}
+
+{
+ g_type_init cruft (6)
+ Memcheck:Leak
+ fun:realloc
+ fun:g_realloc
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_register_static
+ fun:g_param_type_register_static
+ obj:/usr/lib/libgobject-2.0.so.*
+ fun:g_type_init_with_debug_flags
+}
+
+{
+ g_slice_init_nomessage (1)
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ obj:/usr/lib/libglib-2.0.so.*
+ fun:g_slice_alloc
+}
+
+{
+ creating param specs in tp_proxy_class_intern_init
+ Memcheck:Leak
+ fun:memalign
+ fun:posix_memalign
+ fun:slab_allocator_alloc_chunk
+ fun:g_slice_alloc
+ fun:g_slice_alloc0
+ fun:g_type_create_instance
+ fun:g_param_spec_internal
+ fun:g_param_spec_string
+}
+
+{
+ shared global default g_main_context (1)
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ fun:g_main_context_new
+ fun:g_main_context_default
+}
+
+{
+ shared global default g_main_context (2)
+ Memcheck:Leak
+ fun:memalign
+ fun:posix_memalign
+ fun:slab_allocator_alloc_chunk
+ fun:g_slice_alloc
+ fun:g_ptr_array_sized_new
+ fun:g_ptr_array_new
+ fun:g_main_context_new
+ fun:g_main_context_default
+}
+
+{
+ shared global default g_main_context (2) (with G_SLICE_DEBUG=always-malloc)
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_slice_alloc
+ fun:g_ptr_array_sized_new
+ fun:g_ptr_array_new
+ fun:g_main_context_new
+ fun:g_main_context_default
+}
+
+{
+ GQuarks can't be freed
+ Memcheck:Leak
+ fun:malloc
+ fun:realloc
+ fun:g_realloc
+ fun:g_quark_from_static_string
+}
+
+{
+ GQuark admin
+ Memcheck:Leak
+ fun:memalign
+ fun:posix_memalign
+ fun:slab_allocator_alloc_chunk
+ fun:g_slice_alloc
+ fun:g_hash_table_new_full
+ fun:g_hash_table_new
+ fun:g_quark_from_static_string
+}
+
+{
+ GQuark admin (with G_SLICE_DEBUG=always-malloc)
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_slice_alloc
+ fun:g_hash_table_new_full
+ fun:g_hash_table_new
+ fun:g_quark_from_static_string
+}
+
+{
+ GQuark admin (with G_SLICE_DEBUG=always-malloc and a slightly different glib than above)
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_slice_alloc
+ fun:g_hash_table_new_full
+ fun:g_quark_from_static_string
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code on glibc 2.7
+ Memcheck:Leak
+ fun:malloc
+ fun:local_strdup
+ fun:_dl_map_object
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code on older glibc
+ Memcheck:Leak
+ fun:malloc
+ fun:_dl_map_object
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code (2)
+ Memcheck:Leak
+ fun:malloc
+ fun:_dl_new_object
+ fun:_dl_map_object_from_fd
+ fun:_dl_map_object
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code (3)
+ Memcheck:Leak
+ fun:malloc
+ fun:_dl_map_object_deps
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code (4)
+ Memcheck:Leak
+ fun:calloc
+ fun:_dl_check_map_versions
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+ fun:pretend_connected
+ fun:g_timeout_dispatch
+ fun:g_main_context_dispatch
+ fun:g_main_context_iterate
+ fun:g_main_loop_run
+ fun:tp_connection_run_until_ready
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code (5)
+ Memcheck:Leak
+ fun:calloc
+ fun:_dl_new_object
+ fun:_dl_map_object_from_fd
+ fun:_dl_map_object
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ dlopen initialization, triggered by handle-leak-debug code (6)
+ Memcheck:Leak
+ fun:calloc
+ fun:_dl_check_map_versions
+ fun:dl_open_worker
+ fun:_dl_catch_error
+ fun:_dl_open
+ fun:do_dlopen
+ fun:_dl_catch_error
+ fun:dlerror_run
+ fun:__libc_dlopen_mode
+ fun:init
+ fun:backtrace
+ fun:handle_leak_debug_bt
+ fun:dynamic_ensure_handle
+ fun:tp_handle_ensure
+}
+
+{
+ ld.so initialization + selinux
+ Memcheck:Leak
+ fun:malloc
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ fun:call_init
+ fun:_dl_init
+ obj:/lib/ld-*.so
+}
+
+{
+ ld.so initialization + selinux
+ Memcheck:Leak
+ fun:malloc
+ fun:vasprintf
+ fun:asprintf
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ fun:call_init
+ fun:_dl_init
+ obj:/lib/ld-*.so
+}
+
+{
+ ld.so initialization + selinux
+ Memcheck:Leak
+ fun:realloc
+ fun:vasprintf
+ fun:asprintf
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ obj:/lib/libselinux.so.*
+ fun:call_init
+ fun:_dl_init
+ obj:/lib/ld-*.so
+}
+
+{
+ ld.so initialization on glibc 2.9
+ Memcheck:Cond
+ fun:_dl_relocate_object
+ fun:dl_main
+ fun:_dl_sysdep_start
+ fun:_dl_start
+ obj:/lib/ld-2.9.so
+}
+
+{
+ ld.so initialization on glibc 2.9
+ Memcheck:Cond
+ fun:strlen
+ fun:_dl_init_paths
+ fun:dl_main
+ fun:_dl_sysdep_start
+ fun:_dl_start
+ obj:/lib/ld-2.9.so
+}
+
+{
+ GTest initialization
+ Memcheck:Leak
+ fun:malloc
+ fun:g_malloc
+ fun:g_strdup
+ fun:g_set_prgname
+ fun:g_test_init
+ fun:main
+}
+
+{
+ GTest initialization
+ Memcheck:Leak
+ fun:calloc
+ fun:g_malloc0
+ fun:g_rand_new_with_seed_array
+ fun:g_rand_new
+ fun:g_random_int
+ fun:g_test_init
+ fun:main
+}
+
+{
+ GTest logging
+ Memcheck:Leak
+ fun:malloc
+ fun:realloc
+ fun:g_realloc
+ fun:g_array_maybe_expand
+ fun:g_array_set_size
+ fun:g_static_private_set
+ fun:g_get_charset
+ fun:g_print
+ fun:g_test_log
+ fun:g_test_run_suite_internal
+ fun:g_test_run_suite_internal
+ fun:g_test_run_suite
+ fun:g_test_run
+ fun:main
+}