From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Simon Marchi <simark@simark.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/testsuite: Run test when software watchpoints are used
Date: Fri, 06 Jul 2018 13:59:00 -0000 [thread overview]
Message-ID: <20180706135950.GM2675@embecosm.com> (raw)
In-Reply-To: <a2d5a24b-7a82-de5c-eee3-04ce01a1b5e5@simark.ca>
* Simon Marchi <simark@simark.ca> [2018-07-05 22:53:54 -0400]:
> On 2018-07-04 12:40 PM, Andrew Burgess wrote:
> > The test gdb.base/watchpoint-reuse-slot.exp can be run when software
> > watchpoints are in use, we just need to update one test pattern to
> > look for 'Watchpoint' instead of 'Hardware watchpoint' in one case.
> >
> > gdb/testsuite/ChangeLog:
> >
> > * gdb.base/watchpoint-reuse-slot.exp: Test can be run using
> > software watchpoints, we just need to update a test pattern in one
> > place.
>
> Hi Andrew,
>
> Reading the test description, it seems like it exists specifically to
> check the hardware watchpoint mechanisms of the targets. Did you
> find it would also be useful to run it with software watchpoints?
> What was the idea that motivated to do this change in the first
> place?
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)...
Thanks,
Andrew
next prev parent reply other threads:[~2018-07-06 13:59 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 [this message]
2018-07-06 14:43 ` Simon Marchi
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=20180706135950.GM2675@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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