summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/test-bus-kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/test-bus-kernel.c')
-rw-r--r--src/libsystemd-bus/test-bus-kernel.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/libsystemd-bus/test-bus-kernel.c b/src/libsystemd-bus/test-bus-kernel.c
index 2241e65adf..4c599788fe 100644
--- a/src/libsystemd-bus/test-bus-kernel.c
+++ b/src/libsystemd-bus/test-bus-kernel.c
@@ -29,7 +29,8 @@
int main(int argc, char *argv[]) {
_cleanup_close_ int bus_ref = -1;
_cleanup_free_ char *bus_name = NULL, *address = NULL;
- const char *ua = NULL, *ub = NULL;
+ _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+ const char *ua = NULL, *ub = NULL, *the_string = NULL;
sd_bus *a, *b;
int r;
@@ -67,6 +68,17 @@ int main(int argc, char *argv[]) {
printf("unique b: %s\n", ub);
+ r = sd_bus_emit_signal(a, "/foo", "waldo.com", "Piep", "s", "I am a string");
+ assert_se(r >= 0);
+
+ r = sd_bus_process(b, &m);
+ assert_se(r > 0);
+ assert_se(m);
+
+ r = sd_bus_message_read(m, "s", &the_string);
+ assert_se(r >= 0);
+ assert_se(streq(the_string, "I am a string"));
+
sd_bus_unref(a);
sd_bus_unref(b);