From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 2332A386CE69 for ; Tue, 14 Jun 2022 22:38:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2332A386CE69 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25ELo50X012121 for ; Tue, 14 Jun 2022 22:38:24 GMT Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gpbuqt35h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 14 Jun 2022 22:38:24 +0000 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25EMbHZl026130 for ; Tue, 14 Jun 2022 22:38:24 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma01wdc.us.ibm.com with ESMTP id 3gmjp8y955-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 14 Jun 2022 22:38:24 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25EMcNZp32178444 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Jun 2022 22:38:23 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 84C90AC066; Tue, 14 Jun 2022 22:38:23 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0B185AC067; Tue, 14 Jun 2022 22:38:23 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.211.68.56]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 14 Jun 2022 22:38:22 +0000 (GMT) Message-ID: <8338e122e114bb9091f2f06cd0012db826ece6cb.camel@us.ibm.com> Subject: [PATCH] Fix for gdb.base/break-idempotent.exp From: Carl Love To: gdb-patches@sourceware.org, will schmidt , cel@us.ibm.com, Ulrich Weigand Date: Tue, 14 Jun 2022 15:38:22 -0700 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: 9V2oczEmEve4ub0tu90Ybwg7jQqDnh-Y X-Proofpoint-ORIG-GUID: 9V2oczEmEve4ub0tu90Ybwg7jQqDnh-Y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-14_10,2022-06-13_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 impostorscore=0 mlxscore=0 malwarescore=0 mlxlogscore=880 suspectscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206140077 X-Spam-Status: No, score=-12.3 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: Tue, 14 Jun 2022 22:38:26 -0000 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" } -- 2.31.1