From: Pedro Alves <palves@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>,
Luis Machado <lgustavo@codesourcery.com>
Subject: Re: [PATCH v3] Make environ.exp run on all platforms (and create info-program.exp)
Date: Thu, 27 Apr 2017 22:37:00 -0000 [thread overview]
Message-ID: <977918db-acba-00a8-18ef-8e2ae146348c@redhat.com> (raw)
In-Reply-To: <874lx9zn4w.fsf@redhat.com>
On 04/27/2017 08:06 PM, Sergio Durigan Junior wrote:
> # Verify that GDB can manipulate the distinguished PATH variable.
> -#
> -send_gdb "path /tmp/FOOBARBAZGRUNGESPAZBALL\n"
> -gdb_expect {
> - -re ".*Executable and object file path: /tmp/FOOBARBAZGRUNGESPAZBALL.*$gdb_prompt $"\
> - {pass "issue path"}
> - -re "$gdb_prompt $"\
> - {fail "issue path"}
> - timeout {fail "(timeout) issue path"}
> -}
> -send_gdb "show paths\n"
> -gdb_expect {
> - -re "Executable and object file path: /tmp/FOOBARBAZGRUNGESPAZBALL.*$gdb_prompt $"\
> - {pass "show paths"}
> - -re "$gdb_prompt $"\
> - {fail "show paths"}
> - timeout {fail "(timeout) show paths"}
> -}
> +gdb_test "path /tmp/FOOBARBAZGRUNGESPAZBALL" \
> + ".*Executable and object file path: /tmp/FOOBARBAZGRUNGESPAZBALL.*" \
> + "set path containing env var name"
Can you drop the redundant leading ".*" in the regexes while at it?
I saw a couple in info-program.exp, but there might be more
throughout the patch.
BTW, re. the test msg above, I don't think that the fact that that
funny name was used as env var name in the previous tests is relevant.
> +gdb_test "show paths" \
> + "Executable and object file path: /tmp/FOOBARBAZGRUNGESPAZBALL.*" \
> + "show paths correctly show path with env var name"
Ditto. (and "correctly shows path")
> +# We don't really care where this step lands, so long as it gets
> +# the inferior pushed off the breakpoint it's currently on...
> +gdb_test "next" "$decimal\t.*" "advancing pc"
s/advancing/advance. But the old test message was better IMO:
> - {pass "step before info program"}
because the next test is explicitly checking that
"It stopped after being stepped" is printed.
OK with the nits above addressed.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-04-27 22:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 17:29 [PATCH] " Sergio Durigan Junior
2017-04-12 23:30 ` Sergio Durigan Junior
2017-04-13 14:35 ` Luis Machado
2017-04-13 18:26 ` Sergio Durigan Junior
2017-04-13 18:29 ` Luis Machado
2017-04-13 18:34 ` Sergio Durigan Junior
2017-04-20 19:54 ` Luis Machado
2017-04-25 20:47 ` [PATCH v2] " Sergio Durigan Junior
2017-04-26 18:43 ` Luis Machado
2017-04-26 19:42 ` Sergio Durigan Junior
2017-04-26 22:28 ` [PATCH v3] " Sergio Durigan Junior
2017-04-27 14:53 ` Pedro Alves
2017-04-27 19:06 ` Sergio Durigan Junior
2017-04-27 22:37 ` Pedro Alves [this message]
2017-04-29 0:32 ` Sergio Durigan Junior
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=977918db-acba-00a8-18ef-8e2ae146348c@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.com \
--cc=sergiodj@redhat.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