aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2021-06-03 19:39:18 +0100
committerPedro Alves <pedro@palves.net>2021-06-14 21:31:28 +0100
commitdeb9814ee1975503bb2216d464521fb80b949d18 (patch)
tree8dcff1820fd018f9ae391b9ed56a6f1ee421e0cf
parent976f24fd5529a1cd4112c3b1009ad88339731c94 (diff)
downloadfsf-binutils-gdb-deb9814ee1975503bb2216d464521fb80b949d18.zip
fsf-binutils-gdb-deb9814ee1975503bb2216d464521fb80b949d18.tar.gz
fsf-binutils-gdb-deb9814ee1975503bb2216d464521fb80b949d18.tar.bz2
Don't check parent pid in gdb.threads/{ia64-sigill,siginfo-threads,watchthreads-reorder}.c
A following patch will make GDB always put spawned inferiors in their own terminal session. To do that, GDB forks twice, creating an extra "session leader" process between gdb and the inferior process. gdb.threads/{ia64-sigill,siginfo-threads,watchthreads-reorder}.c all check whether the parent process is GDB. If it isn't, they just bail, and the testcase fails. After the changes mentioned above, this parent check will fail if GDB is putting inferiors in their own terminal session, because in that case, the test's parent is the extra "session leader" process between gdb and the test process. The tracer will be the test process's grandparent, not the direct parent. Since the test programs already check whether there's a ptracer attached, there's no real need for this parent pid check. Just remove it. gdb/testsuite/ChangeLog: yyyy-mm-dd Pedro Alves <pedro@palves.net> * gdb.threads/ia64-sigill.c (main): Don't check whether the parent pid is the tracer. * gdb.threads/siginfo-threads.c (main): Don't check whether the parent pid is the tracer. * gdb.threads/watchthreads-reorder.c (main): Don't check whether the parent pid is the tracer. Change-Id: Iea0b06fb93c31bde1a0993c52b3fe8a5f408aec7
-rw-r--r--gdb/testsuite/gdb.threads/ia64-sigill.c5
-rw-r--r--gdb/testsuite/gdb.threads/siginfo-threads.c5
-rw-r--r--gdb/testsuite/gdb.threads/watchthreads-reorder.c5
3 files changed, 0 insertions, 15 deletions
diff --git a/gdb/testsuite/gdb.threads/ia64-sigill.c b/gdb/testsuite/gdb.threads/ia64-sigill.c
index ef224f4..f3d7014 100644
--- a/gdb/testsuite/gdb.threads/ia64-sigill.c
+++ b/gdb/testsuite/gdb.threads/ia64-sigill.c
@@ -292,11 +292,6 @@ main (int argc, char **argv)
fprintf (stderr, "The testcase must be run by GDB!\n");
exit (EXIT_FAILURE);
}
- if (tracer != getppid ())
- {
- fprintf (stderr, "The testcase parent must be our GDB tracer!\n");
- exit (EXIT_FAILURE);
- }
}
/* SIGCONT our debugger in the case of our crash as we would deadlock
diff --git a/gdb/testsuite/gdb.threads/siginfo-threads.c b/gdb/testsuite/gdb.threads/siginfo-threads.c
index adaa758..762f53a 100644
--- a/gdb/testsuite/gdb.threads/siginfo-threads.c
+++ b/gdb/testsuite/gdb.threads/siginfo-threads.c
@@ -376,11 +376,6 @@ main (int argc, char **argv)
fprintf (stderr, "The testcase must be run by GDB!\n");
exit (EXIT_FAILURE);
}
- if (tracer != getppid ())
- {
- fprintf (stderr, "The testcase parent must be our GDB tracer!\n");
- exit (EXIT_FAILURE);
- }
}
/* SIGCONT our debugger in the case of our crash as we would deadlock
diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.c b/gdb/testsuite/gdb.threads/watchthreads-reorder.c
index ff8ca9a..789dc7a 100644
--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.c
+++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.c
@@ -301,11 +301,6 @@ main (int argc, char **argv)
fprintf (stderr, "The testcase must be run by GDB!\n");
exit (EXIT_FAILURE);
}
- if (tracer != getppid ())
- {
- fprintf (stderr, "The testcase parent must be our GDB tracer!\n");
- exit (EXIT_FAILURE);
- }
}
/* SIGCONT our debugger in the case of our crash as we would deadlock