[glibc] 02/02: patches/hurd-i386/submitted-resolv.diff: New patch
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch glibc-2.26
in repository glibc.
commit ba4b01289b42708e21a71a9da43693e3186c5710
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sun Sep 10 14:47:35 2017 +0000
patches/hurd-i386/submitted-resolv.diff: New patch
---
debian/changelog | 1 +
debian/patches/hurd-i386/submitted-resolv.diff | 37 ++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 39 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 057d218..3aa45f7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -75,6 +75,7 @@ glibc (2.26-0experimental0) UNRELEASED; urgency=medium
- patches/hurd-i386/cvs-send-recv-posix.diff: Remove unused merged patch.
- patches/hurd-i386/cvs-truncate64.diff: Remove unused merged patch.
- patches/hurd-i386/git-tst-udp-timeout.diff: New patch.
+ - patches/hurd-i386/submitted-resolv.diff: New patch.
- testsuite-xfail-debian.mk: Update with new tests failing on hurd-i386.
-- Adam Conrad <adconrad@0c3.net> Sat, 02 Sep 2017 12:15:10 -0600
diff --git a/debian/patches/hurd-i386/submitted-resolv.diff b/debian/patches/hurd-i386/submitted-resolv.diff
new file mode 100644
index 0000000..901e386
--- /dev/null
+++ b/debian/patches/hurd-i386/submitted-resolv.diff
@@ -0,0 +1,37 @@
+server_thread_udp_process_one already takes care of calling sendto()
+instead of xsendto to be able to ignore the case where the client has
+closed the socket. Depending on the TCP/IP stack behavior, this error
+could be notified later through recvfrom(), so we need to ignore it
+there too.
+
+* support/resolv_test.c (server_thread_udp_process_one): Call recvfrom
+instead of xrecvfrom, and ignore ECONNREFUSED errors.
+
+https://sourceware.org/ml/libc-alpha/2017-09/msg00420.html
+
+diff --git a/support/resolv_test.c b/support/resolv_test.c
+index 1625dcf43a..c3325b89b1 100644
+--- a/support/resolv_test.c
++++ b/support/resolv_test.c
+@@ -600,7 +600,7 @@ server_thread_udp_process_one (struct resolv_test *obj, int server_index)
+ unsigned char query[512];
+ struct sockaddr_storage peer;
+ socklen_t peerlen = sizeof (peer);
+- size_t length = xrecvfrom (obj->servers[server_index].socket_udp,
++ ssize_t length = recvfrom (obj->servers[server_index].socket_udp,
+ query, sizeof (query), 0,
+ (struct sockaddr *) &peer, &peerlen);
+ /* Check for termination. */
+@@ -613,6 +613,12 @@ server_thread_udp_process_one (struct resolv_test *obj, int server_index)
+ return false;
+ }
+
++ if (length < 0)
++ {
++ /* The other end had closed the socket, and we are notified only now. */
++ TEST_VERIFY_EXIT (errno == ECONNREFUSED);
++ return true;
++ }
+
+ struct query_info qinfo;
+ parse_query (&qinfo, query, length);
diff --git a/debian/patches/series b/debian/patches/series
index 7b3e5e5..67bb03b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -154,6 +154,7 @@ hurd-i386/git-rtld-strtoul_internal.diff
hurd-i386/git-clone.diff
hurd-i386/git-gethostname.diff
hurd-i386/git-tst-udp-timeout.diff
+hurd-i386/submitted-resolv.diff
i386/local-biarch.diff
i386/unsubmitted-quiet-ldconfig.diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-glibc/glibc.git
Reply to: