diff --git a/tests/regression/subdomain/ptrace.c b/tests/regression/subdomain/ptrace.c index fef1fa3f9..7b09250cb 100644 --- a/tests/regression/subdomain/ptrace.c +++ b/tests/regression/subdomain/ptrace.c @@ -43,6 +43,13 @@ int do_parent(pid_t pid, int trace, int num_syscall) { struct user regs; int status, i; + unsigned int rc; + + rc = alarm(5); + if (rc != 0) { + fprintf(stderr, "FAIL: unexpected alarm already set\n"); + return 0; + } if (trace) { if (ptrace(PTRACE_ATTACH, pid, NULL, NULL) == -1) { @@ -58,7 +65,7 @@ int do_parent(pid_t pid, int trace, int num_syscall) if (!WIFSTOPPED(status)) return interp_status(status); - for (i=0;i 0){ /*parent */