From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id C962D3856DC8 for ; Wed, 22 Jun 2022 15:11:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C962D3856DC8 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25MDxUN4026459 for ; Wed, 22 Jun 2022 15:11:26 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3gv4f02929-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 22 Jun 2022 15:11:26 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25MF5eoJ026240 for ; Wed, 22 Jun 2022 15:11:25 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma03dal.us.ibm.com with ESMTP id 3gs6b9usye-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 22 Jun 2022 15:11:25 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25MFBO8f10420946 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Jun 2022 15:11:24 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 472277805F; Wed, 22 Jun 2022 15:11:24 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0C3277805E; Wed, 22 Jun 2022 15:11:24 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.211.68.56]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 22 Jun 2022 15:11:23 +0000 (GMT) Message-ID: Subject: Re:[Ping] [PATCH] Fix for gdb.base/break-idempotent.exp From: Carl Love To: gdb-patches@sourceware.org, will schmidt , Ulrich Weigand , cel@us.ibm.com Date: Wed, 22 Jun 2022 08:11:23 -0700 In-Reply-To: <8338e122e114bb9091f2f06cd0012db826ece6cb.camel@us.ibm.com> References: <8338e122e114bb9091f2f06cd0012db826ece6cb.camel@us.ibm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ur5ZYfyQ2V48CgGDPF3FE0-82_7ETvLA X-Proofpoint-ORIG-GUID: ur5ZYfyQ2V48CgGDPF3FE0-82_7ETvLA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-22_04,2022-06-22_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 impostorscore=0 malwarescore=0 suspectscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206220075 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 22 Jun 2022 15:11:29 -0000 Ping? On Tue, 2022-06-14 at 15:38 -0700, Carl Love wrote: > GDB maintainers: > > The gdb.base/break-idempotent.exp test generates errors trying to set > and remove breakpoints. The issue is gdb is trying to set and remove > breakpoints in skip_hw_watchpoint_tests not in break-idempotent. The > issue is the skip_hw_watchpoint_test restarts gdb on the test hw > watchpoint test binary after gdb has been started for the break- > idempotent.exp test messing up the test. > > This patch moves the check for hardware breakpoints before running > the > break-idempotent tests. The move also improves the performance as > the > skip_hw_watchpoint_test only needs to be run once rather for each > test > case. > > The patch has been tested on Power 10 and fixes the failures seen on > PowerPC. > > Please let me know if this patch is acceptable for mainline. > > Carl Love > > > ------------------------------------------------- > Fix for gdb.base/break-idempotent.exp > > --- > gdb/testsuite/gdb.base/break-idempotent.exp | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp > b/gdb/testsuite/gdb.base/break-idempotent.exp > index 29002f103a8..38b7632a7fc 100644 > --- a/gdb/testsuite/gdb.base/break-idempotent.exp > +++ b/gdb/testsuite/gdb.base/break-idempotent.exp > @@ -145,6 +145,16 @@ proc test_break { always_inserted break_command > } { > } > } > > +# The skip_hw_watchpoint_tests generates a small test source file to > test if HW > +# watchpoints are supported. Do not want the compile and test for > the skip > +# hw watchpoint to restart gdb after the break-idempotemt test has > is started > +# on gdb. Do the skip_hw_watchpoint_tests first. > +if {[skip_hw_watchpoint_tests]} { > + set skip_hw_wp 1 > +} else { > + set skip_hw_wp 0 > +} > + > # The testcase uses the "file" command to force breakpoint re-set in > # GDB. Test both with and without PIE, as GDB used to mishandle > # breakpoint re-set when reloading PIEs. > @@ -174,7 +184,7 @@ foreach_with_prefix pie { "nopie" "pie" } { > test_break $always_inserted "hbreak" > } > > - if {![skip_hw_watchpoint_tests]} { > + if {!$skip_hw_wp} { > test_break $always_inserted "watch" > } >