From 86fcc20f96ef3d605738d0bc72dae5a419d1896b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Fri, 12 Dec 2014 13:44:01 +0100 Subject: [PATCH] test: skip spawn_setuid_setgid if we get EACCES More often than not, users run the test suite from /root, which means the 'nobody' user won't be able to access the test runner and the test will fail because we drop privileges to that user. Just skip it then. PR-URL: https://github.com/libuv/libuv/pull/66 Reviewed-By: Ben Noordhuis --- test/test-spawn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test-spawn.c b/test/test-spawn.c index 11f43bdf..64dc7199 100644 --- a/test/test-spawn.c +++ b/test/test-spawn.c @@ -1051,6 +1051,9 @@ TEST_IMPL(spawn_setuid_setgid) { options.flags = UV_PROCESS_SETUID | UV_PROCESS_SETGID; r = uv_spawn(uv_default_loop(), &process, &options); + if (r == UV_EACCES) + RETURN_SKIP("user 'nobody' cannot access the test runner"); + ASSERT(r == 0); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT);