summaryrefslogtreecommitdiff
path: root/test/test-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-main.c')
-rw-r--r--test/test-main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test-main.c b/test/test-main.c
index d80806f..9a2bf94 100644
--- a/test/test-main.c
+++ b/test/test-main.c
@@ -73,6 +73,11 @@ int main(void)
const struct rlimit corelimit = {0, 0};
int failed;
+ if (getuid() != 0) {
+ fprintf(stderr, "This test needs to run as root\n");
+ return 77;
+ }
+
if (is_debugger_attached())
setenv("CK_FORK", "no", 0);