From patchwork Fri May 22 00:41:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 6881 Received: (qmail 113517 invoked by alias); 22 May 2015 00:41:36 -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 113508 invoked by uid 89); 22 May 2015 00:41:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL, BAYES_40, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-qc0-f178.google.com Received: from mail-qc0-f178.google.com (HELO mail-qc0-f178.google.com) (209.85.216.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 22 May 2015 00:41:34 +0000 Received: by qcir1 with SMTP id r1so1743065qci.3 for ; Thu, 21 May 2015 17:41:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Ay2aVffNMPa8yT96HljcOF4tVPq5krs+RbT3SFq+cK8=; b=mOeT5vWW0vXBs/pe+LrSm1LMBC7AWoHZ7bm2E383CFrfuTqKyeTXcc/B/qTf/N+Dnt gZPDAJ7iVMs/TZuU/BsMJjoBOK7Mh7WZbPrG0mo3z9OoxjwjaLv63+inRUZEUY/rDWZb b0o9wAGd1cgXmqEyXTtZIdQqoyfDeLVB+ZpzhwrCvO5E9P+U+TLnSuyERkt3j3EpFdQr jPubZvLmmcNe8+c0ga75tCzkbQ1ld3xKGRyYjK1naP/2T8RnpZi3cgRAshtg7yi+azEM aevSHJf8VHnkdWX76WzqI06frFK7JDZ6HcrpDqVryApH8T/5NaLJ4s8UoE5GWWD+nCb+ Sl/g== X-Gm-Message-State: ALoCoQkLJcdG7CvuYYTIlx5OJHr8V6dopdQn/xyQeUUEhhJViYvWaHraHN8GdJ0exlb+RQDmDXuB X-Received: by 10.140.133.18 with SMTP id 18mr7909129qhf.84.1432255292597; Thu, 21 May 2015 17:41:32 -0700 (PDT) Received: from localhost.localdomain (ool-4353acd8.dyn.optonline.net. [67.83.172.216]) by mx.google.com with ESMTPSA id 195sm351034qhr.13.2015.05.21.17.41.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 May 2015 17:41:31 -0700 (PDT) From: Patrick Palka To: gdb-patches@sourceware.org Cc: Patrick Palka Subject: [PATCH] Make sure test names are unique in gdb.base/gdbinit-history.exp Date: Thu, 21 May 2015 20:41:17 -0400 Message-Id: <1432255277-21570-1-git-send-email-patrick@parcs.ath.cx> Use with_test_prefix to avoid duplicating test names when calling the procedure test_gdbinit_history_setting multiple times. gdb/testsuite/ChangeLog: * gdb.base/gdbinit-history.exp (test_gdbinit_history_setting): Use with_test_prefix. --- gdb/testsuite/gdb.base/gdbinit-history.exp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/gdb.base/gdbinit-history.exp b/gdb/testsuite/gdb.base/gdbinit-history.exp index aba15b4..8adfd68 100644 --- a/gdb/testsuite/gdb.base/gdbinit-history.exp +++ b/gdb/testsuite/gdb.base/gdbinit-history.exp @@ -39,15 +39,17 @@ proc test_gdbinit_history_setting { home size } { set saved_internal_gdbflags $INTERNAL_GDBFLAGS set INTERNAL_GDBFLAGS [string map {"-nx" ""} $INTERNAL_GDBFLAGS] - gdb_exit - gdb_start + with_test_prefix "home=$home" { + gdb_exit + gdb_start - gdb_test "show history size" "The size of the command history is $size." + gdb_test "show history size" "The size of the command history is $size." - if { $size == "0" } { - gdb_test_no_output "show commands" - } elseif { $size != "1" } { - gdb_test "show commands" " . show history size\r\n . show commands" + if { $size == "0" } { + gdb_test_no_output "show commands" + } elseif { $size != "1" } { + gdb_test "show commands" " . show history size\r\n . show commands" + } } set INTERNAL_GDBFLAGS $saved_internal_gdbflags