* tests/netlink_route.c (test_nlmsg_done): New function.
(main): Use it.
---
 tests/netlink_route.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/netlink_route.c b/tests/netlink_route.c
index 2d8f031..0a52dbc 100644
--- a/tests/netlink_route.c
+++ b/tests/netlink_route.c
@@ -129,6 +129,17 @@ test_nlmsg_flags(const int fd)
 }
 
 static void
+test_nlmsg_done(const int fd)
+{
+       void *const nlh0 = tail_alloc(NLMSG_HDRLEN);
+       const int num = 0xabcdefad;
+
+       TEST_NETLINK(fd, nlh0, NLMSG_DONE, NLM_F_REQUEST,
+                    sizeof(num), &num, sizeof(num),
+                    printf("%d", num));
+}
+
+static void
 test_rtnl_unspec(const int fd)
 {
        void *const nlh0 = tail_alloc(NLMSG_HDRLEN);
@@ -207,6 +218,7 @@ int main(void)
 
        test_nlmsg_type(fd);
        test_nlmsg_flags(fd);
+       test_nlmsg_done(fd);
        test_rtnl_unspec(fd);
        test_rtnl_link(fd);
 
-- 
2.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to