From a924f79023b57d947c9aee2d3bafe8f0cc95520b Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sun, 24 Feb 2013 17:14:16 +0100 Subject: [PATCH] test: remove 'is root?' check I debug tests regularly as root (because dtrace and dtruss require the additional privileges). The 'is root?' check gets in the way more often than it prevents me from doing something silly. Remove it. --- test/runner-unix.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test/runner-unix.c b/test/runner-unix.c index ebda5f8f..eefb7008 100644 --- a/test/runner-unix.c +++ b/test/runner-unix.c @@ -41,15 +41,9 @@ /* Do platform-specific initialization. */ void platform_init(int argc, char **argv) { - const char* var = getenv("UV_RUN_AS_ROOT"); - const char* tap = getenv("UV_TAP_OUTPUT"); - - /* Running the tests as root is not smart - don't do it. */ - if (getuid() == 0 && (var == NULL || atoi(var) <= 0)) { - fprintf(stderr, "Running the tests as root is not safe.\n"); - exit(1); - } + const char* tap; + tap = getenv("UV_TAP_OUTPUT"); tap_output = (tap != NULL && atoi(tap) > 0); /* Disable stdio output buffering. */