public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] kill all threadapply processes at end of test
@ 2021-05-12 16:36 Carl Love
  2021-05-13 14:30 ` Simon Marchi
  2021-05-13 15:44 ` Tom Tromey
  0 siblings, 2 replies; 14+ messages in thread
From: Carl Love @ 2021-05-12 16:36 UTC (permalink / raw)
  To: Ulrich.Weigand, gdb-patches; +Cc: pedromfc, rogealve, Will Schmidt, cel





GDB maintainers:

The threadapply test performs a number of tests to detatch and attach
threads.  When the test is all done, some detatched threads are left
running.  The following patch adds code to the end of the patch to kill
the processes that are still running.

Please let me know if this patch is acceptable.  Thanks.

                     Carl Love

--------------------------------------

gdb/testsuite/ChangeLog:

2021-05-12  Carl Love  <cel@us.ibm.com>

	* gdb.threads/threadapply.exp: Add foreach loop to kill all remaining
	threadapply processes.
---
 gdb/testsuite/gdb.threads/threadapply.exp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gdb/testsuite/gdb.threads/threadapply.exp b/gdb/testsuite/gdb.threads/threadapply.exp
index ebc1cf15ad6..b3457121e76 100644
--- a/gdb/testsuite/gdb.threads/threadapply.exp
+++ b/gdb/testsuite/gdb.threads/threadapply.exp
@@ -229,3 +229,11 @@ proc kill_and_remove_inferior {thread_set} {
 foreach_with_prefix thread_set {"all" "1.1"} {
     kill_and_remove_inferior $thread_set
 }
+
+# Make sure all of the threadapply processes are terminated
+set data [exec ps -e | grep threadapply]
+
+foreach line [split $data \n] {
+    scan $line {%d %s} threadid junk
+    exec kill -9 $threadid
+}
-- 
2.27.0



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-06-02 15:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 16:36 [PATCH] kill all threadapply processes at end of test Carl Love
2021-05-13 14:30 ` Simon Marchi
2021-05-13 15:44 ` Tom Tromey
2021-05-13 18:10   ` Carl Love
2021-05-18 15:29     ` Carl Love
2021-05-18 21:56       ` Pedro Franco de Carvalho
2021-05-19  0:11         ` Pedro Franco de Carvalho
2021-05-20 15:42           ` Carl Love
2021-05-20 16:01           ` Carl Love
2021-05-24 15:30             ` Carl Love
2021-05-29  1:48               ` Simon Marchi
2021-06-01 15:42                 ` Carl Love
2021-06-01 16:08                   ` Simon Marchi
2021-06-02 15:08                     ` Carl Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).