diff options
Diffstat (limited to 'src/platform/tests/test-link.c')
-rw-r--r-- | src/platform/tests/test-link.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/platform/tests/test-link.c b/src/platform/tests/test-link.c index ed435567f0..df204b4683 100644 --- a/src/platform/tests/test-link.c +++ b/src/platform/tests/test-link.c @@ -1713,9 +1713,8 @@ test_nl_bugs_veth (void) NMTstpNamespaceHandle *ns_handle = NULL; /* create veth pair. */ - nmtstp_run_command_check ("ip link add dev %s type veth peer name %s", IFACE_VETH0, IFACE_VETH1); - ifindex_veth0 = nmtstp_assert_wait_for_link (NM_PLATFORM_GET, IFACE_VETH0, NM_LINK_TYPE_VETH, 100)->ifindex; - ifindex_veth1 = nmtstp_assert_wait_for_link (NM_PLATFORM_GET, IFACE_VETH1, NM_LINK_TYPE_VETH, 100)->ifindex; + ifindex_veth0 = nmtstp_link_veth_add (NM_PLATFORM_GET, -1, IFACE_VETH0, IFACE_VETH1)->ifindex; + ifindex_veth1 = nmtstp_link_get_typed (NM_PLATFORM_GET, -1, IFACE_VETH1, NM_LINK_TYPE_VETH)->ifindex; /* assert that nm_platform_link_veth_get_properties() returns the expected peer ifindexes. */ g_assert (nm_platform_link_veth_get_properties (NM_PLATFORM_GET, ifindex_veth0, &i)); |