[glib] gio: enable test_peer regression test for OpenBSD
- From: Antoine Jacoutot <ajacoutot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio: enable test_peer regression test for OpenBSD
- Date: Sat, 8 Oct 2011 15:12:50 +0000 (UTC)
commit c739a5df14ff5ee8cf262ce6e1cebdd0096aff5a
Author: Antoine Jacoutot <ajacoutot openbsd org>
Date: Sat Oct 8 11:47:20 2011 +0200
gio: enable test_peer regression test for OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=661255
gio/tests/gdbus-peer.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index 4440665..66a3e60 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -795,6 +795,18 @@ test_peer (void)
g_assert (native_creds->pid == getpid ());
}
g_object_unref (credentials);
+#elif defined (__OpenBSD__)
+ {
+ struct sockpeercred *native_creds;
+ g_assert_no_error (error);
+ g_assert (G_IS_CREDENTIALS (credentials));
+ native_creds = g_credentials_get_native (credentials, G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED);
+ g_assert (native_creds != NULL);
+ g_assert (native_creds->uid == getuid ());
+ g_assert (native_creds->gid == getgid ());
+ g_assert (native_creds->pid == getpid ());
+ }
+ g_object_unref (credentials);
#else
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
g_assert (credentials == NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]