summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-11-12 20:58:37 +0100
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-11-12 20:58:37 +0100
commit39284abd309efa3255a9de711efa1d6d24f37675 (patch)
tree24c67f49416f5d290382a61329296b303df25d46
parent483860b9eb1c8da0c6c4fde9aee7bf35e5feafc3 (diff)
downloadelfutils-39284abd309efa3255a9de711efa1d6d24f37675.tar.gz
Revert "."
This reverts commit 483860b9eb1c8da0c6c4fde9aee7bf35e5feafc3.
-rw-r--r--tests/backtrace.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/backtrace.c b/tests/backtrace.c
index 98cb5ffc..5a3fcaec 100644
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -363,9 +363,30 @@ static void
ptrace_detach_stopped (pid_t pid, pid_t group_pid)
{
errno = 0;
+ /* This kill is needed for kernel-2.6.18-308.el5.ppc64. */
+ long l = tgkill (group_pid, pid, SIGSTOP);
+ assert_perror (errno);
+ assert (l == 0);
l = ptrace (PTRACE_DETACH, pid, NULL, (void *) (intptr_t) SIGSTOP);
assert_perror (errno);
assert (l == 0);
+ /* Currently broken on kernel-3.5.4-2.fc17.x86_64. */
+#if 0
+ siginfo_t siginfo;
+ /* With kernel-2.6.18-308.el5.ppc64 we would get hanging waitpid after later
+ PTRACE_ATTACH. */
+ l = waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT | WNOHANG);
+ assert_perror (errno);
+ assert (l == 0);
+ assert (siginfo.si_pid == pid);
+ assert (siginfo.si_signo == SIGCHLD);
+ assert (siginfo.si_code == CLD_STOPPED);
+ /* kernel-2.6.18-308.el5.ppc64 has there WIFSTOPPED + WSTOPSIG,
+ kernel-3.4.11-1.fc16.x86_64 has there the plain signal value. */
+ assert ((WIFSTOPPED (siginfo.si_status)
+ && WSTOPSIG (siginfo.si_status) == SIGSTOP)
+ || siginfo.si_status == SIGSTOP);
+#endif
}
static void