This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3] Make environ.exp run on all platforms (and create info-program.exp)
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