Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 6fba5930729a4828157780bc9a97fba483112afa 1 parent 9703ab4
@bnoordhuis bnoordhuis authored
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. */
Please sign in to comment.
Something went wrong with that request. Please try again.