This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit, testsuite] Fix py-shared.exp file name comparison with "remote:" sysroot
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 11 Oct 2011 21:12:33 +0200 (CEST)
- Subject: [commit, testsuite] Fix py-shared.exp file name comparison with "remote:" sysroot
Hello,
the py-shared.exp test case assumes that in remote testing, GDB will
find the py-shared-sl.sl in the testsuite build directory (e.g.
gdb/testsuite/gdb.pyhton).
The normal lookup sequence GDB uses is to check the sysroot directory
first; and if it isn't found there, to check the solib-search-path.
Since the testcase specific library normally will not be in the sysroot,
GDB will thus indeed find it in the testsuite build directory, which
was registered via solib-search-patch.
However, when using sysroot "remote:", the library *will* be found
in the sysroot, since it was actually copied to the remote target.
This is really correct, but makes the py-shared.exp testcase fail
spuriously.
The patch below relaxes the check so that both situations pass.
Tested on arm-linux-gnueabi (with "remote:" sysroot testing) and
on i386-linux in native testing.
Committed to mainline.
Bye,
Ulrich
ChangeLog:
* gdb.python/py-shared.exp: Relax filename check to handle remote:
sysroot.
Index: gdb/testsuite/gdb.python/py-shared.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-shared.exp,v
retrieving revision 1.4
diff -u -p -r1.4 py-shared.exp
--- gdb/testsuite/gdb.python/py-shared.exp 22 Jul 2011 17:45:16 -0000 1.4
+++ gdb/testsuite/gdb.python/py-shared.exp 11 Oct 2011 18:53:22 -0000
@@ -62,7 +62,7 @@ runto [gdb_get_line_number "Break to end
# Test gdb.solib_name
gdb_test "p &func1" "" "func1 address"
gdb_py_test_silent_cmd "python func1 = gdb.history(0)" "Aquire func1 address" 1
-gdb_test "python print gdb.solib_name(long(func1))" "gdb/testsuite/gdb.python/py-shared-sl.sl" "test func1 solib location"
+gdb_test "python print gdb.solib_name(long(func1))" "py-shared-sl.sl" "test func1 solib location"
gdb_test "p &main" "" "main address"
gdb_py_test_silent_cmd "python main = gdb.history(0)" "Aquire main address" 1
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com