This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, testsuite] Fix subst.exp failure when GDB is configured with --with-relocated-sources


Hi,

The gdb.base/subst.exp test assumes GDB starts with no default substitution rules, which is not true if GDB has been configured with --with-relocated-sources. In that case we start with a default rule, causing the first test (checking that there are no rules) to fail.

This patch clears any default substitution rules that may exist prior to doing all the other tests.

OK?
2013-06-19  Luis Machado  <lgustavo@codesourcery.com>

	* gdb.base/subst.exp: Delete default rules before further
	tests.

diff --git a/gdb/testsuite/gdb.base/subst.exp b/gdb/testsuite/gdb.base/subst.exp
index e339557..50f6620 100644
--- a/gdb/testsuite/gdb.base/subst.exp
+++ b/gdb/testsuite/gdb.base/subst.exp
@@ -23,6 +23,12 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_test_no_output "set confirm off" \
          "deactivate GDB's confirmation interface"
 
+# Clear any substitution rules that are available by default due
+# to GDB being configured with --with-relocated-sources.
+
+gdb_test_no_output "unset substitute-path" \
+         "remove default substitution rules"
+
 gdb_test "show substitute-path" \
          "List of all source path substitution rules:" \
          "show substitute-path, no rule entered yet"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]