From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 38218@debbugs.gnu.org
Subject: bug#38218: network-interface-list only returns IPv4 addresses
Date: Tue, 26 Nov 2019 19:10:04 +0100 [thread overview]
Message-ID: <m2zhgijypv.fsf@gmail.com> (raw)
In-Reply-To: <83h82qsgjm.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 26 Nov 2019 19:17:49 +0200")
[-- Attachment #1: Type: text/plain, Size: 2299 bytes --]
>>>>> On Tue, 26 Nov 2019 19:17:49 +0200, Eli Zaretskii <eliz@gnu.org> said:
Eli> It needed a bit of tweaking for mingw.org's MinGW, so that it would
Eli> work on XP. However, after making the changes, one test from
Eli> nsm-tests.el fails here:
Thanks for that
Eli> 127.1/0 No such host is known.
Eli> 127.1/0 No such host is known.
Eli> Test nsm-check-local-subnet-ipv4 backtrace:
Eli> signal(ert-test-failed (((should (eq nil (nsm-should-check "127.1")
Eli> ert-fail(((should (eq nil (nsm-should-check "127.1"))) :form (eq ni
Eli> (if (unwind-protect (setq value-44 (apply fn-42 args-43)) (setq for
Eli> (let (form-description-46) (if (unwind-protect (setq value-44 (appl
Eli> (let ((value-44 'ert-form-evaluation-aborted-45)) (let (form-descri
Eli> (let* ((fn-42 #'eq) (args-43 (condition-case err (let ((signal-hook
Eli> (let ((nsm-trust-local-network t)) (let* ((fn-37 #'eq) (args-38 (co
Eli> (let ((local-ip '[172 26 128 160 0]) (mask '[255 255 255 0 0]) (wro
Eli> (closure (t) nil (let ((local-ip '[172 26 128 160 0]) (mask '[255 2
Eli> ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-tes
Eli> ert-run-test(#s(ert-test :name nsm-check-local-subnet-ipv4 :documen
Eli> ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable))
Eli> ert-run-tests((not (tag :unstable)) #f(compiled-function (event-typ
Eli> ert-run-tests-batch((not (tag :unstable)))
Eli> ert-run-tests-batch-and-exit((not (tag :unstable)))
Eli> eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t)
Eli> command-line-1((#("-L" 0 2 (charset cp862)) #(";." 0 2 (charset cp8
Eli> command-line()
Eli> normal-top-level()
Eli> Test nsm-check-local-subnet-ipv4 condition:
Eli> (ert-test-failed
Eli> ((should
Eli> (eq nil
Eli> (nsm-should-check "127.1")))
Eli> :form
Eli> (eq nil t)
Eli> :value nil))
Eli> FAILED 1/2 nsm-check-local-subnet-ipv4 (4.656250 sec)
Eek. mingw (or winsock) doesnʼt support getaddrinfo("127.1",...),
although getaddrinfo("127.0.0.1",...) seems to work. This fixes it for me:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Use-127.0.0.1-in-nsm-tests.patch --]
[-- Type: text/x-patch, Size: 1375 bytes --]
From e441c874ac7e7a0c7724af85ebf2d1678aea3a88 Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim@gmail.com>
Date: Tue, 26 Nov 2019 19:07:42 +0100
Subject: [PATCH] Use 127.0.0.1 in nsm-tests
To: emacs-devel@gnu.org
Winsock doesn't like "127.1"
* test/lisp/net/nsm-tests.el (nsm-check-local-subnet-ipv4): Spell
numeric localhost as "127.0.0.1" instead of "127.1".
---
test/lisp/net/nsm-tests.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/lisp/net/nsm-tests.el b/test/lisp/net/nsm-tests.el
index 8e52568d71..97edcca80d 100644
--- a/test/lisp/net/nsm-tests.el
+++ b/test/lisp/net/nsm-tests.el
@@ -42,11 +42,11 @@ nsm-check-local-subnet-ipv4
(should-error (nsm-network-same-subnet local-ip wrong-length-mask remote-ip-yes))
(should (eq nil (nsm-network-same-subnet local-ip wrong-mask remote-ip-yes)))
(should (eq t (nsm-should-check "google.com")))
- (should (eq t (nsm-should-check "127.1")))
+ (should (eq t (nsm-should-check "127.0.0.1")))
(should (eq t (nsm-should-check "localhost")))
(let ((nsm-trust-local-network t))
(should (eq t (nsm-should-check "google.com")))
- (should (eq nil (nsm-should-check "127.1")))
+ (should (eq nil (nsm-should-check "127.0.0.1")))
(should (eq nil (nsm-should-check "localhost"))))))
(defun nsm-ipv6-is-available ()
--
2.24.0.155.gd9f6f3b619
next prev parent reply other threads:[~2019-11-26 18:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 10:13 bug#38218: network-interface-list only returns IPv4 addresses Robert Pluim
2019-11-15 10:18 ` Robert Pluim
2019-11-16 5:17 ` Lars Ingebrigtsen
2019-11-17 20:50 ` Robert Pluim
2019-11-26 8:37 ` Robert Pluim
2019-11-26 17:17 ` Eli Zaretskii
2019-11-26 18:10 ` Robert Pluim [this message]
2019-11-26 18:23 ` Eli Zaretskii
2019-11-26 18:29 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2zhgijypv.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=38218@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.