diff --git a/test/runner-unix.c b/test/runner-unix.c index d0ebfbf0..668dc95e 100644 --- a/test/runner-unix.c +++ b/test/runner-unix.c @@ -40,6 +40,11 @@ /* Do platform-specific initialization. */ void platform_init(int argc, char **argv) { + /* Running the tests as root is not smart - don't do it. */ + if (getuid() == 0) { + fprintf(stderr, "Running the tests as root is not safe.\n"); + exit(1); + } /* Disable stdio output buffering. */ setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0);