This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Avoid flaky target problems in solib-weak.exp
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Wed, 12 Sep 2007 11:17:47 -0400
- Subject: [commit] Avoid flaky target problems in solib-weak.exp
There's a few test cases already (chng-syms.exp, reread.exp) which
involve modifying a file in place while debugging. solib-weak.exp
wasn't intended to test this, so I've changed it to be more robust if
your target system takes a little while to pick up file replacement
over NFS - lame, but that's what a bunch of our boards here do. The
tests which are looking at in-place changes deliberately include
delays which suffice. It's only when we race as fast as possible
that the tests go crazy.
Checked in, after stress testing on powerpc-linux.
--
Daniel Jacobowitz
CodeSourcery
2007-09-12 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.base/solib-weak.exp (do_test): Adjust the file names for each
test.
Index: gdb.base/solib-weak.exp
===================================================================
--- gdb.base/solib-weak.exp (revision 181595)
+++ gdb.base/solib-weak.exp (working copy)
@@ -42,31 +42,38 @@ if {![test_compiler_info "gcc-*"]} {
proc do_test { lib1opts lib2opts lib1first } {
global objdir srcdir subdir
+ set testfile "solib-weak"
+ set srcfile ${testfile}.c
+
+ set libfile1 "weaklib1"
+ set libfile2 "weaklib2"
+ set lib1src ${srcdir}/${subdir}/${libfile1}.c
+ set lib2src ${srcdir}/${subdir}/${libfile2}.c
+
+ # Select a unique name for this test. Give each library and
+ # executable a name reflecting its options, so that file caching
+ # on the target system does not pick up the wrong file.
set testopts ""
if {$lib1opts == ""} {
append testopts "lib1 nodebug, "
} else {
append testopts "lib1 debug, "
+ append lib1 "-dbg"
}
if {$lib2opts == ""} {
append testopts "lib2 nodebug, "
} else {
append testopts "lib2 debug, "
+ append lib2 "-dbg"
}
if {$lib1first} {
append testopts "lib1 first"
} else {
append testopts "lib2 first"
+ append testfile "-lib2"
}
- set testfile "solib-weak"
- set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-
- set libfile1 "weaklib1"
- set libfile2 "weaklib2"
- set lib1src ${srcdir}/${subdir}/${libfile1}.c
- set lib2src ${srcdir}/${subdir}/${libfile2}.c
set lib1 ${objdir}/${subdir}/${libfile1}.sl
set lib2 ${objdir}/${subdir}/${libfile2}.sl