From patchwork Fri Sep 18 19:52:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 8796 Received: (qmail 96013 invoked by alias); 18 Sep 2015 19:53: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 95914 invoked by uid 89); 18 Sep 2015 19:53:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Sep 2015 19:53:31 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1Zd1iq-0000Qe-BI from Sandra_Loosemore@mentor.com for gdb-patches@sourceware.org; Fri, 18 Sep 2015 12:53:28 -0700 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Fri, 18 Sep 2015 12:53:27 -0700 Message-ID: <55FC6B86.8090700@codesourcery.com> Date: Fri, 18 Sep 2015 13:52:38 -0600 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: gdb-patches Subject: [patch, testsuite] fix problems in gdb.base/paginate-bg-execution.exp This patch addresses a couple of problems in gdb.base/paginate-bg-execution.exp: (1) A different "Quit" message can appear in some cases, e.g. if GDB thinks the terminal doesn't support job control -- see the definition of quit in utils.c. The specific situation where I tripped over this was running GDB in a CMD.EXE shell on a remote Windows host via ssh -T. (2) The test was sending a ^C interrupt without testing whether the target had the nointerrupts property set. OK to commit? (I'm not sure this one qualifies as obvious.) -Sandra diff --git a/gdb/testsuite/gdb.base/paginate-bg-execution.exp b/gdb/testsuite/gdb.base/paginate-bg-execution.exp index f7437ac..7b96df7 100644 --- a/gdb/testsuite/gdb.base/paginate-bg-execution.exp +++ b/gdb/testsuite/gdb.base/paginate-bg-execution.exp @@ -104,6 +104,11 @@ proc test_bg_execution_pagination_cancel { how } { -re "Quit\r\n$gdb_prompt $" { pass $test } + # This variant can show up e.g. in remote testing via ssh -T, + # so that GDB has no terminal. + -re "Quit (expect signal SIGINT when the program is resumed)\r\n$gdb_prompt $" { + pass $test + } } gdb_test "p 1" " = 1" "GDB accepts further input" @@ -114,5 +119,7 @@ proc test_bg_execution_pagination_cancel { how } { } test_bg_execution_pagination_return -test_bg_execution_pagination_cancel "ctrl-c" +if ![target_info exists gdb,nointerrupts] { + test_bg_execution_pagination_cancel "ctrl-c" +} test_bg_execution_pagination_cancel "quit"