This is the mail archive of the 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] Tighten regexp in gdb.base/setshow.exp

Had a random test failure in gdb.base/setshow.exp caused by $gdb_prompt
not being used on the end of a regexp for gdb_test_multiple.

Fixed in the two obvious places.  Other uses of gdb_test_multiple in
this file are messing with the prompt so I've left them alone.

OK to apply?



2013-11-26  Andrew Burgess  <>

	* gdb.base/setshow.exp: Add $gdb_prompt to the patterns in

diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp
index d9e71d3..21df262 100644
--- a/gdb/testsuite/gdb.base/setshow.exp
+++ b/gdb/testsuite/gdb.base/setshow.exp
@@ -169,7 +169,7 @@ gdb_test "show history expansion on" "History expansion on command input is on.*
 set HOME ""
 set test "show environment HOME"
 gdb_test_multiple $test $test {
-    -re "\nHOME = (.*).\n.*" {
+    -re "\nHOME = (\[^\n\r\]*)\[\r\n\]+$gdb_prompt $" {
         set HOME $expect_out(1,string)
         pass $test
@@ -185,7 +185,7 @@ gdb_test "show history filename" \
 set PWD ""
 set test "show working directory"
 gdb_test_multiple "pwd" $test {
-    -re "\nWorking directory (.*)..\n.*" {
+    -re "\nWorking directory (\[^\n\r\]*)\\.\[\r\n\]+$gdb_prompt $" {
         set PWD $expect_out(1,string)
         pass $test

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