diff options
| author | Michael Biebl <biebl@debian.org> | 2021-02-18 18:53:54 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2021-02-18 18:53:54 +0100 |
| commit | 3a56bce6c0ea7ba0fe269520547740783b342e0d (patch) | |
| tree | 9add44a08843f5ea53301716a0e8fde03a6536a7 /src/core/platform/tests | |
| parent | 80ec1decc49c72efec2a8b87c06245c92c0ab807 (diff) | |
New upstream version 1.30.0 upstream/1.30.0
Diffstat (limited to 'src/core/platform/tests')
| -rw-r--r-- | src/core/platform/tests/test-common.c | 15 | ||||
| -rw-r--r-- | src/core/platform/tests/test-route.c | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/core/platform/tests/test-common.c b/src/core/platform/tests/test-common.c index 87e5329a..4a117d59 100644 --- a/src/core/platform/tests/test-common.c +++ b/src/core/platform/tests/test-common.c @@ -2563,7 +2563,20 @@ main(int argc, char **argv) if (unshare(CLONE_NEWNET | CLONE_NEWNS) != 0) { errsv = errno; - g_error("unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)", + if (errsv == EPERM) { +#ifdef REQUIRE_ROOT_TESTS + g_print("Fail test: unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)\n", + nm_strerror_native(errsv), + errsv); + return EXIT_FAILURE; +#else + g_print("Skipping test: unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)\n", + nm_strerror_native(errsv), + errsv); + return g_test_run(); +#endif + } + g_error("Fail test: unshare(CLONE_NEWNET|CLONE_NEWNS) failed with %s (%d)", nm_strerror_native(errsv), errsv); } diff --git a/src/core/platform/tests/test-route.c b/src/core/platform/tests/test-route.c index 47587865..645bb5b1 100644 --- a/src/core/platform/tests/test-route.c +++ b/src/core/platform/tests/test-route.c @@ -446,7 +446,7 @@ test_ip6_route(void) metric, mss); g_assert(nmtstp_ip6_route_get(NM_PLATFORM_GET, ifindex, &network, plen, metric, NULL, 0)); - accept_signal(route_added); + accept_signals(route_added, 1, 2); /* Add route again */ nmtstp_ip6_route_add(NM_PLATFORM_GET, |