public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/testsuite: Run test when software watchpoints are used
Date: Fri, 06 Jul 2018 14:43:00 -0000	[thread overview]
Message-ID: <25d43a27477e9ac14c7a0a4dad19d580@simark.ca> (raw)
In-Reply-To: <20180706135950.GM2675@embecosm.com>

On 2018-07-06 09:59, Andrew Burgess wrote:
> I think you give me too much credit!
> 
> What happened was I had a target without h/w watchpoints, I ran the
> GDB testsuite and had a set of passes and fails.  After some
> investigation I realised that I'd neglected to mark the target as not
> supporting h/w watchpoints in the board file.
> 
> Once I'd added the no h/w watchpoint flag in the board file I reran
> the tests, and mostly things looked better.  Failures, or unresolved
> tests had become unsupported.
> 
> However.... in watchpoint-reuse-slot.exp a number of tests that used
> to pass had gone away, so I went looking at the test script.
> 
> What I saw was that though the test declared a need for h/w
> watchpoints, the test would run perfectly fine without them.
> 
> You'll notice that with my change if the board file says that h/w
> watchpoints are supported then we still look for the full "Hardware
> watchpoint" pattern in the output, that is, my change does not mean
> that if GDB broke and h/w watchpoints changed to s/w watchpoints (when
> they shouldn't) the test would pass.  I think that after my change all
> targets that previously ran this test are just as well tested as they
> ever were.
> 
> But, we have additional s/w watchpoint testing for targets that don't
> support h/w watchpoints.  Is this testing anything that's not covered
> elsewhere?  Honestly, I don't know.  There probably is a lot of test
> duplication, but I can't guarantee that there's nothing unique in
> here.
> 
> I guess my question is, what's the harm from broadening the test in
> this way?  If I've missed something and this change could mean a bug
> can now slip into GDB then absolutely, this is not acceptable.  But, I
> can't see how (yet)...

Indeed, I see no harm in running more tests, at worst it's useless.  
Maybe
it will find some bug in the software watchpoint code.

I was thinking that we might as well run it with software watchpoints 
even
with targets that support hardware watchpoints.  We could run 
unconditionally
with "set can-use-hw-watchpoints 0" and run it with "1" on targets that
support hw watchpoints.

Simon

  reply	other threads:[~2018-07-06 14:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04 16:40 Andrew Burgess
2018-07-06  2:53 ` Simon Marchi
2018-07-06 13:59   ` Andrew Burgess
2018-07-06 14:43     ` Simon Marchi [this message]
2018-07-06 23:21       ` Andrew Burgess
2018-07-07  0:47         ` Simon Marchi
2018-07-10 14:01           ` Andrew Burgess
2018-10-31 13:52             ` Phil Muldoon

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=25d43a27477e9ac14c7a0a4dad19d580@simark.ca \
    --to=simark@simark.ca \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    /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).