From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 63AFC393FC3C; Sat, 14 Mar 2020 14:48:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63AFC393FC3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1584197309; bh=A4+z2Qi8A+AAqIJJ0vxdlrbGmrNb4uqVIiuLugT5xOc=; h=From:To:Subject:Date:From; b=USMqAPd85D11s117V+UWA9/0vi51oANpi2XoOQ9GJmlUTuOaljJjAariAOpcbAA9t /m9T0XK3PpAepWehR6c9P7k2YZVZs1Xg8b33YZahrrgCdDKpcE0RDD1Tr4H2Pc4LxQ 6MvgyXOIfwEi20u1BAvEk+DN3gbw2r47omPYLXWA= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix check-read1 FAIL in attach-many-short-lived-threads.exp X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 75c56d3d1298de72aa67555f2c723a80b4818e04 X-Git-Newrev: 54c4382534f0c894434deca5eb89cd02661d6feb Message-Id: <20200314144829.63AFC393FC3C@sourceware.org> Date: Sat, 14 Mar 2020 14:48:29 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2020 14:48:29 -0000 https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=54c4382534f0c894434deca5eb89cd02661d6feb commit 54c4382534f0c894434deca5eb89cd02661d6feb Author: Tom de Vries Date: Sat Mar 14 15:48:26 2020 +0100 [gdb/testsuite] Fix check-read1 FAIL in attach-many-short-lived-threads.exp When running test-case gdb.threads/attach-many-short-lived-threads.exp with check-read1, I ran into: ... FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 1: \ no new threads (timeout) ... Fix this by rewriting the gdb_test_multiple call using -lbl and exp_continue. Tested on x86_64-linux, with make targets check and check-read1. gdb/testsuite/ChangeLog: 2020-03-14 Tom de Vries * gdb.threads/attach-many-short-lived-threads.exp: Read "info threads" result in line-by-line fashion. Diff: --- gdb/testsuite/ChangeLog | 5 +++++ .../gdb.threads/attach-many-short-lived-threads.exp | 16 +++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a9c28522511..520e4533fa5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-03-14 Tom de Vries + + * gdb.threads/attach-many-short-lived-threads.exp: Read "info threads" + result in line-by-line fashion. + 2020-03-14 Tom de Vries * lib/gdb.exp (supports_statement_frontiers): New proc. diff --git a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp index 9a08e5738b2..13014347b40 100644 --- a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp +++ b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp @@ -108,12 +108,18 @@ proc test {} { sleep 1 set test "no new threads" - gdb_test_multiple "info threads" $test { - -re "New .*$gdb_prompt $" { - fail $test + set status 1 + gdb_test_multiple "info threads" $test -lbl { + -re "\r\n\[^\r\n\]*New " { + set status 0 + exp_continue } - -re "$gdb_prompt $" { - pass $test + -re -wrap "" { + if { $status == 1 } { + pass $gdb_test_name + } else { + fail $gdb_test_name + } } }