Revert "Merging in 1.0.2."

This reverts commit 50cf3276e7.
This commit is contained in:
Geoffrey Challen
2017-01-09 22:52:13 -05:00
parent 50cf3276e7
commit e318e3171e
118 changed files with 3158 additions and 1350 deletions

View File

@@ -46,6 +46,8 @@
#include <unistd.h>
#include <signal.h>
#include <err.h>
#include <test161/test161.h>
#if defined(__mips__)
#define KERNEL_ADDR 0x80000000
@@ -292,7 +294,7 @@ runop(int op)
/* intentionally don't check if op is in bounds :) */
opindex = op-'a';
printf("Running: [%c] %s\n", ops[opindex].ch, ops[opindex].name);
tprintf("Running: [%c] %s\n", ops[opindex].ch, ops[opindex].name);
if (forking) {
pid = fork();
@@ -307,25 +309,25 @@ runop(int op)
}
ok = 0;
if (WIFSIGNALED(status)) {
printf("Signal %d\n", WTERMSIG(status));
tprintf("Signal %d\n", WTERMSIG(status));
if (WTERMSIG(status) == ops[opindex].sig) {
ok = 1;
}
}
else {
printf("Exit %d\n", WEXITSTATUS(status));
tprintf("Exit %d\n", WEXITSTATUS(status));
if (WEXITSTATUS(status) == MAGIC) {
ok = 1;
}
}
if (ok) {
printf("Ok.\n");
tprintf("Ok.\n");
}
else {
printf("FAILED: expected signal %d\n",
tprintf("FAILED: expected signal %d\n",
ops[opindex].sig);
}
printf("\n");
tprintf("\n");
return;
}
}
@@ -351,14 +353,14 @@ ask(void)
while (1) {
for (i=0; ops[i].name; i++) {
printf("[%c] %s\n", ops[i].ch, ops[i].name);
tprintf("[%c] %s\n", ops[i].ch, ops[i].name);
}
printf("[-] Disable forking\n");
printf("[+] Enable forking (default)\n");
printf("[*] Run everything\n");
printf("[!] Quit\n");
tprintf("[-] Disable forking\n");
tprintf("[+] Enable forking (default)\n");
tprintf("[*] Run everything\n");
tprintf("[!] Quit\n");
printf("Choose: ");
tprintf("Choose: ");
op = getchar();
if (op == '!') {
@@ -384,5 +386,7 @@ main(int argc, char **argv)
}
}
}
printf("Should print success\n");
success(TEST161_SUCCESS, SECRET, "/testbin/crash");
return 0;
}