public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Carl Love <cel@us.ibm.com>
To: gdb-patches@sourceware.org,
	will schmidt <will_schmidt@vnet.ibm.com>,
	Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	cel@us.ibm.com
Subject: Re:[Ping] [PATCH] Fix for gdb.base/break-idempotent.exp
Date: Wed, 22 Jun 2022 08:11:23 -0700	[thread overview]
Message-ID: <d0c09df22daef7c60bca71cf264256c6093aceac.camel@us.ibm.com> (raw)
In-Reply-To: <8338e122e114bb9091f2f06cd0012db826ece6cb.camel@us.ibm.com>

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"
>  	}
> 


  reply	other threads:[~2022-06-22 15:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 22:38 Carl Love
2022-06-22 15:11 ` Carl Love [this message]
2022-06-27 13:40 ` Andrew Burgess
2022-06-27 15:14   ` Carl Love
2022-06-29  9:58     ` Andrew Burgess
2022-06-29 15:34       ` Carl Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d0c09df22daef7c60bca71cf264256c6093aceac.camel@us.ibm.com \
    --to=cel@us.ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=will_schmidt@vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).