summaryrefslogtreecommitdiff
path: root/src/libsystemd-rtnl/test-rtnl.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-12-06 15:20:36 +0100
committerTom Gundersen <teg@jklm.no>2013-12-16 17:28:18 +0100
commit23a7f0f721ff4e3b3fd4ed87f7d8e01ebad20093 (patch)
tree82be7f1a53f83c98c66183c1424d28fdf5558b69 /src/libsystemd-rtnl/test-rtnl.c
parent9d0db17836c867ab2b8f460f649a478bf9f291d2 (diff)
rtnl: match - only match on one type at a time
Diffstat (limited to 'src/libsystemd-rtnl/test-rtnl.c')
-rw-r--r--src/libsystemd-rtnl/test-rtnl.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/libsystemd-rtnl/test-rtnl.c b/src/libsystemd-rtnl/test-rtnl.c
index a512a7b2f7..6c34a8537f 100644
--- a/src/libsystemd-rtnl/test-rtnl.c
+++ b/src/libsystemd-rtnl/test-rtnl.c
@@ -235,14 +235,12 @@ static void test_match(void) {
assert(sd_rtnl_open(0, &rtnl) >= 0);
- assert(sd_rtnl_add_match(rtnl, 0, &link_handler, NULL) == -EINVAL);
+ assert(sd_rtnl_add_match(rtnl, RTM_NEWLINK, &link_handler, NULL) >= 0);
+ assert(sd_rtnl_add_match(rtnl, RTM_NEWLINK, &link_handler, NULL) >= 0);
- assert(sd_rtnl_add_match(rtnl, RTMGRP_LINK, &link_handler, NULL) >= 0);
- assert(sd_rtnl_add_match(rtnl, RTMGRP_LINK, &link_handler, NULL) >= 0);
-
- assert(sd_rtnl_remove_match(rtnl, RTMGRP_LINK, &link_handler, NULL) == 1);
- assert(sd_rtnl_remove_match(rtnl, RTMGRP_LINK, &link_handler, NULL) == 1);
- assert(sd_rtnl_remove_match(rtnl, RTMGRP_LINK, &link_handler, NULL) == 0);
+ assert(sd_rtnl_remove_match(rtnl, RTM_NEWLINK, &link_handler, NULL) == 1);
+ assert(sd_rtnl_remove_match(rtnl, RTM_NEWLINK, &link_handler, NULL) == 1);
+ assert(sd_rtnl_remove_match(rtnl, RTM_NEWLINK, &link_handler, NULL) == 0);
}
int main(void) {