Permalink
Browse files

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.
  • Loading branch information...
1 parent 9703ab4 commit 6fba5930729a4828157780bc9a97fba483112afa @bnoordhuis bnoordhuis committed Feb 24, 2013
Showing with 2 additions and 8 deletions.
  1. +2 −8 test/runner-unix.c
View
10 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. */

0 comments on commit 6fba593

Please sign in to comment.