From patchwork Tue Aug 13 17:02:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 34072 Received: (qmail 53496 invoked by alias); 13 Aug 2019 17:02:22 -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 53436 invoked by uid 89); 13 Aug 2019 17:02:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Aug 2019 17:02:21 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D1D76AD2B; Tue, 13 Aug 2019 17:02:18 +0000 (UTC) Subject: [committed][gdb/testsuite] Fix gdb.gdb/selftest.exp regexp To: Tom Tromey , gdb-patches@sourceware.org Cc: Patrick Palka References: <20190806204334.13441-1-tom@tromey.com> <20190806204334.13441-6-tom@tromey.com> From: Tom de Vries Openpgp: preference=signencrypt Message-ID: Date: Tue, 13 Aug 2019 19:02:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190806204334.13441-6-tom@tromey.com> X-IsSubscribed: yes [ was Re: [PATCH 5/8] Fix gdb's selftest.exp after readline import ] On 06-08-19 22:43, Tom Tromey wrote: > From: Patrick Palka > > + gdb_expect { > + -re "Program received signal SIGINT.*$gdb_prompt $" { > + pass "$description" > + } I've fixed this regexp to also accept "Thread" instead of "Program". Thanks, - Tom [gdb/testsuite] Fix gdb.gdb/selftest.exp regexp With gdb.gdb/selftest.exp, we get: ... (xgdb) PASS: gdb.gdb/selftest.exp: send SIGINT signal to child process ^M Thread 1 "xgdb" received signal SIGINT, Interrupt.^M 0x00007ffff5bf01db in poll () from /lib64/libc.so.6^M (gdb) FAIL: gdb.gdb/selftest.exp: send ^C to child process again ... The failure is due to gdb printing 'Thread 1 "xgdb" received signal SIGINT', but the regexp in the test-case expecting 'Program received signal SIGINT'. Fix this by updating the regexp, similar to how that is done earlier in the test-case. gdb/testsuite/ChangeLog: 2019-08-13 Tom de Vries * gdb.gdb/selftest.exp (send ^C to child process again): Accept also Thread. --- gdb/testsuite/gdb.gdb/selftest.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp index 9651561faf..2f481ec404 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -119,7 +119,7 @@ proc test_with_self { } { set description "send ^C to child process again" send_gdb "\003" gdb_expect { - -re "Program received signal SIGINT.*$gdb_prompt $" { + -re "(Thread .*|Program) received signal SIGINT.*$gdb_prompt $" { pass "$description" } -re ".*$gdb_prompt $" {