Expect for another variant of error message when gdbserver cannot resolve hostname
authorSergio Durigan Junior <sergiodj@redhat.com>
Fri, 13 Jul 2018 20:20:34 +0000 (16:20 -0400)
committerSergio Durigan Junior <sergiodj@redhat.com>
Fri, 13 Jul 2018 20:20:34 +0000 (16:20 -0400)
I've noticed that on a few hosts, when given an invalid hostname,
gdbserver fails with:

  spawn /../../gdb/gdbserver/gdbserver --once tcp8:123:2353 /gdb/build/fedora-s390x/build/gdb/testsuite/outputs/gdb.server/server-connect/server-connect
  tcp8:123:2353: cannot resolve name: No address associated with hostname
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Exiting

Unfortunately, this causes a fail on the new
gdb.server/server-connect.exp test (introduced by the IPv6 patch):

  FAIL: gdb.server/server-connect.exp: tcp8: start gdbserver: gdbserver should fail but did not

This happens because we're expecting for another variant of this error
message:

  cannot resolve name: Name or service not known

Therefore, this patch extends the helper function 'gdbserver_start' to
also recognize the "No address associated with hostname" message.
This "fixes" the testcase on the hosts that use this variant.

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

* lib/gdbserver-support.exp (gdbserver_start): Expect for the
message "No address associated with hostname" when gdbserver
cannot resolve the hostname.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdbserver-support.exp

index 570ba5396dd390212683586af854a4ab88355ac6..ec7a8197a525c6bb5b6e12a9c28b4f34c292c534 100644 (file)
@@ -1,3 +1,9 @@
+2018-07-13  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+       * lib/gdbserver-support.exp (gdbserver_start): Expect for the
+       message "No address associated with hostname" when gdbserver
+       cannot resolve the hostname.
+
 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
 
        * gdb.threads/pthreads.exp: Test qcs FLAG arguments.
index ed9b31b3abbf173a72b049490695d9dde4a91534..a0ba4673c8519a5f77a6cab085b3b8d7c0a6bcc0 100644 (file)
@@ -326,7 +326,7 @@ proc gdbserver_start { options arguments } {
                    continue
                }
            }
-           -re ".*: cannot resolve name: Name or service not known\r\n" {
+           -re ".*: cannot resolve name: \(No address associated with hostname|Name or service not known\)\r\n" {
                error "gdbserver cannot resolve name."
            }
            timeout {
This page took 0.033898 seconds and 4 git commands to generate.