diff options
author | Andy Lutomirski <luto@amacapital.net> | 2015-01-06 10:20:33 -0800 |
---|---|---|
committer | Andy Lutomirski <luto@amacapital.net> | 2015-01-06 10:20:33 -0800 |
commit | 54be0fdd8cc26ce54770cbc7e150a8c45393b803 (patch) | |
tree | 04df3dc27ea97fcb5cacafcc11d211825c835fd7 | |
parent | 15427d34e21c123806ef5b316bc994cf730b40d2 (diff) | |
download | misc-tests-54be0fdd8cc26ce54770cbc7e150a8c45393b803.tar.gz |
syscall_exit_regs: Awful hack to test fork
-rw-r--r-- | syscall_exit_regs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/syscall_exit_regs.c b/syscall_exit_regs.c index 2a410d5..965f813 100644 --- a/syscall_exit_regs.c +++ b/syscall_exit_regs.c @@ -4,6 +4,7 @@ #include <sys/prctl.h> #include <asm/prctl.h> #include <sys/ucontext.h> +#include <sys/syscall.h> #include <unistd.h> #include <errno.h> #include <signal.h> @@ -89,7 +90,7 @@ static void test_syscall(long nr) printf("%s\tsyscall %lx: RCX = %lX RIP = %lX\n", outcome, nr, rcx, (unsigned long)syscall_rip); - if (ret != (long)-ENOSYS) { + if (ret != (long)-ENOSYS && nr != SYS_fork) { local_nerrs++; outcome = "[FAIL]"; } else { @@ -169,5 +170,7 @@ int main() test_syscallfn(0xFFFF); + test_syscall(SYS_fork); + return nerrs ? 1 : 0; } |