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.
This commit is contained in:
Ben Noordhuis 2013-02-24 17:14:16 +01:00
parent 85124d7eb5
commit a924f79023

View File

@ -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. */