diff options
author | Tom Gundersen <teg@jklm.no> | 2014-01-24 18:44:03 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-01-24 19:56:01 +0100 |
commit | 5a081409c5b88b0fcffb4ee5a0e07ed133ca4da3 (patch) | |
tree | 8b18c5c9dbc9c82c5e2fba5758faa4ac17bd91c6 /src/libsystemd/sd-rtnl/test-rtnl.c | |
parent | c552d2e18b074eb8784339d6ddfc55ce24ca4212 (diff) |
sd-rtnl: add support for nested containers
Diffstat (limited to 'src/libsystemd/sd-rtnl/test-rtnl.c')
-rw-r--r-- | src/libsystemd/sd-rtnl/test-rtnl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsystemd/sd-rtnl/test-rtnl.c b/src/libsystemd/sd-rtnl/test-rtnl.c index 58654e990a..98213d6782 100644 --- a/src/libsystemd/sd-rtnl/test-rtnl.c +++ b/src/libsystemd/sd-rtnl/test-rtnl.c @@ -214,7 +214,12 @@ static void test_container(void) { assert(sd_rtnl_message_link_new(RTM_NEWLINK, 0, &m) >= 0); assert(sd_rtnl_message_open_container(m, IFLA_LINKINFO) >= 0); - assert(sd_rtnl_message_open_container(m, IFLA_LINKINFO) == -EINVAL); + assert(sd_rtnl_message_open_container(m, IFLA_LINKINFO) == -ENOTSUP); + assert(sd_rtnl_message_append_string(m, IFLA_INFO_KIND, "kind") >= 0); + assert(sd_rtnl_message_open_container(m, IFLA_INFO_DATA) >= 0); + assert(sd_rtnl_message_open_container(m, IFLA_INFO_DATA) == -ENOTSUP); + assert(sd_rtnl_message_append_u16(m, IFLA_VLAN_ID, 100) >= 0); + assert(sd_rtnl_message_close_container(m) >= 0); assert(sd_rtnl_message_append_string(m, IFLA_INFO_KIND, "kind") >= 0); assert(sd_rtnl_message_close_container(m) >= 0); assert(sd_rtnl_message_close_container(m) == -EINVAL); |