This is the mail archive of the gdb-patches@sourceware.org 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]

[commit] Fix regexps in gdb.threads/thread-find.exp


I was able to reproduce the failure on a Fedora-13 system.
This should fix it.  Thanks, Jan, for the help.

2011-02-17  Michael Snyder  <msnyder@vmware.com>

	* gdb.threads/thread-find.exp: Fix regular expressions.

Index: thread-find.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/thread-find.exp,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 thread-find.exp
--- thread-find.exp	15 Feb 2011 21:17:53 -0000	1.1
+++ thread-find.exp	17 Feb 2011 22:06:01 -0000
@@ -303,31 +303,31 @@ set see5 0
 set see6 0
 
 gdb_test_multiple "info threads 2 4 6" "info threads 2 4 6" {
-    -re ". 6 .*\"threadname_6.*\" \[\r\n\]*" {
-	set see6 1
+    -re ". 1 \[^\r\n\]*\"threadname_1\" \[^\r\n\]*" {
+	set see1 1
 	exp_continue
     }
-    -re ". 5 .*\"threadname_5.*\" \[\r\n\]*" {
-	set see5 1
+    -re ". 2 \[^\r\n\]*\"threadname_2\" \[^\r\n\]*" {
+	set see2 1
 	exp_continue
     }
-    -re ". 4 .*\"threadname_4.*\" \[\r\n\]*" {
-	set see4 1
+    -re ". 3 \[^\r\n\]*\"threadname_3\" \[^\r\n\]*" {
+	set see3 1
 	exp_continue
     }
-    -re ". 3 .*\"threadname_3.*\" \[\r\n\]*" {
-	set see3 1
+    -re ". 4 \[^\r\n\]*\"threadname_4\" \[^\r\n\]*" {
+	set see4 1
 	exp_continue
     }
-    -re ". 2 .*\"threadname_2.*\" \[\r\n\]*" {
-	set see2 1
+    -re ". 5 \[^\r\n\]*\"threadname_5\" \[^\r\n\]*" {
+	set see5 1
 	exp_continue
     }
-    -re ". 1 .*\"threadname_1.*\" \[\r\n\]*" {
-	set see1 1
+    -re ". 6 \[^\r\n\]*\"threadname_6\" \[^\r\n\]*" {
+	set see6 1
 	exp_continue
     }
-    -re ".*$gdb_prompt $" {
+    -re "$gdb_prompt $" {
 	if { $see2 && $see4 && $see6 && !$see1 && !$see3 && !$see5 } then {
 	    pass "info threads 2 4 6"
 	} else {
@@ -348,31 +348,31 @@ set see5 0
 set see6 0
 
 gdb_test_multiple "info threads 3-5" "info threads 3-5" {
-    -re ". 6 .*\"threadname_6.*\" \[\r\n\]*" {
-	set see6 1
+    -re ". 1 .*\"threadname_1\" \[^\r\n\]*" {
+	set see1 1
 	exp_continue
     }
-    -re ". 5 .*\"threadname_5.*\" \[\r\n\]*" {
-	set see5 1
+    -re ". 2 .*\"threadname_2\" \[^\r\n\]*" {
+	set see2 1
 	exp_continue
     }
-    -re ". 4 .*\"threadname_4.*\" \[\r\n\]*" {
-	set see4 1
+    -re ". 3 .*\"threadname_3\" \[^\r\n\]*" {
+	set see3 1
 	exp_continue
     }
-    -re ". 3 .*\"threadname_3.*\" \[\r\n\]*" {
-	set see3 1
+    -re ". 4 .*\"threadname_4\" \[^\r\n\]*" {
+	set see4 1
 	exp_continue
     }
-    -re ". 2 .*\"threadname_2.*\" \[\r\n\]*" {
-	set see2 1
+    -re ". 5 .*\"threadname_5\" \[^\r\n\]*" {
+	set see5 1
 	exp_continue
     }
-    -re ". 1 .*\"threadname_1.*\" \[\r\n\]*" {
-	set see1 1
+    -re ". 6 .*\"threadname_6\" \[^\r\n\]*" {
+	set see6 1
 	exp_continue
     }
-    -re ".*$gdb_prompt $" {
+    -re "$gdb_prompt $" {
 	if { $see3 && $see4 && $see5 && !$see1 && !$see2 && !$see6 } then {
 	    pass "info threads 3-5"
 	} else {
@@ -395,27 +395,27 @@ set see5 0
 set see6 0
 
 gdb_test_multiple "info threads 3-3" "info threads 3-3" {
-    -re ". 6 .*\"threadname_6.*\" \[\r\n\]*" {
+    -re ". 6 .*\"threadname_6\" \[^\r\n\]*" {
 	set see6 1
 	exp_continue
     }
-    -re ". 5 .*\"threadname_5.*\" \[\r\n\]*" {
+    -re ". 5 .*\"threadname_5\" \[^\r\n\]*" {
 	set see5 1
 	exp_continue
     }
-    -re ". 4 .*\"threadname_4.*\" \[\r\n\]*" {
+    -re ". 4 .*\"threadname_4\" \[^\r\n\]*" {
 	set see4 1
 	exp_continue
     }
-    -re ". 3 .*\"threadname_3.*\" \[\r\n\]*" {
+    -re ". 3 .*\"threadname_3\" \[^\r\n\]*" {
 	set see3 1
 	exp_continue
     }
-    -re ". 2 .*\"threadname_2.*\" \[\r\n\]*" {
+    -re ". 2 .*\"threadname_2\" \[^\r\n\]*" {
 	set see2 1
 	exp_continue
     }
-    -re ". 1 .*\"threadname_1.*\" \[\r\n\]*" {
+    -re ". 1 .*\"threadname_1\" \[^\r\n\]*" {
 	set see1 1
 	exp_continue
     }

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