diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-20 23:25:43 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-20 23:26:11 +0100 |
commit | ae095f860593c87d217773976cfe5f89a6993c89 (patch) | |
tree | 5a014286ac5088e72e2044faa028962774ebcdf9 /src/libsystemd-bus/test-bus-kernel.c | |
parent | 5a884f93fdb2a6f89605e44a0e7f4d2db5470b5b (diff) |
bus: wrap KDBUS_CMD_BYEBYE with a high-level call sd_bus_try_close()
Diffstat (limited to 'src/libsystemd-bus/test-bus-kernel.c')
-rw-r--r-- | src/libsystemd-bus/test-bus-kernel.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsystemd-bus/test-bus-kernel.c b/src/libsystemd-bus/test-bus-kernel.c index 785e2450bf..8380b2c311 100644 --- a/src/libsystemd-bus/test-bus-kernel.c +++ b/src/libsystemd-bus/test-bus-kernel.c @@ -95,6 +95,9 @@ int main(int argc, char *argv[]) { r = sd_bus_emit_signal(a, "/foo/bar/waldo", "waldo.com", "Piep", "sss", "I am a string", "/this/is/a/path", "and.this.a.domain.name"); assert_se(r >= 0); + r = sd_bus_try_close(b); + assert_se(r == -EBUSY); + r = sd_bus_process(b, &m); assert_se(r > 0); assert_se(m); @@ -160,6 +163,9 @@ int main(int argc, char *argv[]) { r = sd_bus_release_name(a, "net.x0pointer.foobar"); assert_se(r == -ESRCH); + r = sd_bus_try_close(a); + assert_se(r >= 0); + sd_bus_unref(a); sd_bus_unref(b); |