From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] watchpoint-reuse-slot.exp: skip some tests on targets have different wp and bp registers
Date: Mon, 16 Mar 2015 15:23:00 -0000 [thread overview]
Message-ID: <5506F561.8020108@redhat.com> (raw)
In-Reply-To: <864mplghxp.fsf@gmail.com>
On 03/16/2015 02:01 PM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
>
>> Hmm, is this just to save test time? If so, I'd prefer not skipping,
>> as it may always catch other bugs, in the target backends or
>> the kernel.
>
> No, watchpoint-reuse-slot.exp sets some HW breakpoint/watchpoint on some
> address doesn't meet the alignment requirements by kernel, kernel
> will reject the ptrace (PTRACE_SETHBPREGS) call, and some fails are
> caused, for example:
OK, then different wp and bp registers really is an orthogonal
predicate. A better one is around the alignment requirements
of a breakpoint.
>
> (gdb) PASS: gdb.base/watchpoint-reuse-slot.exp: always-inserted off: watch x hbreak: : width 1, iter 0: base + 0: delete $bpnum
> hbreak *(buf.byte + 0 + 1)^M
> Hardware assisted breakpoint 80 at 0x410a61^M
> (gdb) PASS: gdb.base/watchpoint-reuse-slot.exp: always-inserted off: watch x hbreak: : width 1, iter 0: base + 1: hbreak *(buf.byte + 0 + 1)
> stepi^M
> Warning:^M
> Cannot insert hardware breakpoint 80.^M
> Could not insert hardware breakpoints:^M
> You may have requested too many hardware breakpoints/watchpoints.^M
> ^M
> (gdb) FAIL: gdb.base/watchpoint-reuse-slot.exp: always-inserted off: watch x hbreak: : width 1, iter 0: base + 1: stepi advanced
>
> hbreak *(buf.byte + 0 + 1)^M
> Hardware assisted breakpoint 440 at 0x410a61^M
> Warning:^M
> Cannot insert hardware breakpoint 440.^M
> Could not insert hardware breakpoints:^M
> You may have requested too many hardware breakpoints/watchpoints.^M
> ^M
> (gdb) FAIL: gdb.base/watchpoint-reuse-slot.exp: always-inserted on: watch x hbreak: : width 1, iter 0: base + 1: hbreak *(buf.byte + 0 + 1)
>
> Do you suggest that we don't skip these tests even requested
> breakpoint/watchpoint don't go in the same slot (debugging register)?
Yes.
> so
> that the test can cover more. If the requested address of HW
> breakpoint/watchpoint doesn't meet the arch/kernel requirements, we can
> skip it, is it OK?
Yes, that makes sense.
>
> The inner loop of test has two parts, "base + 0" and "base + 1",
>
> append prefix "$cmd1 x $cmd2: "
> with_test_prefix "$prefix: width $width, iter $x" {
> with_test_prefix "base + 0" {
> watch_command $cmd1 $x 0 $width
> stepi
> gdb_test_no_output "delete \$bpnum"
> }
> with_test_prefix "base + 1" {
> watch_command $cmd2 $x 1 $width
> stepi
> gdb_test_no_output "delete \$bpnum"
> }
> }
>
> if we skip "base + 1" part, do we skip "base + 0" too? if not, prefix in
> test summary "$cmd1 x $cmd2: " doesn't reflect the fact.
I think skipping both is fine.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-03-16 15:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 14:41 Yao Qi
2015-03-13 14:41 ` [PATCH 2/2] watchpoint-reuse-slot.exp: skip when requesting two breakpoints in one slot on aarch64 Yao Qi
2015-03-16 12:35 ` Pedro Alves
2015-03-16 14:10 ` Yao Qi
2015-03-16 12:35 ` [PATCH 1/2] watchpoint-reuse-slot.exp: skip some tests on targets have different wp and bp registers Pedro Alves
2015-03-16 14:01 ` Yao Qi
2015-03-16 15:23 ` Pedro Alves [this message]
2015-03-16 16:37 ` Yao Qi
2015-03-16 16:55 ` Pedro Alves
2015-03-16 17:34 ` Yao Qi
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=5506F561.8020108@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.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