From: "Metzger, Markus T via Gdb-patches" <gdb-patches@sourceware.org>
To: Simon Marchi <simon.marchi@polymtl.ca>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH 1/4] testsuite, gdb.btrace: make test names unique
Date: Mon, 21 Dec 2020 07:26:56 +0000 [thread overview]
Message-ID: <DM5PR11MB169042A29F2186B9D6882387DEC00@DM5PR11MB1690.namprd11.prod.outlook.com> (raw)
In-Reply-To: <05abf717-c170-79b3-1109-5eb90c712467@polymtl.ca>
Hello Simon,
Thanks for your review.
> > @@ -60,13 +60,13 @@ proc gdb_cont_to { threads cmd line nthreads } {
> > # the prompt precedes any further output except some errors.
> > gdb_test_multiple "$full_cmd &" "$full_cmd: prompt" {
> > -re "$gdb_prompt " {
> > - pass "$full_cmd: prompt"
> > + pass "$full_cmd ($message): prompt"
> > }
> > }
>
> It would be preferable to use
>
> gdb_test_multiple "$full_cmd &" "$full_cmd ($message): prompt" {
>
> and $gdb_test_name inside the "-re" clause, to make sure the test name
> is the same regardless of the outcome.
>
> And just a nit, I would prefer if the message was used for a
> "with_test_prefix" for the whole proc, instead of putting the context
> in parenthesis.
I changed gdb_cont_to to [1]. The rest of the patch already added
with_test_prefix to most users, which left only two for which I added them.
Thanks,
Markus.
[1]
---
diff --git a/gdb/testsuite/gdb.btrace/non-stop.exp b/gdb/testsuite/gdb.btrace/non-stop.exp
index 1637fab888a..0a9b753eca4 100644
--- a/gdb/testsuite/gdb.btrace/non-stop.exp
+++ b/gdb/testsuite/gdb.btrace/non-stop.exp
@@ -60,17 +60,15 @@ proc gdb_cont_to { threads cmd line nthreads } {
# the prompt precedes any further output except some errors.
gdb_test_multiple "$full_cmd &" "$full_cmd: prompt" {
-re "$gdb_prompt " {
- pass "$full_cmd: prompt"
+ pass $gdb_test_name
}
}
# now check for the expected line - one per thread.
for {set i 0} {$i < $nthreads} {incr i} {
- set test "$full_cmd: thread $i"
-
- gdb_test_multiple "" $test {
+ gdb_test_multiple "" "$full_cmd: thread $i" {
-re "$line\[^\\\r\\\n\]*\r\n" {
- pass $test
+ pass $gdb_test_name
}
}
}
@@ -96,9 +94,13 @@ proc gdb_cont_to_no_history { threads cmd nthreads } {
}
# trace the code between the two breakpoints
-gdb_cont_to_bp_line "$srcfile:$bp_1" all 2
-gdb_test_no_output "record btrace"
-gdb_cont_to_bp_line "$srcfile:$bp_2" all 2
+with_test_prefix "prepare" {
+ gdb_cont_to_bp_line "$srcfile:$bp_1" all 2
+}
+with_test_prefix "record" {
+ gdb_test_no_output "record btrace"
+ gdb_cont_to_bp_line "$srcfile:$bp_2" all 2
+}
# we don't need those breakpoints any longer.
# they will only disturb our stepping.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
next prev parent reply other threads:[~2020-12-21 7:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 15:12 [PATCH] gdb, record: rephrase the 'not recording' error message Markus Metzger via Gdb-patches
2020-12-17 15:12 ` [PATCH 1/4] testsuite, gdb.btrace: make test names unique Markus Metzger via Gdb-patches
2020-12-18 19:34 ` Simon Marchi via Gdb-patches
2020-12-21 7:26 ` Metzger, Markus T via Gdb-patches [this message]
2020-12-17 15:12 ` [PATCH 2/4] testsuite, gdb.python: make py-record-*.exp " Markus Metzger via Gdb-patches
2020-12-18 19:35 ` Simon Marchi via Gdb-patches
2020-12-17 15:12 ` [PATCH 3/4] testsuite, gdb.btrace: skip multi-inferior.exp on gdbserver targets Markus Metzger via Gdb-patches
2020-12-18 19:49 ` Simon Marchi via Gdb-patches
2020-12-21 7:27 ` Metzger, Markus T via Gdb-patches
2020-12-21 13:50 ` Simon Marchi via Gdb-patches
2020-12-17 15:12 ` [PATCH 4/4] testsuite, gdb.btrace: fix 32-bit PIE false positives Markus Metzger via Gdb-patches
2020-12-18 20:01 ` Simon Marchi via Gdb-patches
2020-12-21 7:27 ` Metzger, Markus T via Gdb-patches
2020-12-18 19:18 ` [PATCH] gdb, record: rephrase the 'not recording' error message Simon Marchi via Gdb-patches
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=DM5PR11MB169042A29F2186B9D6882387DEC00@DM5PR11MB1690.namprd11.prod.outlook.com \
--to=gdb-patches@sourceware.org \
--cc=markus.t.metzger@intel.com \
--cc=simon.marchi@polymtl.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