From patchwork Wed Dec 12 15:16:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 30648 Received: (qmail 125344 invoked by alias); 12 Dec 2018 15:16:34 -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 125208 invoked by uid 89); 12 Dec 2018 15:16:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=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=transfer X-HELO: mail-wm1-f48.google.com Received: from mail-wm1-f48.google.com (HELO mail-wm1-f48.google.com) (209.85.128.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Dec 2018 15:16:26 +0000 Received: by mail-wm1-f48.google.com with SMTP id n190so6182346wmd.0 for ; Wed, 12 Dec 2018 07:16:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=74hmIg8GDdZ2uDkyx2KTXQ3d3RkPWGDuPPkganyoGBg=; b=gnBAxsJIjTK5+HnX87lPdHYXCYB4vVaJJrOefEG6IcpRmPFyQlxXj2sGjijYEjEDWs 7HwEX0P8r20M6r9/6fEYrq1DgUu65/zkzXOUJXdLi5r8sZRSFrNpWAqGJgr6zypeSEoG hQPSGjyYIo9UkrFVgac2jGr3PTL0731CKDoJUwOovODNIUHX+F40BWebR0flwWUHdvAk 9ZOA8n7/1i37c4iKYIFLcC7IMf6fCUdRLC5GUSPgM+5lUfejUWw7FanVEknChH7PQob6 Ur9LLO+9DkFJwvvcWQ0cwGsliqyb8TFIZNeT9kH+ZB16VvdekbuURrVIb82fvx5tggiz a4hQ== Return-Path: Received: from localhost ([2a02:390:741d:1:3665:d267:b319:d766]) by smtp.gmail.com with ESMTPSA id r64sm3856017wmg.5.2018.12.12.07.16.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Dec 2018 07:16:23 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv3 2/2] gdb: Update test pattern to deal with native-extended-gdbserver Date: Wed, 12 Dec 2018 15:16:14 +0000 Message-Id: <4cef7f98656d92e8d4961840eff57b3810e4fc5d.1544625324.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes When running the test gdb.base/annota1.exp with: make check-gdb RUNTESTFLAGS="--target_board=native-extended-gdbserver gdb.base/annota1.exp" I would see a failure due to some unexpecte lines in GDB's output. The extra lines (when compared with a native run) were about file transfer from the remote back to GDB. This commit extends the regexp for this test to allow for these extra lines, and also splits the rather long regexp up into a list of parts. With this change in place I see no failures for gdb.base/annota1.exp when using the native-extended-gdbserver target board, nor with a native run on X86-64/Linux. gdb/testsuite/ChangeLog: * gdb.base/annota1.exp: Update a test regexp. --- gdb/testsuite/ChangeLog | 4 ++++ gdb/testsuite/gdb.base/annota1.exp | 23 +++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp index 4b34aa84f29..b5a0e87c3ad 100644 --- a/gdb/testsuite/gdb.base/annota1.exp +++ b/gdb/testsuite/gdb.base/annota1.exp @@ -127,8 +127,27 @@ gdb_test_multiple "info break" "breakpoint info" { #exp_internal 1 set binexp [string_to_regexp $binfile] gdb_test_multiple "run" "run until main breakpoint" { - -re "\r\n\032\032post-prompt\r\nStarting program: $binexp \(\r\nwarning: Skipping \[^\r\n\]+ .gdb_index section in \[^\r\n\]+\r\nDo \"set use-deprecated-index-sections on\" before the file is read\r\nto use the section anyway\\.\)?\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032starting\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n\032\032breakpoint 1\r\n\r\nBreakpoint 1, \r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*annota1.c\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n$main_line\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped.*$gdb_prompt$" { - pass "run until main breakpoint" + -re [join { "\r\n\032\032post-prompt\r\nStarting program: $binexp " \ + "\(\(\r\nReading \[^\r\n\]+\)|\(\r\nwarning: File transfers from remote targets can be slow\[^\r\n\]+\)\)*" \ + "\(\r\nwarning: Skipping \[^\r\n\]+ .gdb_index section in \[^\r\n\]+\r\nDo \"set use-deprecated-index-sections on\" before the file is read\r\nto use the section anyway\\.\)?" \ + "\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n" \ + "\032\032starting\(\(\r\nReading \[^\r\n\]+\)|\(\r\nwarning: File transfers from remote targets can be slow\[^\r\n\]+\)\)*" \ + "\(\(\r\n\r\n\032\032frames-invalid\)|\(\r\n\r\n\032\032breakpoints-invalid\)\)*\r\n\r\n" \ + "\032\032breakpoint 1\r\n\r\n" \ + "Breakpoint 1, \r\n" \ + "\032\032frame-begin 0 $hex\r\n\r\n" \ + "\032\032frame-function-name\r\n" \ + "main\r\n" \ + "\032\032frame-args\r\n \\(\\)\r\n" \ + "\032\032frame-source-begin\r\n at \r\n" \ + "\032\032frame-source-file\r\n.*annota1.c\r\n" \ + "\032\032frame-source-file-end\r\n:\r\n" \ + "\032\032frame-source-line\r\n$main_line\r\n" \ + "\032\032frame-source-end\r\n\r\n\r\n" \ + "\032\032source.*$srcfile:$main_line:.*:beg:$hex\r\n\r\n" \ + "\032\032frame-end\r\n\r\n" \ + "\032\032stopped.*$gdb_prompt$" } ] { + pass "run until main breakpoint" } } #exp_internal 0