diff options
| author | Jeremy Bicha <jbicha@ubuntu.com> | 2018-03-26 08:35:51 -0400 |
|---|---|---|
| committer | Jeremy Bicha <jbicha@ubuntu.com> | 2018-03-26 08:35:51 -0400 |
| commit | 95410d8dcdd0433894612785c89b821b9de4cc04 (patch) | |
| tree | 66c57586825b10af593a84a00ee885aa257b5196 /src/platform/tests/test-link.c | |
| parent | 6b60d03d200147c516db40716b1c58e2a86db1a5 (diff) | |
| parent | aee9265c9325331914e9fd42ce06e063fabdfcab (diff) | |
Merge tag 'debian/1.10.6-2' into bionic
network-manager Debian release 1.10.6-2
Diffstat (limited to 'src/platform/tests/test-link.c')
| -rw-r--r-- | src/platform/tests/test-link.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/platform/tests/test-link.c b/src/platform/tests/test-link.c index d3a10bd6..ef78cc24 100644 --- a/src/platform/tests/test-link.c +++ b/src/platform/tests/test-link.c @@ -1949,6 +1949,17 @@ _test_netns_check_skip (void) return FALSE; } +static gboolean +_check_sysctl_skip (void) +{ + if (access ("/proc/sys/net/ipv4/ip_forward", W_OK) == -1) { + g_test_skip ("Can not write sysctls"); + return TRUE; + } + + return FALSE; +} + /*****************************************************************************/ #define _sysctl_assert_eq(plat, path, value) \ @@ -1973,6 +1984,9 @@ test_netns_general (gpointer fixture, gconstpointer test_data) if (_test_netns_check_skip ()) return; + if (_check_sysctl_skip ()) + return; + platform_1 = nm_linux_platform_new (TRUE, TRUE); platform_2 = _test_netns_create_platform (); @@ -2168,6 +2182,9 @@ test_netns_push (gpointer fixture, gconstpointer test_data) if (_test_netns_check_skip ()) return; + if (_check_sysctl_skip ()) + return; + pl[0].platform = platform_0 = nm_linux_platform_new (TRUE, TRUE); pl[1].platform = platform_1 = _test_netns_create_platform (); pl[2].platform = platform_2 = _test_netns_create_platform (); |