From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#23606: 25.1.50; "localhost" vs. "127.0.0.1" Date: Mon, 23 May 2016 16:34:07 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1464035741 9357 80.91.229.3 (23 May 2016 20:35:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 May 2016 20:35:41 +0000 (UTC) To: 23606@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 23 22:35:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b4wZI-0007gb-9y for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 May 2016 22:35:16 +0200 Original-Received: from localhost ([::1]:50384 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4wZH-0005Er-9U for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 May 2016 16:35:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4wZ8-0005B3-CI for bug-gnu-emacs@gnu.org; Mon, 23 May 2016 16:35:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4wZ4-0003pb-60 for bug-gnu-emacs@gnu.org; Mon, 23 May 2016 16:35:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4wZ4-0003pX-1z for bug-gnu-emacs@gnu.org; Mon, 23 May 2016 16:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b4wZ3-0000q0-Ty for bug-gnu-emacs@gnu.org; Mon, 23 May 2016 16:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 May 2016 20:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23606 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14640356533151 (code B ref -1); Mon, 23 May 2016 20:35:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 May 2016 20:34:13 +0000 Original-Received: from localhost ([127.0.0.1]:35157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4wYG-0000ol-Nx for submit@debbugs.gnu.org; Mon, 23 May 2016 16:34:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4wYE-0000oZ-V4 for submit@debbugs.gnu.org; Mon, 23 May 2016 16:34:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4wY8-0003Xx-PR for submit@debbugs.gnu.org; Mon, 23 May 2016 16:34:05 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:46176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4wY8-0003Xm-MR for submit@debbugs.gnu.org; Mon, 23 May 2016 16:34:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4wY4-0004io-So for bug-gnu-emacs@gnu.org; Mon, 23 May 2016 16:34:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4wY1-0003VR-Ln for bug-gnu-emacs@gnu.org; Mon, 23 May 2016 16:34:00 -0400 Original-Received: from limerock01.mail.cornell.edu ([128.84.13.241]:49494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4wY1-0003VH-H7 for bug-gnu-emacs@gnu.org; Mon, 23 May 2016 16:33:57 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock01.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id u4NKXt4X025896 for ; Mon, 23 May 2016 16:33:55 -0400 Original-Received: from [192.168.1.5] (mta-68-175-148-36.twcny.rr.com [68.175.148.36] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id u4NKXsAB000305 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Mon, 23 May 2016 16:33:55 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 X-PMX-Cornell-Gauge: Gauge=XXXXX X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118587 Archived-At: The test echo-server-nowait in test/lisp/net/network-stream-tests.el fails on Cygwin, but it passes if I create the client process using "127.0.0.1" instead of "localhost": diff --git a/test/lisp/net/network-stream-tests.el b/test/lisp/net/network-stream-tests.el index c9b7cc7..80f6b9c 100644 --- a/test/lisp/net/network-stream-tests.el +++ b/test/lisp/net/network-stream-tests.el @@ -143,7 +143,7 @@ server-process-filter (port (aref (process-contact server :local) 4)) (proc (make-network-process :name "foo" :buffer (generate-new-buffer "*foo*") - :host "localhost" + :host "127.0.0.1" :nowait t :service port))) (should (eq (process-status proc) 'connect)) Further investigation shows that if "localhost" is used, then the connection fails with ECONNREFUSED when the first addrinfo returned by getaddrinfo is used, but it succeeds with the second. Since the client socket is nonblocking in the test under discussion, the loop through the addrinfos never gets to try the second one. I notice that there are a couple of places in process.c where the code makes a point of using "127.0.0.1" instead of "localhost", so I wonder if we should just patch the test to do the same. Or do experts think it's worth pursuing this further to find out why it makes a difference on Cygwin? In GNU Emacs 25.1.50.23 (x86_64-unknown-cygwin, GTK+ Version 3.18.9) of 2016-05-23 built on desktop-new Repository revision: d5f42ab6f06e1d468c6b92f2c1ef7b4d5f97ff84 Windowing system distributor 'The Cygwin/X Project', version 11.0.11802000 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --with-modules 'CFLAGS=-g3 -O0'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message puny seq byte-opt gv bytecomp byte-compile cl-extra help-mode cconv cl-loaddefs pcase cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)