From patchwork Fri Dec 4 05:57:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preud'homme X-Patchwork-Id: 9877 Received: (qmail 18174 invoked by alias); 4 Dec 2015 05:57:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 18162 invoked by uid 89); 4 Dec 2015 05:57:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 Dec 2015 05:57:49 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-25-gCzg0d7nTBmuvALPbqsR0w-1; Fri, 04 Dec 2015 05:57:44 +0000 Received: from SHAWIN202 ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 4 Dec 2015 05:57:44 +0000 From: "Thomas Preud'homme" To: Subject: [PATCH] Add expect for when using CLI jump to run a cmd in testsuite Date: Fri, 4 Dec 2015 13:57:35 +0800 Message-ID: <000001d12e58$addb5f90$09921eb0$@arm.com> MIME-Version: 1.0 X-MC-Unique: gCzg0d7nTBmuvALPbqsR0w-1 X-IsSubscribed: yes 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 * lib/mi-support.exp (mi_run_cmd_full): Add an expect for the CLI jump case. With this patch applied, testsuite results become much more stable. Is this ok for the master branch? Best regards, Thomas 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 }