all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#23606: 25.1.50; "localhost" vs. "127.0.0.1"
@ 2016-05-23 20:34 Ken Brown
  2016-05-23 20:57 ` Glenn Morris
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ken Brown @ 2016-05-23 20:34 UTC (permalink / raw)
  To: 23606

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)






^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-05-24 19:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23 20:34 bug#23606: 25.1.50; "localhost" vs. "127.0.0.1" Ken Brown
2016-05-23 20:57 ` Glenn Morris
2016-05-23 21:00 ` Lars Ingebrigtsen
2016-05-23 22:30   ` Glenn Morris
2016-05-24 15:47     ` Lars Ingebrigtsen
2016-05-24 17:20 ` Achim Gratz
2016-05-24 18:35   ` Ken Brown
2016-05-24 19:19     ` Glenn Morris
2016-05-24 19:57       ` Ken Brown

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.