From: Pedro Alves <palves@redhat.com>
To: Luis Machado <lgustavo@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Remove unneeded pattern matching in gdb.base/maint.exp
Date: Fri, 02 Dec 2016 17:30:00 -0000 [thread overview]
Message-ID: <cccb25a5-9bc2-4179-19a9-41293907bf70@redhat.com> (raw)
In-Reply-To: <1480698345-9779-1-git-send-email-lgustavo@codesourcery.com>
On 12/02/2016 05:05 PM, Luis Machado wrote:
> This gets rid of more useless pattern matching cases in gdb.base/maint.exp. It
> is a follow-on to the previous patch that only removed the timeouts.
>
> Regression-checked by running gdb.base/maint.exp.
>
> gdb/testsuite/ChangeLog:
>
> 2016-12-02 Luis Machado <lgustavo@codesourcery.com>
>
> * gdb.base/maint.exp: Remove gdb_prompt and timeout handling in
> gdb_test_multiple calls.
> Use gdb_test instead of gdb_test_multiple when possible.
> ---
> gdb/testsuite/gdb.base/maint.exp | 27 ++++++++-------------------
> 1 file changed, 8 insertions(+), 19 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
> index 17c606b..9d08ff1 100644
> --- a/gdb/testsuite/gdb.base/maint.exp
> +++ b/gdb/testsuite/gdb.base/maint.exp
> @@ -71,7 +71,7 @@ gdb_test "maint print registers" "Name.*Nr.*Rel.*Offset.*Size.*Type.*"
> gdb_test_no_output "mt set per on" "mt set per on for expand-symtabs"
> gdb_test_multiple "mt expand-symtabs $subdir/break\[.\]c$" \
> "mt expand-symtabs" {
> - -re "#compunits: (1|2) \\(\[+\](0|1|2)\\),.*$gdb_prompt $" {
> + -re "#compunits: (1|2) \\(\[+\](0|1|2)\\),.*" {
Why are you removing this ...
> # This should expand at most two primary symtabs.
> # "Normally" it will not expand any, because the symtab
> # holding "main" will already have been expanded, but if the
> @@ -93,7 +93,7 @@ if ![runto_main] then {
> # If we're using .gdb_index there will be no psymtabs.
> set have_gdb_index 0
> gdb_test_multiple "maint info sections .gdb_index" "check for .gdb_index" {
> - -re ": .gdb_index.*$gdb_prompt $" {
> + -re ": .gdb_index.*" {
> set have_gdb_index 1
> }
... and this ...
> -re ".*$gdb_prompt $" {
> @@ -287,29 +287,18 @@ gdb_test "cd [standard_output_file {}]" \
> "cd to objdir"
>
> gdb_test_multiple "maint print msymbols msymbols_output2 ${testfile}" "maint print msymbols" {
> - -re "^maint print msymbols msymbols_output2 \[^\n\]*\r\n$gdb_prompt $" {
> + -re "^maint print msymbols msymbols_output2 \[^\n\]*\r\n" {
... and this?
> gdb_test_multiple "shell ls msymbols_output2" "maint print msymbols" {
> -re "msymbols_output2\r\n$gdb_prompt $" {
> - gdb_test_multiple "shell grep factorial msymbols_output2" "maint print msymbols" {
> - -re "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*$gdb_prompt $" {
> - pass "maint print msymbols"
> - }
> - -re ".*$gdb_prompt $" {
> - fail "maint print msymbols"
> - }
> - }
> - gdb_test "shell rm -f msymbols_output2" ".*" \
> - "shell rm -f msymbols_output2"
> - }
> - -re ".*$gdb_prompt $" {
> - fail "maint print msymbols"
> + gdb_test "shell grep factorial msymbols_output2" \
> + "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*" \
> + "maint print msymbols"
> + gdb_test "shell rm -f msymbols_output2" ".*"
> }
> }
> }
> - -re ".*$gdb_prompt $" {
> - fail "maint print msymbols"
> - }
> }
> +
> gdb_test "cd ${mydir}" \
> "Working directory [string_to_regexp ${mydir}]\..*" \
> "cd to mydir"
>
This part looks OK.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2016-12-02 17:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-02 17:06 Luis Machado
2016-12-02 17:30 ` Pedro Alves [this message]
2016-12-02 17:41 ` Luis Machado
2016-12-02 17:48 ` Pedro Alves
2016-12-02 19:02 ` [PATCH] [v2] " Luis Machado
2016-12-02 19:10 ` Pedro Alves
2016-12-02 19:37 ` Luis Machado
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=cccb25a5-9bc2-4179-19a9-41293907bf70@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.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