Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Andrew Burgess" <aburgess@broadcom.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [PATCH] Tighten regexp in gdb.base/setshow.exp
Date: Tue, 26 Nov 2013 16:28:00 -0000	[thread overview]
Message-ID: <5294C81D.2070903@broadcom.com> (raw)

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?

Thanks,
Andrew

gdb/testsuite/ChangeLog

2013-11-26  Andrew Burgess  <aburgess@broadcom.com>

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

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
     }


             reply	other threads:[~2013-11-26 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-26 16:28 Andrew Burgess [this message]
2013-11-26 16:35 ` Pedro Alves
2013-11-26 21:14   ` Andrew Burgess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5294C81D.2070903@broadcom.com \
    --to=aburgess@broadcom.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox