From patchwork Tue Aug 6 20:43:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 33982 Received: (qmail 55142 invoked by alias); 6 Aug 2019 20:43: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 54897 invoked by uid 89); 6 Aug 2019 20:43:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=6.2, patrick X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.168.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Aug 2019 20:43:42 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway30.websitewelcome.com (Postfix) with ESMTP id E3EBE2D8D6 for ; Tue, 6 Aug 2019 15:43:40 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id v6J2hgazTiQerv6J2h48Yv; Tue, 06 Aug 2019 15:43:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XKx1SxjKJ+OoIs1LAXVbDsMa2C5+mgCbd7DSZGQvGlM=; b=O5rSELa/tqXTYNNZbUBPMxiVS9 WApZWRnT18DTeA7LANaTNybzoEhKiT4xq/w0UGQP5v988Fccl9YPK6B0zE8tjxPW3DebFfwrEMzqk otOxqI6OZrUToDQH6Yqin8nrG; Received: from 97-122-178-82.hlrn.qwest.net ([97.122.178.82]:57414 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hv6J2-003V9n-Kc; Tue, 06 Aug 2019 15:43:40 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Patrick Palka Subject: [PATCH 5/8] Fix gdb's selftest.exp after readline import Date: Tue, 6 Aug 2019 14:43:31 -0600 Message-Id: <20190806204334.13441-6-tom@tromey.com> In-Reply-To: <20190806204334.13441-1-tom@tromey.com> References: <20190806204334.13441-1-tom@tromey.com> From: Patrick Palka After the sync there is one testsuite regression, the test "signal SIGINT" in gdb.gdb/selftest.exp which now FAILs. Previously, the readline 6.2 SIGINT handler would temporarily reinstall the underlying application's SIGINT handler and immediately re-raise SIGINT so that the orginal handler gets invoked. But now (since readline 6.3) its SIGINT handler does not re-raise SIGINT or directly invoke the original handler; it now sets a flag marking that SIGINT was raised, and waits until readline explicitly has control to call the application's SIGINT handler. Anyway, because SIGINT is no longer re-raised from within readline's SIGINT handler, doing "signal SIGINT" with a stopped inferior gdb process will no longer resume and then immediately stop the process (since there is no 2nd SIGINT to immediately catch). Instead, the inferior gdb process will now just print "Quit" and continue to run. So with this commit, this particular test case is adjusted to reflect this change in behavior (we now have to send a 2nd SIGINT manually to stop it). gdb/testsuite/ChangeLog 2015-07-25 Patrick Palka * gdb.gdb/selftest.exp (test_with_self): Update test to now expect the GDB inferior to no longer immediately stop after being resumed with "signal SIGINT". --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.gdb/selftest.exp | 23 ++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp index 7fdb3b226e1..9651561fafe 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -110,9 +110,26 @@ proc test_with_self { } { } set description "send SIGINT signal to child process" - gdb_test "signal SIGINT" \ - "Continuing with signal SIGINT.*" \ - "$description" + gdb_test_multiple "signal SIGINT" "$description" { + -re "^signal SIGINT\r\nContinuing with signal SIGINT.\r\nQuit\r\n.* $" { + pass "$description" + } + } + + set description "send ^C to child process again" + send_gdb "\003" + gdb_expect { + -re "Program received signal SIGINT.*$gdb_prompt $" { + pass "$description" + } + -re ".*$gdb_prompt $" { + fail "$description" + } + timeout { + fail "$description (timeout)" + } + } + # Switch back to the GDB thread if Guile support is linked in. # "signal SIGINT" could also switch the current thread.