diff options
author | Alon Bar-Lev <alonbl@gentoo.org> | 2014-03-08 20:21:37 +0000 |
---|---|---|
committer | Alon Bar-Lev <alonbl@gentoo.org> | 2014-03-08 20:21:37 +0000 |
commit | 81fc04d3c0490db3e358ca17ac695013d53778d6 (patch) | |
tree | 0474bd23a2c3264cbfd5a48cbc591299fad5997b /net-libs/gnutls/files/gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch | |
parent | amd64 stable, bug 502718 (diff) | |
download | gentoo-2-81fc04d3c0490db3e358ca17ac695013d53778d6.tar.gz gentoo-2-81fc04d3c0490db3e358ca17ac695013d53778d6.tar.bz2 gentoo-2-81fc04d3c0490db3e358ca17ac695013d53778d6.zip |
Fix network sandbox gnulib issue, bug#503870
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key BF20DC51)
Diffstat (limited to 'net-libs/gnutls/files/gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch')
-rw-r--r-- | net-libs/gnutls/files/gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/net-libs/gnutls/files/gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch b/net-libs/gnutls/files/gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch new file mode 100644 index 000000000000..6d04ccbdcd8d --- /dev/null +++ b/net-libs/gnutls/files/gnutls-2.12.23-gl-tests-getaddrinfo-skip-if-no-network.patch @@ -0,0 +1,30 @@ +From 4b3252d59ef2d73118e2de6743ba58e2cbafa008 Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev <alon.barlev@gmail.com> +Date: Sat, 8 Mar 2014 22:13:51 +0200 +Subject: [PATCH] tests: getaddrinfo: skip if no network + +When running tests under network sandbox, there is no connectivity to +the DNS, in this case function returns system error and ECONNREFUSED +this should result in skipping test. + +Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> +--- + tests/test-getaddrinfo.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gl/tests/test-getaddrinfo.c b/gl/tests/test-getaddrinfo.c +index acf9cd6..b155410 100644 +--- a/gl/tests/test-getaddrinfo.c ++++ b/gl/tests/test-getaddrinfo.c +@@ -85,7 +85,7 @@ simple (char const *host, char const *service) + /* EAI_AGAIN is returned if no network is available. Don't fail + the test merely because someone is down the country on their + in-law's farm. */ +- if (res == EAI_AGAIN) ++ if (res == EAI_AGAIN || (res == EAI_SYSTEM && err == ECONNREFUSED)) + { + skip++; + fprintf (stderr, "skipping getaddrinfo test: no network?\n"); +-- +1.8.3.2 + |