Match any kind of error after "cannot resolve name" on lib/gdbserver-support.exp...
authorSergio Durigan Junior <sergiodj@redhat.com>
Mon, 30 Jul 2018 19:23:27 +0000 (15:23 -0400)
committerSergio Durigan Junior <sergiodj@redhat.com>
Mon, 30 Jul 2018 21:16:20 +0000 (17:16 -0400)
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
gdb/testsuite/lib/gdbserver-support.exp

index 671164cf450f62ef4500671d6f0fb21ef9c0442a..eef5fdfdd46172aea803fcd634d64bcc857eaa42 100644 (file)
@@ -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
index a0ba4673c8519a5f77a6cab085b3b8d7c0a6bcc0..a741876a3a7423ed2c86202769704d9107db9ffe 100644 (file)
@@ -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 {
This page took 0.03199 seconds and 4 git commands to generate.