diff options
| author | Michael Biebl <biebl@debian.org> | 2018-03-13 01:29:54 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-03-13 01:29:54 +0100 |
| commit | 7e9ff09fcb2366b383b7ebbec80d2f6fff117290 (patch) | |
| tree | e48e88b177182607488bcfd2d2645dbc77276866 /src/platform/tests/test-link.c | |
| parent | 50f6b47074e01dffb8dc536c0a20961dcf28ae9b (diff) | |
New upstream version 1.10.6 upstream/1.10.6
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 (); |