X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flibsystemd%2Fsd-bus%2Ftest-bus-gvariant.c;fp=src%2Flibsystemd%2Fsd-bus%2Ftest-bus-gvariant.c;h=922685882509e07a99ceef6c1d0d0badfc1b1ab6;hb=2a0958d2d011b2debdb266144754bb5cdc4da65d;hp=f2c1fc12574745eb85617276f33516034f86df7c;hpb=55152b6ede680b9ac947c49d7dfa31cd3abe594e;p=elogind.git diff --git a/src/libsystemd/sd-bus/test-bus-gvariant.c b/src/libsystemd/sd-bus/test-bus-gvariant.c index f2c1fc125..922685882 100644 --- a/src/libsystemd/sd-bus/test-bus-gvariant.c +++ b/src/libsystemd/sd-bus/test-bus-gvariant.c @@ -134,8 +134,12 @@ static void test_marshal(void) { _cleanup_bus_unref_ sd_bus *bus = NULL; _cleanup_free_ void *blob; size_t sz; + int r; + + r = sd_bus_open_system(&bus); + if (r < 0) + exit(EXIT_TEST_SKIP); - assert_se(sd_bus_open_system(&bus) >= 0); bus->message_version = 2; /* dirty hack to enable gvariant*/ assert_se(sd_bus_message_new_method_call(bus, &m, "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") >= 0); @@ -175,7 +179,7 @@ static void test_marshal(void) { assert_se(bus_message_get_blob(m, &blob, &sz) >= 0); - assert_se(bus_message_from_malloc(NULL, blob, sz, NULL, 0, NULL, NULL, &n) >= 0); + assert_se(bus_message_from_malloc(bus, blob, sz, NULL, 0, NULL, NULL, &n) >= 0); blob = NULL; assert_se(bus_message_dump(n, NULL, true) >= 0);