From patchwork Thu Apr 9 12:36:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Wingo X-Patchwork-Id: 6111 Received: (qmail 77407 invoked by alias); 9 Apr 2015 12:36:48 -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 77393 invoked by uid 89); 9 Apr 2015 12:36:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_NEUTRAL autolearn=ham version=3.3.2 X-HELO: sasl.smtp.pobox.com Received: from pb-sasl1.int.icgroup.com (HELO sasl.smtp.pobox.com) (208.72.237.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Apr 2015 12:36:46 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id E524D3FEDA; Thu, 9 Apr 2015 08:36:44 -0400 (EDT) Received: from pb-sasl1.int.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id DEF913FED9; Thu, 9 Apr 2015 08:36:44 -0400 (EDT) Received: from rusty (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 163583FED8; Thu, 9 Apr 2015 08:36:42 -0400 (EDT) From: Andy Wingo To: gdb-patches@sourceware.org Cc: dje@google.com Subject: [PATCH] Fix gdb.guile/scm-parameter.exp path matching Date: Thu, 09 Apr 2015 14:36:40 +0200 Message-ID: <87a8yhh413.fsf@igalia.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 X-Pobox-Relay-ID: 147E618C-DEB5-11E4-8630-99D0625725FD-02397024!pb-sasl1.pobox.com X-IsSubscribed: yes OK to commit? For me the test was failing for srcdir=/home/wingo/src/binutils-gdb/+2.0/../gdb/testsuite. Andy From 9eed15669df55cc792353e44d041a64af5249177 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 9 Apr 2015 14:32:54 +0200 Subject: [PATCH] Fix gdb.guile/scm-parameter.exp path matching gdb/testsuite/ChangeLog: * gdb.guile/scm-parameter.exp: Escape the path that we are matching against, as it might contain characters that are special to regular expressions. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.guile/scm-parameter.exp | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 73785d6..edc6b2e 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2015-04-09 Andy Wingo + * gdb.guile/scm-parameter.exp: Escape the path that we are + matching against, as it might contain characters that are special + to regular expressions. + +2015-04-09 Andy Wingo + * gdb.guile/scm-frame.exp: Add frame-read-register tests, modelled after the Python tests. diff --git a/gdb/testsuite/gdb.guile/scm-parameter.exp b/gdb/testsuite/gdb.guile/scm-parameter.exp index 42a7011..d3015f6 100644 --- a/gdb/testsuite/gdb.guile/scm-parameter.exp +++ b/gdb/testsuite/gdb.guile/scm-parameter.exp @@ -30,7 +30,8 @@ gdb_install_guile_utils gdb_install_guile_module # We use "." here instead of ":" so that this works on win32 too. -gdb_test "guile (print (parameter-value \"directories\"))" "$srcdir/$subdir.\\\$cdir.\\\$cwd" +set escaped_directory [string_to_regexp "$srcdir/$subdir"] +gdb_test "guile (print (parameter-value \"directories\"))" "$escaped_directory.\\\$cdir.\\\$cwd" # Test a simple boolean parameter, and parameter? while we're at it.