From patchwork Fri Feb 7 15:00:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shahab Vahedi X-Patchwork-Id: 37744 Received: (qmail 82491 invoked by alias); 7 Feb 2020 15:01:24 -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 81888 invoked by uid 89); 7 Feb 2020 15:01:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1697, breakinsert, break-insert, HContent-Transfer-Encoding:8bit X-HELO: mail-lj1-f193.google.com Received: from mail-lj1-f193.google.com (HELO mail-lj1-f193.google.com) (209.85.208.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Feb 2020 15:01:01 +0000 Received: by mail-lj1-f193.google.com with SMTP id x14so2431826ljd.13 for ; Fri, 07 Feb 2020 07:01:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cznqQH8x3nc1IYDlPMYAqlKejhihQOnwz/DmwEzrNRI=; b=sNVcdwodx6QqmIQC8JRlTEerC5Bylfl+FvutSD+4FNUzxMqTGJ/n8xLLVprqfRjRaZ hhIceuZgL6l9+tjr/tC7kjLcQdb7tkEEVN1arG+OnEOxHjQoOmeXUTC+gj1kGt+Dk3US +8lG6dLIzGCH+LdRaHev+vuG0OJXWN1AVkpucNrRnThdok0PdG4OfIWEeVoZVL7Z4hVn XnG0+ZpMqRWc0F5tlUgnmOABTp08TCLAX7xkg9orH5UM3mMcpvm96PseLYJl+/0kXj2R 8y1AvoMjZsBvvCFTDjx+6x1jpJcjKukBrjxqQyB46HTP0eVb0ZuA4mX5titNgpqkzg72 7Amg== Return-Path: Received: from archie.internal.synopsys.com ([2a03:1b20:6:f011::2d]) by smtp.gmail.com with ESMTPSA id p136sm1184412lfa.8.2020.02.07.07.00.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 07:00:58 -0800 (PST) From: Shahab Vahedi To: gdb-patches@sourceware.org Cc: Shahab Vahedi , Shahab Vahedi , Francois Bedard , Anton Kolesov Subject: [PATCH 12/14] gdb/testsuite: Skip on of the interp.exp test for remote targets Date: Fri, 7 Feb 2020 16:00:01 +0100 Message-Id: <20200207150003.8383-13-shahab.vahedi@gmail.com> In-Reply-To: <20200207150003.8383-1-shahab.vahedi@gmail.com> References: <20200207150003.8383-1-shahab.vahedi@gmail.com> MIME-Version: 1.0 From: Anton Kolesov One of the tests in interp.exp invokes `-stack-info-frame` through MI and expects that it will return "no registers", because application is not being run. However, if this is done with gdbserver, then GDB is already connected to the server, therefore registers actually exist and the test fails. gdb/testsuite/ChangeLog: 2016-08-19 Anton Kolesov * gdb.base/interp.exp: Skip "stack-info-frame" test if gdbserver was used. Signed-off-by: Anton Kolesov --- gdb/testsuite/gdb.base/interp.exp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/gdb/testsuite/gdb.base/interp.exp b/gdb/testsuite/gdb.base/interp.exp index d2a6d42732e8..2e1e9901e952 100644 --- a/gdb/testsuite/gdb.base/interp.exp +++ b/gdb/testsuite/gdb.base/interp.exp @@ -44,14 +44,18 @@ gdb_test_multiple "interpreter-exec mi \"-break-insert --thread a\"" \ } } -set cmd "interpreter-exec mi \"-stack-info-frame\"" -gdb_test_multiple $cmd $cmd { - -re ".error,msg=.No registers\..\r\n$gdb_prompt " { - pass "$cmd" - gdb_expect 1 { - -re "\r\n$gdb_prompt $" { } - } - } +# If this is a remote target, then GDB already connected to the server, so +# registers do exist and this test doesn't make sense. +if !$use_gdb_stub { + set cmd "interpreter-exec mi \"-stack-info-frame\"" + gdb_test_multiple $cmd $cmd { + -re ".error,msg=.No registers\..\r\n$gdb_prompt " { + pass "$cmd" + gdb_expect 1 { + -re "\r\n$gdb_prompt $" { } + } + } + } } set cmd "interpreter-exec mi1 \"-break-insert main\""