[glib/wip/ebassi/ci: 1/4] Allow running gdbus-peer inside a container
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/ebassi/ci: 1/4] Allow running gdbus-peer inside a container
- Date: Tue, 20 Feb 2018 12:59:55 +0000 (UTC)
commit 28f1533807daa8f95ed513c2921ff606d54a5a12
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Feb 19 14:36:42 2018 +0000
Allow running gdbus-peer inside a container
The /etc/machine-id inside a Docker container is allowed to be empty, so
we need to check for that case.
https://bugzilla.gnome.org/show_bug.cgi?id=793635
gio/tests/gdbus-peer.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index be2d057b2..101c2a8bb 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -1683,7 +1683,10 @@ codegen_test_peer (void)
g_assert_no_error (error);
g_variant_get (value, "(&s)", &s);
g_test_message ("Machine ID: %s", s);
- g_assert (g_dbus_is_guid (s));
+ /* It's valid for machine-id inside containers to be empty, so we
+ * need to test for that possibility
+ */
+ g_assert ((s == NULL || *s == '\0') || g_dbus_is_guid (s));
g_variant_unref (value);
/* Poke server and make sure animal is updated */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]