From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6PYaKTAEnGCqYAAAWB0awg (envelope-from ) for ; Wed, 12 May 2021 12:37:04 -0400 Received: by simark.ca (Postfix, from userid 112) id A66421F11C; Wed, 12 May 2021 12:37:04 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 622171E783 for ; Wed, 12 May 2021 12:37:03 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C37E63853808; Wed, 12 May 2021 16:37:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C37E63853808 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1620837422; bh=ahZZfNE3WYPvzLsaw3kAvgU3diuYz2x2EUKeXl6uA0k=; h=Subject:To:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=xzsTibyuEpSLmOymeY1UwOna5TulV5tGfLEWilnc3uPmWxEgF64hhZzXMdHXr+m38 lMtZKqz2nvnggGS53tI+afTAgBHnWB6MUF5Eptnf0aK6d4xzud3MQ9tTBoYM8SB3x9 hIT51Z1/L7jGJnhAR7HoKHc5lQDukeEfdNz74Ogk= Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 5ACB33853808 for ; Wed, 12 May 2021 16:37:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5ACB33853808 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14CGYV8N158029 for ; Wed, 12 May 2021 12:37:00 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 38ghaajnxj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 May 2021 12:36:59 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 14CGZvCE007714 for ; Wed, 12 May 2021 16:36:59 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma01wdc.us.ibm.com with ESMTP id 38dj98xu3j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 May 2021 16:36:59 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 14CGavkE6488620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 May 2021 16:36:57 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AAE2CAC059; Wed, 12 May 2021 16:36:57 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D44D0AC05F; Wed, 12 May 2021 16:36:56 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.211.146.166]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 May 2021 16:36:56 +0000 (GMT) Message-ID: Subject: [PATCH] kill all threadapply processes at end of test To: Ulrich.Weigand@de.ibm.com, gdb-patches@sourceware.org Date: Wed, 12 May 2021 09:36:56 -0700 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-14.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: NCIjBAatBOu_mSHfyLvzms-bnpyqlk1k X-Proofpoint-ORIG-GUID: NCIjBAatBOu_mSHfyLvzms-bnpyqlk1k X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-05-12_09:2021-05-12, 2021-05-12 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=652 clxscore=1015 mlxscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 adultscore=0 priorityscore=1501 spamscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105120105 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Carl Love via Gdb-patches Reply-To: Carl Love Cc: pedromfc@br.ibm.com, rogealve@br.ibm.com, cel@us.ibm.com Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" 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 * 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