monitor test: Log the messages that we monitored

This is helpful while debugging test failures.

Helps: dbus/dbus#457
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 8ee5d3e044)
This commit is contained in:
Simon McVittie 2023-06-05 17:56:33 +01:00
parent e8bdc729fb
commit 3a1b1e9a40

View file

@ -196,6 +196,10 @@ _log_message (DBusMessage *m,
not_null (dbus_message_get_signature (m)));
g_test_message ("\terror name: %s",
not_null (dbus_message_get_error_name (m)));
g_test_message ("\tserial number: %u",
dbus_message_get_serial (m));
g_test_message ("\tin reply to: %u",
dbus_message_get_reply_serial (m));
if (strcmp ("s", dbus_message_get_signature (m)) == 0)
{
@ -339,6 +343,9 @@ monitor_filter (DBusConnection *connection,
{
Fixture *f = user_data;
g_test_message ("Monitor received message:");
log_message (message);
g_assert_cmpstr (dbus_message_get_interface (message), !=,
"com.example.Tedious");