[glib/wip/smcv/gdbus-tests: 1/4] gdbus-peer test: Improve diagnostics if g_rmdir fails



commit e1b7b1ac161343b1ca708c95c7618ec98fe7babe
Author: Simon McVittie <smcv collabora com>
Date:   Tue Oct 29 16:05:55 2019 +0000

    gdbus-peer test: Improve diagnostics if g_rmdir fails
    
    Helps: GNOME/glib#1921
    Signed-off-by: Simon McVittie <smcv collabora com>

 gio/tests/gdbus-peer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index dc4176cf2..c51166ae7 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -313,7 +313,8 @@ teardown_test_address (void)
       /* Ensuring the rmdir succeeds also ensures any sockets created on the
        * filesystem are also deleted.
        */
-      g_assert_cmpint (g_rmdir (tmpdir), ==, 0);
+      g_assert_cmpstr (g_rmdir (tmpdir) == 0 ? "OK" : g_strerror (errno),
+                       ==, "OK");
       g_clear_pointer (&tmpdir, g_free);
     }
 }


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