gdbus-peer test: Improve diagnostics if g_rmdir fails

Helps: GNOME/glib#1921
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2019-10-29 16:05:55 +00:00
parent 0e1549eb20
commit e1b7b1ac16

View File

@ -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);
}
}