From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@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 17:02:00 -0000 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> Content-Type: multipart/mixed; boundary="------------5F261408D94E98A9F70E837F" X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00272.txt.bz2 This is a multi-part message in MIME format. --------------5F261408D94E98A9F70E837F Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 353 [ 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 --------------5F261408D94E98A9F70E837F Content-Type: text/x-patch; name="0001-gdb-testsuite-Fix-gdb.gdb-selftest.exp-regexp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0001-gdb-testsuite-Fix-gdb.gdb-selftest.exp-regexp.patch" Content-length: 1350 [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 $" { --------------5F261408D94E98A9F70E837F--