* [PATCH] Fix gdb.guile/scm-parameter.exp path matching
@ 2015-04-09 12:36 Andy Wingo
2015-04-13 16:36 ` Doug Evans
0 siblings, 1 reply; 3+ messages in thread
From: Andy Wingo @ 2015-04-09 12:36 UTC (permalink / raw)
To: gdb-patches; +Cc: dje
[-- Attachment #1: Type: text/plain, Size: 113 bytes --]
OK to commit? For me the test was failing for
srcdir=/home/wingo/src/binutils-gdb/+2.0/../gdb/testsuite.
Andy
[-- Attachment #2: 0001-Fix-gdb.guile-scm-parameter.exp-path-matching.patch --]
[-- Type: text/plain, Size: 1761 bytes --]
From 9eed15669df55cc792353e44d041a64af5249177 Mon Sep 17 00:00:00 2001
From: Andy Wingo <wingo@igalia.com>
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 <wingo@igalia.com>
+ * 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 <wingo@igalia.com>
+
* 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.
--
2.1.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix gdb.guile/scm-parameter.exp path matching
2015-04-09 12:36 [PATCH] Fix gdb.guile/scm-parameter.exp path matching Andy Wingo
@ 2015-04-13 16:36 ` Doug Evans
2015-04-28 10:04 ` Andy Wingo
0 siblings, 1 reply; 3+ messages in thread
From: Doug Evans @ 2015-04-13 16:36 UTC (permalink / raw)
To: Andy Wingo; +Cc: gdb-patches
Andy Wingo writes:
> 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 <wingo@igalia.com>
> 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.
LGTM with one nit.
Can you add a similar fix to gdb.python/py-parameter.exp?
Hmmm, there's also the is_remote_host test that
lives in py-parameter.exp (git show 10c5f0a8), which
isn't in scm-parameter.exp, but no need to do that here.
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix gdb.guile/scm-parameter.exp path matching
2015-04-13 16:36 ` Doug Evans
@ 2015-04-28 10:04 ` Andy Wingo
0 siblings, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2015-04-28 10:04 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
On Mon 13 Apr 2015 18:36, Doug Evans <dje@google.com> writes:
> Andy Wingo writes:
> > 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 <wingo@igalia.com>
> > 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.
>
> LGTM with one nit.
> Can you add a similar fix to gdb.python/py-parameter.exp?
>
> Hmmm, there's also the is_remote_host test that
> lives in py-parameter.exp (git show 10c5f0a8), which
> isn't in scm-parameter.exp, but no need to do that here.
Done and pushed, thanks.
Andy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-28 9:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-09 12:36 [PATCH] Fix gdb.guile/scm-parameter.exp path matching Andy Wingo
2015-04-13 16:36 ` Doug Evans
2015-04-28 10:04 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).