diff options
author | Thomas Haller <thaller@redhat.com> | 2016-02-19 01:06:28 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-02-20 00:19:09 +0100 |
commit | 6635e54d613304c3b319d822d6ae1a93d016e968 (patch) | |
tree | 7d58a573cf408dff8a2a9a3c60ebc55fab940a4d /src/platform/tests/test-nmp-object.c | |
parent | 94d6aaac70ecec4baca6a072d32825287f8ee109 (diff) | |
download | NetworkManager-th/platform-netns.tar.gz |
platform: add network namespace support to platformth/platform-netns
Platform not only uses the netlink socket, but also sysfs, udev,
ethtool, mii. To properly support network namespaces, we must
switch the namespace as necessary. In case of udev, it is only
supported on the main namespace.
Diffstat (limited to 'src/platform/tests/test-nmp-object.c')
-rw-r--r-- | src/platform/tests/test-nmp-object.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/platform/tests/test-nmp-object.c b/src/platform/tests/test-nmp-object.c index 3b44abb8d6..d77170b364 100644 --- a/src/platform/tests/test-nmp-object.c +++ b/src/platform/tests/test-nmp-object.c @@ -223,9 +223,7 @@ test_cache_link (void) GUdevDevice *udev_device_3 = g_list_nth_data (global.udev_devices, 0); NMPCacheOpsType ops_type; - cache = nmp_cache_new (); - - nmp_cache_use_udev_set (cache, g_rand_int_range (nmtst_get_rand (), 0, 2)); + cache = nmp_cache_new (nmtst_get_rand_int () % 2); /* if we have a link, and don't set is_in_netlink, adding it has no effect. */ obj1 = nmp_object_new (NMP_OBJECT_TYPE_LINK, (NMPlatformObject *) &pl_link_2); |