summaryrefslogtreecommitdiff
path: root/src/libsystemd-rtnl/test-rtnl.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-11-12 22:37:51 +0100
committerTom Gundersen <teg@jklm.no>2013-11-13 19:52:17 +0100
commit4555ec72d6530fce4c978fd894ac22f7e006b0ee (patch)
tree9e2f0e85634b9c929f4443fe377e70391f1101fb /src/libsystemd-rtnl/test-rtnl.c
parentfe4824e065765f4536c84916694bb050c4a5d0af (diff)
rtnl: start adding support for asynchronous messaging
Similarly to sd-bus, add: sd_rtnl_wait sd_rtnl_process sd_rtnl_send and adapt sd_rtnl_call accordingly.
Diffstat (limited to 'src/libsystemd-rtnl/test-rtnl.c')
-rw-r--r--src/libsystemd-rtnl/test-rtnl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-rtnl/test-rtnl.c b/src/libsystemd-rtnl/test-rtnl.c
index 61345bce40..3615086793 100644
--- a/src/libsystemd-rtnl/test-rtnl.c
+++ b/src/libsystemd-rtnl/test-rtnl.c
@@ -53,7 +53,7 @@ static void test_link_configure(sd_rtnl *rtnl, int ifindex) {
assert(type == IFLA_MTU);
assert(mtu == *(unsigned int *) data);
- assert(sd_rtnl_call(rtnl, message, 0, NULL) == 0);
+ assert(sd_rtnl_call(rtnl, message, 0, NULL) == 1);
}
static void test_route(void) {
@@ -133,7 +133,7 @@ int main(void) {
assert(sd_rtnl_message_read(m, &type, &data) == 0);
- assert(sd_rtnl_call(rtnl, m, 0, &r) >= 0);
+ assert(sd_rtnl_call(rtnl, m, 0, &r) == 1);
assert(sd_rtnl_message_get_type(r, &type) >= 0);
assert(type == RTM_NEWLINK);
@@ -155,7 +155,7 @@ int main(void) {
assert(sd_rtnl_message_read(m, &type, &data) == 0);
- assert(sd_rtnl_call(rtnl, m, -1, &r) >= 0);
+ assert(sd_rtnl_call(rtnl, m, -1, &r) == 1);
while (sd_rtnl_message_read(r, &type, &data) > 0) {
switch (type) {
// case IFLA_MTU: