summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/test-bus-kernel.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-30 01:02:51 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-30 01:02:51 +0100
commita43b9ca3049d0f27cdb3bc8dad703e688cba31b3 (patch)
tree3a459cde6758bdb6f2cad5b280251930eee4f7d4 /src/libsystemd-bus/test-bus-kernel.c
parent7adc46fcce257fcf4c83faa18b8c78f2a577e4f1 (diff)
bus: synthesize local error reply when we cannot deliver a message to kdbus because the destination is unavailable
Diffstat (limited to 'src/libsystemd-bus/test-bus-kernel.c')
-rw-r--r--src/libsystemd-bus/test-bus-kernel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsystemd-bus/test-bus-kernel.c b/src/libsystemd-bus/test-bus-kernel.c
index f970ca5ca4..04dbc998dc 100644
--- a/src/libsystemd-bus/test-bus-kernel.c
+++ b/src/libsystemd-bus/test-bus-kernel.c
@@ -35,6 +35,7 @@ int main(int argc, char *argv[]) {
_cleanup_close_ int bus_ref = -1;
_cleanup_free_ char *bus_name = NULL, *address = NULL;
_cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+ _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
const char *ua = NULL, *ub = NULL, *the_string = NULL;
sd_bus *a, *b;
int r, pipe_fds[2];
@@ -84,6 +85,10 @@ int main(int argc, char *argv[]) {
printf("unique b: %s\n", ub);
+ r = sd_bus_call_method(a, "this.doesnt.exist", "/foo", "meh.mah", "muh", &error, NULL, "s", "yayayay");
+ assert_se(sd_bus_error_has_name(&error, SD_BUS_ERROR_SERVICE_UNKNOWN));
+ assert_se(r == -EHOSTUNREACH);
+
r = sd_bus_add_match(b, "interface='waldo.com',member='Piep'", NULL, NULL);
assert_se(r >= 0);