From patchwork Fri Jul 13 20:26:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Durigan Junior X-Patchwork-Id: 28388 Received: (qmail 98067 invoked by alias); 13 Jul 2018 20:26:21 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 98057 invoked by uid 89); 13 Jul 2018 20:26:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Jul 2018 20:26:19 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5DA4A4059FE2 for ; Fri, 13 Jul 2018 20:26:18 +0000 (UTC) Received: from psique.yyz.redhat.com (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 227682156889; Fri, 13 Jul 2018 20:26:17 +0000 (UTC) From: Sergio Durigan Junior To: GDB Patches Cc: Sergio Durigan Junior Subject: [obvious/pushed] Expect for another variant of error message when gdbserver cannot resolve hostname Date: Fri, 13 Jul 2018 16:26:17 -0400 Message-Id: <20180713202617.19899-1-sergiodj@redhat.com> X-IsSubscribed: yes 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 * lib/gdbserver-support.exp (gdbserver_start): Expect for the message "No address associated with hostname" when gdbserver cannot resolve the hostname. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/lib/gdbserver-support.exp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 570ba5396d..ec7a8197a5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-07-13 Sergio Durigan Junior + + * 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 * gdb.threads/pthreads.exp: Test qcs FLAG arguments. diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp index ed9b31b3ab..a0ba4673c8 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: 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 {