This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] wp-replication: Fix test case loop
- From: Luis Machado <lgustavo at codesourcery dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 05 Jul 2013 13:21:41 -0300
- Subject: Re: [PATCH] wp-replication: Fix test case loop
- References: <87ppuxasyo dot fsf at br87z6lw dot de dot ibm dot com>
- Reply-to: lgustavo at codesourcery dot com
Hi,
On 07/05/2013 01:10 PM, Andreas Arnez wrote:
When executing wp-replication.exp on S/390, the loop that counts the
number of available hardware watchpoints does not terminate properly,
because *all* "watch" commands yield "hardware watchpoints".
Since the C source code is not prepared for more than NR_THREADS
hardware watchpoints anyhow, I suggest to add the appropriate exit
condition to the loop.
That's an interesting behavior. Are the resources on s390 nearly
unlimited for hardware watchpoints? Does it run out of hardware
watchpoints eventually?
2013-07-05 Andreas Arnez <arnez@linux.vnet.ibm.com>
* gdb.threads/wp-replication.exp: Stop counting available hardware
watchpoints after NR_THREADS iterations.
diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/gdb.threads/wp-replication.exp
index 8927a43..af3594d 100644
--- a/gdb/testsuite/gdb.threads/wp-replication.exp
+++ b/gdb/testsuite/gdb.threads/wp-replication.exp
@@ -81,6 +81,10 @@ while { $done == 0 } {
gdb_test_multiple "continue" "watchpoint created successfully" {
-re ".*Breakpoint 2, empty_cycle \\(\\).*$gdb_prompt $" {
incr hwatch_count
+ if { $hwatch_count == $NR_THREADS } {
+ set done 1
+ break
+ }
}
-re ".*Could not insert hardware watchpoint.*$gdb_prompt $" {
set done 1
If s390 doesn't run out of hardware watchpoints, i'd add a comment to
the testcase explaining why we have this condition.
Luis