Commit 3583882c authored by Lennart Poettering's avatar Lennart Poettering

bus: add kdbus test for name registry

parent 51038c03
......@@ -85,9 +85,29 @@ int main(int argc, char *argv[]) {
assert_se(r >= 0);
assert_se(streq(the_string, "I am a string"));
sd_bus_message_unref(m);
m = NULL;
r = sd_bus_request_name(a, "net.0pointer.foobar", 0);
assert_se(r >= 0);
r = sd_bus_message_new_method_call(b, "net.0pointer.foobar", "/a/path", "an.inter.face", "AMethod", &m);
assert_se(r >= 0);
r = sd_bus_send(b, m, NULL);
assert_se(r >= 0);
for (;;) {
sd_bus_message_unref(m);
m = NULL;
r = sd_bus_process(a, &m);
assert_se(r > 0);
assert_se(m);
bus_message_dump(m);
assert_se(sd_bus_message_rewind(m, true) >= 0);
}
r = sd_bus_release_name(a, "net.0pointer.foobar");
assert_se(r >= 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment