diff options
author | Tom Gundersen <teg@jklm.no> | 2013-12-06 15:20:36 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2013-12-16 17:28:18 +0100 |
commit | 23a7f0f721ff4e3b3fd4ed87f7d8e01ebad20093 (patch) | |
tree | 82be7f1a53f83c98c66183c1424d28fdf5558b69 /src/libsystemd-rtnl/test-rtnl.c | |
parent | 9d0db17836c867ab2b8f460f649a478bf9f291d2 (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.c | 12 |
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) { |