This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH/thread test: Fix thinko in sched-lock.exp


My apologies to everyone suffering bizarre unrepeatable failures in
schedlock.exp.  Yes, there are a few, but not as many as the test claimed.
The bug:

    -re "\\\$\[0-9\]+ = {(\[0-9\]+), (\[0-9\]+), (\[0-9\]+), (\[0-9\]+), (\[0-9\]+), (\[0-9\]+)}.*$gdb_prompt"

Unfortunately the variable in question was signed.  I wasn't matching the
minus signs.  Making it unsigned has changed the failure results quite a
bit; it fixes about a half-dozen failures in schedlock.exp.  I've committed
the attached patch as obvious-in-hindsight.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2002-10-22  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.threads/schedlock.c (args): Make unsigned.

Index: testsuite/gdb.threads/schedlock.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/schedlock.c,v
retrieving revision 1.1
diff -u -p -r1.1 schedlock.c
--- testsuite/gdb.threads/schedlock.c	23 Aug 2002 20:32:02 -0000	1.1
+++ testsuite/gdb.threads/schedlock.c	23 Oct 2002 03:21:13 -0000
@@ -7,7 +7,7 @@ void *thread_function(void *arg); /* Poi
 
 #define NUM 5
 
-int args[NUM+1];
+unsigned int args[NUM+1];
 
 int main() {
     int res;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]