From patchwork Thu Oct 12 17:47:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 23503 Received: (qmail 117199 invoked by alias); 12 Oct 2017 17:47:16 -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 117018 invoked by uid 89); 12 Oct 2017 17:47:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Oct 2017 17:47:14 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B8962820F7 for ; Thu, 12 Oct 2017 17:47:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B8962820F7 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from cascais.lan (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42DE81751B for ; Thu, 12 Oct 2017 17:47:13 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed] Enable gdb.base/inferior-died.exp on is_remote target boards Date: Thu, 12 Oct 2017 18:47:12 +0100 Message-Id: <1507830432-8003-1-git-send-email-palves@redhat.com> We support follow-fork in the remote protocol nowadays. Also, the right way to enable non-stop mode is to do it before connecting, and for use_gdb_stub boards, that means we have to do it at gdb_load time. The "modern" pattern for that is to pass non-stop in GDBFLAGS. This makes the test pass with --target_board=native-gdbserver. gdb/testsuite/ChangeLog: 2017-10-12 Pedro Alves Simon Marchi * gdb.base/inferior-died.exp: Remove is_remote and isnative checks. Use build_executable + clean_restart instead of prepare_for_testing. Pass "set non-stop on" via GDBFLAGS instead of enabling non-stop after starting gdb. --- gdb/testsuite/ChangeLog | 8 ++++++++ gdb/testsuite/gdb.base/inferior-died.exp | 13 ++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b6cd6ee..0fa3afb 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,4 +1,12 @@ 2017-10-12 Pedro Alves + Simon Marchi + + * gdb.base/inferior-died.exp: Remove is_remote and isnative + checks. Use build_executable + clean_restart instead of + prepare_for_testing. Pass "set non-stop on" via GDBFLAGS instead + of enabling non-stop after starting gdb. + +2017-10-12 Pedro Alves * gdb.threads/non-ldr-exc-1.exp: No longer skip if is_remote target. * gdb.threads/non-ldr-exc-2.exp: Ditto. diff --git a/gdb/testsuite/gdb.base/inferior-died.exp b/gdb/testsuite/gdb.base/inferior-died.exp index f2005fa..ecf80d4 100644 --- a/gdb/testsuite/gdb.base/inferior-died.exp +++ b/gdb/testsuite/gdb.base/inferior-died.exp @@ -13,11 +13,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if { [is_remote target] || ![isnative] } then { - unsupported "inferior-died.exp" - continue -} - # Until "set follow-fork-mode" and "catch fork" are implemented on # other targets... # @@ -33,12 +28,16 @@ if { ![support_displaced_stepping] } { standard_testfile .c -if { [prepare_for_testing "failed to prepare" ${testfile} ${testfile}.c] } { +if { [build_executable "failed to build" ${testfile} ${testfile}.c] } { return -1 } +save_vars { GDBFLAGS } { + append GDBFLAGS " -ex \"set non-stop on\"" + clean_restart ${binfile} +} + gdb_test_no_output "set detach-on-fork off" -gdb_test_no_output "set non-stop on" if ![runto_main] { return