This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [PATCH, ping1] Add missing expect for running a program with CLI jump
- From: "Thomas Preud'homme" <thomas dot preudhomme at foss dot arm dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Fri, 18 Dec 2015 17:52:31 +0800
- Subject: RE: [PATCH, ping1] Add missing expect for running a program with CLI jump
- Authentication-results: sourceware.org; auth=none
[Reworded title to make the intent of this patch hopefully clearer]
Ping?
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] On Behalf Of Thomas Preud'homme
> Sent: Friday, December 04, 2015 1:58 PM
> To: gdb-patches@sourceware.org
> Subject: [PATCH] Add expect for when using CLI jump to run a cmd in
> testsuite
>
> Hi,
>
> Currently, mi_run_cmd_full have no expect for the case where CLI jump
> is used to run a command. This cause subsequent expects to get
> occasionally confused at the output they receive, depending on the
> interleaving of the CLI jump and following commands. This makes
> tracking regressions in gdb more painful because of all the test results flip
> flop. This patch fixes the issue by adding the necessary expect.
>
> ChangeLog entry is as follows:
>
> 2015-10-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
>
> * lib/mi-support.exp (mi_run_cmd_full): Add an expect for the CLI
> jump
> case.
>
>
> diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-
> support.exp
> index 0d17ecb..cc055f6 100644
> --- a/gdb/testsuite/lib/mi-support.exp
> +++ b/gdb/testsuite/lib/mi-support.exp
> @@ -886,6 +886,9 @@ proc mi_run_cmd_full {use_mi_command args} {
> # to better handle RUN.
> send_gdb "jump *$start\n"
> warning "Using CLI jump command, expect run-to-main FAIL"
> + gdb_expect {
> + -re "${run_match}&\"jump
> \\*${start}\\n\"\[\r\n\]+~\"Continuing at 0x\[0-9A-Fa-
> f\]+\\n.\"\[\r\n\]+\^running\[\r\n\]+\\*running,thread-
> id=\"\[^\"\]+\"\r\n${mi_gdb_prompt}" {}
> + }
> return 0
> }
>
>
> With this patch applied, testsuite results become much more stable.
>
> Is this ok for the master branch?
>
> Best regards,
>
> Thomas
>