emacs-devel
[Top][All Lists]
Advanced

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

Re: ai_flags in calls to getaddrinfo, broader call for reproducibility c


From: Robert Pluim
Subject: Re: ai_flags in calls to getaddrinfo, broader call for reproducibility check
Date: Tue, 12 Jan 2021 17:00:56 +0100

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Tue, 12 Jan 2021 17:01:53 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>> Cc: rtt@dasyatidae.com, emacs-devel@gnu.org
>> 
>> > Iʼve lost track of which tests were failing, but something like
>> > following. And if the 'dns-query' calls succeed but the
>> > network-lookup-address-info ones fail then we have a really messed up
>> > situation.
>> 
>> You assume that a TCP connection to the DNS server there will succeed?
>
> Btw, this succeeds even on my XP box, which doesn't have IPv6
> installed:
>
>   (dns-query "google.com" 'AAAA)
>     => "2a00:1450:4009:80b:0:0:0:200e"
>
> So I'm not sure that test is reliable enough for these purposes.

Itʼs checking if IPv6 names can be resolved, not if IPv6 works. If you
think thatʼs not a useful test, we can remove it.

I can condition all the IPv6 tests on the following, which should
alleviate your concerns:

;; This will need updating when IANA assign more IPv6 global ranges.
(defun ipv6-is-available ()
  (and (featurep 'make-network-process '(:family ipv6))
       (cl-rassoc-if
        (lambda (elt)
          (and (eq 9 (length elt))
               (= (logand (aref elt 0) #xe000) #x2000)))
        (network-interface-list))))

(although itʼs needed in nsm-tests.el and process-tests.el, which
means duplication <sigh>)

Robert



reply via email to

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