bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23606: 25.1.50; "localhost" vs. "127.0.0.1"


From: Ken Brown
Subject: bug#23606: 25.1.50; "localhost" vs. "127.0.0.1"
Date: Mon, 23 May 2016 16:34:07 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

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)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]