Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: Sergio Durigan Junior <sergiodj@redhat.com>
Subject: [PATCH] Match any kind of error after "cannot resolve name" on lib/gdbserver-support.exp:gdbserver_start
Date: Mon, 30 Jul 2018 20:43:00 -0000	[thread overview]
Message-ID: <20180730204313.8676-1-sergiodj@redhat.com> (raw)

On commit:

commit 7f1f7e23939adc7d71036a17fc6081e3af7ca585
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Fri Jul 13 16:20:34 2018 -0400

    Expect for another variant of error message when gdbserver cannot resolve hostname

I extended the regular expression being used to identify whether
gdbserver could not resolve a (host)name.  This was needed because the
error message being printed had a different variation across some
systems.  However, as it turns out, I've just noticed that the message
has yet another variation:

  target remote tcp8:123:2353
  tcp8:123:2353: cannot resolve name: System error
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  tcp8:123:2353: No such file or directory.
  (gdb) FAIL: gdb.server/server-connect.exp: tcp8: connect to gdbserver using tcp8:123

which is causing FAILs on some systems (namely, Fedora-i686 on
BuildBot).

So instead of trying to predict everything that can be printed, I
decided to just match anything after the "cannot resolve name: " part.
This patch implements that.

Regression tested on the BuildBot.

gdb/testsuite/ChangeLog:
2018-07-30  Sergio Durigan Junior  <sergiodj@redhat.com>

	* lib/gdbserver-support.exp (gdbserver_start): Match any kind of
	error after "cannot resolve name" string.
---
 gdb/testsuite/ChangeLog                 | 5 +++++
 gdb/testsuite/lib/gdbserver-support.exp | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 671164cf45..eef5fdfdd4 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-30  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* lib/gdbserver-support.exp (gdbserver_start): Match any kind of
+	error after "cannot resolve name" string.
+
 2018-07-28  Andrew Burgess  <andrew.burgess@embecosm.com>
 
 	* gdb.trace/tspeed.exp: Only call gdb_load_shlib after gdb has
diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp
index a0ba4673c8..a741876a3a 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -326,7 +326,7 @@ proc gdbserver_start { options arguments } {
 		    continue
 		}
 	    }
-	    -re ".*: cannot resolve name: \(No address associated with hostname|Name or service not known\)\r\n" {
+	    -re ".*: cannot resolve name: .*\r\n" {
 		error "gdbserver cannot resolve name."
 	    }
 	    timeout {
-- 
2.14.3


             reply	other threads:[~2018-07-30 20:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-30 20:43 Sergio Durigan Junior [this message]
2018-07-30 21:12 ` Tom Tromey
2018-07-30 21:16   ` Sergio Durigan Junior

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=20180730204313.8676-1-sergiodj@redhat.com \
    --to=sergiodj@redhat.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