From patchwork Mon Sep 16 02:25:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 34534 Received: (qmail 118492 invoked by alias); 16 Sep 2019 02:25:35 -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 118444 invoked by uid 89); 16 Sep 2019 02:25:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.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_PASS autolearn=ham version=3.3.1 spammy=HX-Received:a0c, H*f:sk:cover.1, HX-HELO:sk:mail-qt X-HELO: mail-qt1-f180.google.com Received: from mail-qt1-f180.google.com (HELO mail-qt1-f180.google.com) (209.85.160.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Sep 2019 02:25:33 +0000 Received: by mail-qt1-f180.google.com with SMTP id d2so3757424qtr.4 for ; Sun, 15 Sep 2019 19:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=tyKD/lBW0Xpduj5k0CsRyqzfPTAptjtVBAzFb5isVRc=; b=AKRM4+jIWJs91jgzIPV2UkAieUuwdjaPzn8Zz0/rHr2GbL+ZgTAdi6K+46KNwEf2bN KTKrGeAMpIp+mpIqAbQhjZiz1FQnfL/1Ci7gU3mXhrl+JDkvXQh2aiDRvkTfck5n0H3S dsz2wEB9em+kAm+Z25qBQ/IlAJ6K2iIXsit5b20vtR0fD6b9knWQKFYPJtU0/2Sg5g+Z fdMjOK7DVRJg2pPUnc8gBFLCOtu1swWOtkoVTJNV4x04NQqERwmJ0nxaChjCnSBrF7hj a3n2rt0pNLwetGu8h7Qq0w8UaHvrfamvqmIyWMrbCh5PXKUBslDGbAN6sUAbH0wrJwnl u1HA== Return-Path: Received: from localhost ([207.253.95.5]) by smtp.gmail.com with ESMTPSA id c12sm7548511qkc.81.2019.09.15.19.25.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 15 Sep 2019 19:25:31 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 2/4] gdb/testsuite: Make test names unique in gdb.linespec tests Date: Sun, 15 Sep 2019 22:25:22 -0400 Message-Id: <97e00f572866266637a5190fb9afb62aba8ad09a.1568600105.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes Make test names unique in the gdb.linespec tests. On my local machine this removed 43 duplicate test names. It is possible that different setups might still encounter some duplicates. gdb/testsuite/ChangeLog: * gdb.linespec/explicit.exp: Make test names unique. * gdb.linespec/ls-errs.exp: Likewise. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.linespec/explicit.exp | 6 ++++-- gdb/testsuite/gdb.linespec/ls-errs.exp | 5 +++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.linespec/explicit.exp b/gdb/testsuite/gdb.linespec/explicit.exp index e50e5033437..03f898c3c13 100644 --- a/gdb/testsuite/gdb.linespec/explicit.exp +++ b/gdb/testsuite/gdb.linespec/explicit.exp @@ -104,8 +104,10 @@ namespace eval $testfile { # Test abbreviations set short [string range $arg 0 3] - gdb_test "break -$short" \ - [string_to_regexp "missing argument for \"-$short\""] + if { $arg != $short } { + gdb_test "break -$short" \ + [string_to_regexp "missing argument for \"-$short\""] + } } # Test invalid arguments diff --git a/gdb/testsuite/gdb.linespec/ls-errs.exp b/gdb/testsuite/gdb.linespec/ls-errs.exp index f031c461cb9..0743d89bfaf 100644 --- a/gdb/testsuite/gdb.linespec/ls-errs.exp +++ b/gdb/testsuite/gdb.linespec/ls-errs.exp @@ -92,7 +92,8 @@ proc do_test {lang} { gdb_test "break $linespec" [string_to_regexp \ [eval format \$error_messages($msg_id) \ - $args]] + $args]] \ + "'break $linespec'" } # Some commonly used whitespace tests around ':'. @@ -234,7 +235,7 @@ proc do_test {lang} { test_break "main:here${x}" unexpected "end of input" } - foreach x {"3" "+100" "-100" "foo"} { + foreach_with_prefix x {"3" "+100" "-100" "foo"} { test_break "main 3" invalid_function "main 3" test_break "-function \"main $x\"" invalid_function "main $x" if {$x == "foo"} {