From patchwork Fri Feb 7 14:59:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shahab Vahedi X-Patchwork-Id: 37737 Received: (qmail 81965 invoked by alias); 7 Feb 2020 15:01:10 -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 81342 invoked by uid 89); 7 Feb 2020 15:00:51 -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=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:00:49 +0000 Received: by mail-lj1-f193.google.com with SMTP id v17so2481180ljg.4 for ; Fri, 07 Feb 2020 07:00:48 -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=gb/QMUhS5WrEEaVVqcAyVyJWKA6Dr4bEiB0Vc+bi6yg=; b=kVGFU660jkhrM7gkw3yYdndhzw1glvgYl+FuHYB/C9llLvRuZ/m5oXQBgMl+b3xYO8 /Y9gNlvJRahUD3gqPaq/qPbyzoKi9XxAwrrGYEeTpW6/go5nVVcM6ZL4ourC8XmnlyWJ TRwMVvL5gNg1sB+vM2rGg1F7hDfx9j/hofLiqvAj5OPEsVLPBXwLCYPpEk0E6LRHPfOq OHdvI3/vtKqOvDJKX6CbW0mo63FnhpSnroOMRZObEs1cK7uHyQuIgJcSxU0vlNE9K2+y aID/FXo7+IBgT/QlIOnKQiQ21dKKhq499D71UUn/FUpJmEF1CbxqEqZEpFowihoupyjj o7VA== 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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 07:00:45 -0800 (PST) From: Shahab Vahedi To: gdb-patches@sourceware.org Cc: Shahab Vahedi , Shahab Vahedi , Francois Bedard , Anton Kolesov Subject: [PATCH 05/14] gdb/testsuite: Skip a few gdb.base/skip.exp tests for remote targets Date: Fri, 7 Feb 2020 15:59:54 +0100 Message-Id: <20200207150003.8383-6-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 Few initial tests in gdb.base/skip.exp expect GDB to be in the state where there is no default file for "skip" command. This is true when debugging native targets - there is no inferior until "run" command is executed and thus there is no "default" skip file. However that is not true for remote targets - after "prepare_for_testing" test procedure GDB is already connected to the target and has an existing inferior, so "default" file is set by that time. gdb/testsuite/ChangeLog: 2016-07-13 Anton Kolesov * gdb.base/skip.exp: Skip a few tests if remotely connected. Signed-off-by: Anton Kolesov --- gdb/testsuite/gdb.base/skip.exp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.base/skip.exp b/gdb/testsuite/gdb.base/skip.exp index 513c9fcc82ea..31a20c868a2a 100644 --- a/gdb/testsuite/gdb.base/skip.exp +++ b/gdb/testsuite/gdb.base/skip.exp @@ -30,10 +30,14 @@ set srcfile skip.c set srcfile1 skip1.c # Right after we start gdb, there's no default file or function to skip. - -gdb_test "skip file" "No default file now." "skip file (no default file)" -gdb_test "skip function" "No default function now." -gdb_test "skip" "No default function now." "skip (no default function)" +# However that is not true for remote targets - after "prepare_for_testing" GDB +# is already connected to the target and has a valid inferior, hence default +# file. +if ![use_gdb_stub] { + gdb_test "skip file" "No default file now." "skip file (no default file)" + gdb_test "skip function" "No default function now." + gdb_test "skip" "No default function now." "skip (no default function)" +} # Test elided args.