From: Tom Gundersen Date: Sat, 25 Jan 2014 00:22:54 +0000 (+0100) Subject: sd-rtnl: extend tests a bit X-Git-Tag: v209~348 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=168a3f602fa2250dc0d0aab140ab91945d5f6efa;p=elogind.git sd-rtnl: extend tests a bit --- diff --git a/src/libsystemd/sd-rtnl/test-rtnl.c b/src/libsystemd/sd-rtnl/test-rtnl.c index a173b0fc6..ec6b29438 100644 --- a/src/libsystemd/sd-rtnl/test-rtnl.c +++ b/src/libsystemd/sd-rtnl/test-rtnl.c @@ -241,10 +241,12 @@ static void test_container(void) { assert(sd_rtnl_message_read(m, &type, &data) >= 0); assert(type == IFLA_VLAN_ID); assert(*(uint16_t *)data == 100); + assert(sd_rtnl_message_read(m, &type, &data) == 0); assert(sd_rtnl_message_exit_container(m) >= 0); assert(sd_rtnl_message_read(m, &type, &data) >= 0); assert(type == IFLA_INFO_KIND); assert(streq("kind", (char *)data)); + assert(sd_rtnl_message_read(m, &type, &data) == 0); assert(sd_rtnl_message_exit_container(m) >= 0); assert(sd_rtnl_message_exit_container(m) == -EINVAL); }