From 52317e15fa7111862b278f5ecb01c5fea2c0f4e8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 30 Nov 2023 18:30:21 +0000 Subject: [PATCH] containers test: Show the AddServer call and response in the log Signed-off-by: Simon McVittie --- test/containers.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/containers.c b/test/containers.c index d7df72f7..a47a2af2 100644 --- a/test/containers.c +++ b/test/containers.c @@ -312,6 +312,7 @@ add_container_server (Fixture *f, GVariant *named_results; GStatBuf stat_buf; gboolean found; + gchar *stringified_args; f->proxy = g_dbus_proxy_new_sync (f->unconfined_conn, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, @@ -320,7 +321,10 @@ add_container_server (Fixture *f, NULL, &f->error); g_assert_no_error (f->error); - g_test_message ("Calling AddServer..."); + stringified_args = g_variant_print (parameters, TRUE); + g_test_message ("Calling AddServer%s...", stringified_args); + g_free (stringified_args); + tuple = g_dbus_proxy_call_sync (f->proxy, "AddServer", parameters, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &f->error); @@ -341,6 +345,10 @@ add_container_server (Fixture *f, g_assert_no_error (f->error); g_assert_nonnull (tuple); + stringified_args = g_variant_print (tuple, TRUE); + g_test_message ("-> %s", stringified_args); + g_free (stringified_args); + g_assert_cmpstr (g_variant_get_type_string (tuple), ==, "(oa{sv})"); g_variant_get (tuple, "(o@a{sv})", &f->server_path, &named_results); g_assert_nonnull (f->server_path);