diff options
author | Robert Pluim <rpluim@gmail.com> | 2019-11-07 16:16:39 +0100 |
---|---|---|
committer | Robert Pluim <rpluim@gmail.com> | 2019-11-08 10:04:13 +0100 |
commit | 063277c5ecd82551b2bf1409d1583edc7c0fcaad (patch) | |
tree | 2c4669471723f2a63aeeed067575778bd5c3bbc8 /test/src | |
parent | 82323253378c310c71cfea393d228321d1fc51f4 (diff) | |
download | emacs-063277c5ecd82551b2bf1409d1583edc7c0fcaad.tar.gz |
Ensure building and running on non-IPv6 capable hosts works
* src/process.c (Fmake_network_process) [AF_INET6]: Only build ::1
localhost when IPv6 is supported.
(Fnetwork_lookup_address_info) [AF_INET6]: Move check for Qipv6 inside
ifdef, since its definition depends on AF_INET6. Don't return IPv6
addresses when they're not supported.
* test/src/process-tests.el (lookup-family-specification,
lookup-google): Only do IPv6 lookup if IPv6 is supported.
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/process-tests.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 158c036aaa7..f065d393d2a 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -337,7 +337,8 @@ See Bug#30460." (skip-unless (not (getenv "EMACS_HYDRA_CI"))) (should-error (network-lookup-address-info "google.com" 'both)) (should (network-lookup-address-info "google.com" 'ipv4)) - (should (network-lookup-address-info "google.com" 'ipv6))) + (when (featurep 'make-network-process '(:family ipv6)) + (should (network-lookup-address-info "google.com" 'ipv6)))) (ert-deftest lookup-unicode-domains () "Unicode domains should fail" @@ -354,11 +355,11 @@ See Bug#30460." "Check that we can look up google IP addresses" (skip-unless (not (getenv "EMACS_HYDRA_CI"))) (let ((addresses-both (network-lookup-address-info "google.com")) - (addresses-v4 (network-lookup-address-info "google.com" 'ipv4)) - (addresses-v6 (network-lookup-address-info "google.com" 'ipv6))) + (addresses-v4 (network-lookup-address-info "google.com" 'ipv4))) (should addresses-both) - (should addresses-v4) - (should addresses-v6))) + (should addresses-v4)) + (when (featurep 'make-network-process '(:family ipv6)) + (should (network-lookup-address-info "google.com" 'ipv6)))) (ert-deftest non-existent-lookup-failure () (skip-unless (not (getenv "EMACS_HYDRA_CI"))) |