[glib/wip/smcv/gdbus-server-auth-test] gdbus-server-auth test: Include gcredentialsprivate.h
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/smcv/gdbus-server-auth-test] gdbus-server-auth test: Include gcredentialsprivate.h
- Date: Mon, 4 Nov 2019 11:12:05 +0000 (UTC)
commit fdcfb9c22030e9bbb4297ec1f206901d963ccbf6
Author: Simon McVittie <smcv collabora com>
Date: Mon Nov 4 10:21:51 2019 +0000
gdbus-server-auth test: Include gcredentialsprivate.h
Otherwise we'll never test the EXTERNAL-only mode, because that relies
on testing the private macros
G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED and
G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED.
This results in the 'out' label becoming unused on platforms like Linux
where EXTERNAL authentication is supported, so #ifdef it appropriately.
Fixes: 9f962ebe "Add a test for GDBusServer authentication"
Signed-off-by: Simon McVittie <smcv collabora com>
gio/tests/gdbus-server-auth.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gio/tests/gdbus-server-auth.c b/gio/tests/gdbus-server-auth.c
index 160c18b03..ea7d81c5c 100644
--- a/gio/tests/gdbus-server-auth.c
+++ b/gio/tests/gdbus-server-auth.c
@@ -22,6 +22,8 @@
#include <glib/gstdio.h>
#include <gio/gio.h>
+#include <gio/gcredentialsprivate.h>
+
#ifdef HAVE_DBUS1
#include <dbus/dbus.h>
#endif
@@ -441,7 +443,11 @@ do_test_server_auth (InteropFlags flags)
g_test_skip ("Testing interop with libdbus not supported");
#endif /* !HAVE_DBUS1 */
+#if !defined(G_OS_UNIX) || \
+ (!defined(G_CREDENTIALS_UNIX_CREDENTIALS_MESSAGE_SUPPORTED) \
+ && !defined(G_CREDENTIALS_SOCKET_GET_CREDENTIALS_SUPPORTED))
out:
+#endif
if (server != NULL)
g_dbus_server_stop (server);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]