This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] testsuite: Avoid unstability in gdb.threads/watchthreads.exp output in gdb.sum
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: <gdb-patches at sourceware dot org>
- Date: Thu, 22 Apr 2010 16:38:35 +0200
- Subject: [RFA] testsuite: Avoid unstability in gdb.threads/watchthreads.exp output in gdb.sum
As can be also seen
in the last email by Chris Moller,
gdb.threads/watchthreads.exp
is generating noise if you use
a simple diff of gdb.sum to test for changes in
the testsuite results.
PASS: gdb.threads/watchthreads.exp: watch args[1]
-PASS: gdb.threads/watchthreads.exp: disable 2
+PASS: gdb.threads/watchthreads.exp: disable 3
This is simply that the order in which the
different threads are executed is not controlled.
But in fact, that either watchpoint 2 or watchpoint 3
reaches 10 first is irrelevant, so
the following patch fixes this simply
by issuing the same output.
Pierre Muller
Pascal language support maintainer for GDB
2010-04-22 Pierre Muller <muller@ics.u-strasbg.fr>
* gdb.threads/watchthreads.exp: Change to obtain
consistent output.
Index: testsuite/gdb.threads/watchthreads.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/watchthreads.exp,v
retrieving revision 1.9
diff -u -p -r1.9 watchthreads.exp
--- testsuite/gdb.threads/watchthreads.exp 1 Jan 2010 07:32:06 -0000
1.9
+++ testsuite/gdb.threads/watchthreads.exp 22 Apr 2010 14:31:43 -0000
@@ -130,10 +130,10 @@ for {set i 0} {$i < 30} {incr i} {
# 10 is chosen so we're guaranteed to come through here.
if { $hwwp_2_enabled && $hwwp_3_enabled } {
if { $args_0 >= 10 && $hwwp_2_enabled } {
- gdb_test "disable 2" ""
+ gdb_test "disable 2" "" "disable first watchpoint at 10"
set hwwp_2_enabled 0
} elseif { $args_1 >= 10 && $hwwp_3_enabled } {
- gdb_test "disable 3" ""
+ gdb_test "disable 3" "" "disable first watchpoint at 10"
set hwwp_3_enabled 0
}
}