From patchwork Mon Apr 9 15:15:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 26657 Received: (qmail 118562 invoked by alias); 9 Apr 2018 15:15:45 -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 118385 invoked by uid 89); 9 Apr 2018 15:15:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=helped, 2122, Hx-spam-relays-external:209.85.128.194, H*RU:209.85.128.194 X-HELO: mail-wr0-f194.google.com Received: from mail-wr0-f194.google.com (HELO mail-wr0-f194.google.com) (209.85.128.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Apr 2018 15:15:40 +0000 Received: by mail-wr0-f194.google.com with SMTP id c24so9955140wrc.6 for ; Mon, 09 Apr 2018 08:15:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=1HBJzIjl2yDvLwzy3thBG9r+2F7SmYlzfg62x0Z6Kds=; b=RHZIWrlQRlcFH7r8zFjr7rYA8rAhMpelvI1WxcLh8PLz858LBcGNArbF1HyHQeSDgt s422DEohiM6OiMY+HCiaLcNlBIhQkko0nPyWfgWzw+hNyIm4wWcKjjUC1+G46scdCKuw codz3+fSjFj/GOJwOlzIdmcY9qlkqzid1BfRs3GS65HWGzuziF5JwuX+/7is70b6tKXg VHZoiFwY43qnXvEuyeO1cvbQ9oQR3QAiGyrEBNwO9ChbEvkABDdwz4f4v81uFj0FwatP Jx3+e4f7dpR1Nvjj4SU8yuiaTecUw/K2pcBRCXXRjB0JsFXx5sITNGKFnnJqaogMXYnF JWcA== X-Gm-Message-State: AElRT7F+lqxXG+6b4LebixE/XSIcfQBaqPhKCRiSbGGnjiFB+kTyFEj8 lwmgjyGn+M2WLhjoIimmkisRwIJS X-Google-Smtp-Source: AIpwx49ECOJaqkaLKe+dbECNnVFD6Fr8zFhZsCEVED9XwvFx2hiTW+zp+Hkbgs956MV65YDse+pDMQ== X-Received: by 10.223.176.237 with SMTP id j42mr27591700wra.25.1523286933641; Mon, 09 Apr 2018 08:15:33 -0700 (PDT) Received: from localhost (host81-148-252-121.range81-148.btcentralplus.com. [81.148.252.121]) by smtp.gmail.com with ESMTPSA id p19sm836142wrb.75.2018.04.09.08.15.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Apr 2018 08:15:33 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 1/3] gdb/testsuite: Fix broken regexp in gdbstub case Date: Mon, 9 Apr 2018 16:15:27 +0100 Message-Id: <1ec70ce9afe8bebbb3f0257778943d4634ea126b.1523286728.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes When $use_gdb_stub is true then, when we start an MI target there's a regexp to match GDB's startup pattern. Unfortunately the pattern is broken, and we're also missing a timeout case in the match list (which would have helped point out that the regexp was broken). gdb/testsuite/ChangeLog: * lib/mi-support.exp (mi_run_cmd_full): Fix regexp and add a timeout. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/lib/mi-support.exp | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 2846da74e47..851e490f4de 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -979,7 +979,11 @@ proc mi_run_cmd_full {use_mi_command args} { 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}" {} + -re "&\"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}" {} + timeout { + perror "Unable to start target" + return -1 + } } return 0 }