chiark / gitweb /
bus: allow peeking signatures recusively inside of containers
[elogind.git] / src / libsystemd-bus / test-bus-gvariant.c
index 57015ae1b890963cb8bbaa0f35d796abf6594366..cb07c9627341d31555b0629cb5a2df8e673319ff 100644 (file)
@@ -141,11 +141,12 @@ static void test_marshal(void) {
         assert_se(sd_bus_message_new_method_call(bus, "a.service.name", "/an/object/path/which/is/really/really/long/so/that/we/hit/the/eight/bit/boundary/by/quite/some/margin/to/test/this/stuff/that/it/really/works", "an.interface.name", "AMethodName", &m) >= 0);
 
         assert_se(sd_bus_message_append(m,
-                                        "a(usv)", 2,
+                                        "a(usv)", 3,
                                         4711, "first-string-parameter", "(st)", "X", (uint64_t) 1111,
-                                        4712, "second-string-parameter", "(a(si))", 2, "Y", 5, "Z", 6) >= 0);
+                                        4712, "second-string-parameter", "(a(si))", 2, "Y", 5, "Z", 6,
+                                        4713, "third-string-parameter", "(uu)", 1, 2) >= 0);
 
-        assert_se(bus_message_seal(m, 4711) >= 0);
+        assert_se(bus_message_seal(m, 4711, 0) >= 0);
 
 #ifdef HAVE_GLIB
         {
@@ -178,6 +179,15 @@ static void test_marshal(void) {
         blob = NULL;
 
         assert_se(bus_message_dump(n, NULL, true) >= 0);
+
+        m = sd_bus_message_unref(m);
+
+        assert_se(sd_bus_message_new_method_call(bus, "a.x", "/a/x", "a.x", "Ax", &m) >= 0);
+
+        assert_se(sd_bus_message_append(m, "as", 0) >= 0);
+
+        assert_se(bus_message_seal(m, 4712, 0) >= 0);
+        assert_se(bus_message_dump(m, NULL, true) >= 0);
 }
 
 int main(int argc, char *argv[]) {