]> git.eshelyaron.com Git - emacs.git/commit
Skip tests that require Internet when there's no Internet
authorRobert Pluim <rpluim@gmail.com>
Mon, 22 Feb 2021 14:05:48 +0000 (15:05 +0100)
committerRobert Pluim <rpluim@gmail.com>
Mon, 22 Feb 2021 14:48:06 +0000 (15:48 +0100)
commita728135a2b551917588425d9758c6cc932cb591b
treecf11a5ab7bf0b893767d6ceeb41974363efc0729
parent934dcc21572e3f0e5357d84050e04b23d41a18f9
Skip tests that require Internet when there's no Internet

Bug#46641

The network-stream-tests actually work fine when the local machine has
no IP at all, but cause a crash in the GnuTLS library when there is an
IP configured but the interface is down.

* test/lisp/net/network-stream-tests.el (internet-is-working): New
defvar, checks if we can resolve "google.com".
(connect-to-tls-ipv4-nowait, connect-to-tls-ipv6-nowait)
(open-network-stream-tls-nowait, open-gnutls-stream-new-api-nowait)
(open-gnutls-stream-old-api-nowait): Use it to check for working
Internet access.

* test/src/process-tests.el (internet-is-working): New defvar, checks
if we can resolve "google.com".
(lookup-family-specification, lookup-unicode-domains)
(unibyte-domain-name, lookup-google, non-existent-lookup-failure): Use
it to check for working Internet access.
test/lisp/net/network-stream-tests.el
test/src/process-tests.el