Use su to allow tests 3, 6, 17, 18, 19, 21 and 25 to work as root, making testing easier

This commit is contained in:
Erik van der Kouwe
2009-08-18 19:58:34 +00:00
parent 192c0be4a8
commit 5cdd995dc5
7 changed files with 8 additions and 0 deletions

View File

@@ -34,7 +34,9 @@ char *argv[];
int i, m = 0xFFFF;
sync();
if (geteuid() == 0 || getuid() == 0) {
execl("/usr/bin/su", "/usr/bin/su", "-", "ast", "-c", "/usr/src/test/test3", NULL);
printf("Test 3 cannot run as root; test aborted\n");
exit(1);
}