[glib] tests: Add more debug output to the network-address test



commit d990f869110f41014c7049b739068b3ab425ed40
Author: Philip Withnall <withnall endlessm com>
Date:   Fri Apr 13 16:10:37 2018 +0100

    tests: Add more debug output to the network-address test
    
    Trying to diagnose why some of the resolver tests fail on AWS.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795234

 gio/tests/network-address.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gio/tests/network-address.c b/gio/tests/network-address.c
index 622af17b1..49050784f 100644
--- a/gio/tests/network-address.c
+++ b/gio/tests/network-address.c
@@ -154,6 +154,8 @@ test_resolve_address (gconstpointer d)
   GSocketAddress *addr;
   GError *error = NULL;
 
+  g_test_message ("Input: %s", test->input);
+
   g_assert_cmpint (test->valid_ip, ==, g_hostname_is_ip_address (test->input));
 
   connectable = g_network_address_parse (test->input, 1234, &error);
@@ -192,6 +194,8 @@ test_resolve_address_gresolver (gconstpointer d)
   GInetAddress *iaddr;
   GError *error = NULL;
 
+  g_test_message ("Input: %s", test->input);
+
   resolver = g_resolver_get_default ();
   addrs = g_resolver_lookup_by_name (resolver, test->input, NULL, &error);
   g_object_unref (resolver);
@@ -209,6 +213,8 @@ test_resolve_address_gresolver (gconstpointer d)
     }
   else
     {
+      g_assert_nonnull (error);
+      g_test_message ("Error: %s", error->message);
       g_assert_false (test->valid_resolve);
 
       if (!test->valid_parse)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]