[commit] Two more testcase fixes
Ulrich Weigand
uweigand@de.ibm.com
Tue Sep 29 13:04:00 GMT 2009
Hello,
this patch fixes two more problems in test cases that may lead to spurious
failures on certain targets (I noticed them with the remote/gdbserver target):
- gdb.base/watchpoints.exp should respect the gdb,no_hardware_watchpoints
target_info setting, just like all other watchpoint-related tests do
- gdb.threads/thread-specific.exp fails in get_thread_list if a target
detects new threads during the "info threads" command, causing
[New Thread ...] messages
Tested on s390(x)-linux and ppc(64)-linux.
Committed to mainline and the 7.0 branch.
Bye,
Ulrich
ChangeLog:
* gdb.base/watchpoints.exp: Respect gdb,no_hardware_watchpoints
target_info setting.
* gdb.threads/thread-specific.exp (get_thread_list): Support targets
that detect new threads during "info threads".
Index: gdb/testsuite/gdb.base/watchpoints.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/watchpoints.exp,v
retrieving revision 1.1
diff -c -p -r1.1 watchpoints.exp
*** gdb/testsuite/gdb.base/watchpoints.exp 26 Sep 2009 12:08:31 -0000 1.1
--- gdb/testsuite/gdb.base/watchpoints.exp 29 Sep 2009 00:44:48 -0000
*************** gdb_start
*** 45,50 ****
--- 45,55 ----
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $binfile
+ # Disable hardware watchpoints if necessary.
+ if [target_info exists gdb,no_hardware_watchpoints] {
+ gdb_test "set can-use-hw-watchpoints 0" "" ""
+ }
+
runto_main
gdb_test "watch ival1" "" ""
gdb_test "watch ival3" "" ""
Index: gdb/testsuite/gdb.threads/thread-specific.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/thread-specific.exp,v
retrieving revision 1.8
diff -c -p -r1.8 thread-specific.exp
*** gdb/testsuite/gdb.threads/thread-specific.exp 3 Jan 2009 05:58:07 -0000 1.8
--- gdb/testsuite/gdb.threads/thread-specific.exp 29 Sep 2009 00:44:48 -0000
*************** proc get_thread_list { } {
*** 43,48 ****
--- 43,51 ----
-re "info threads\r\n" {
exp_continue
}
+ -re "New Thread \[^\n\]*\n" {
+ exp_continue
+ }
-re "^\\* *(\[0-9\]*) Thread \[^\n\]*main\[^\n\]*\n" {
set thr_list "$expect_out(1,string) $thr_list"
exp_continue
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
More information about the Gdb-patches
mailing list