Bug#844420: FTBFS: tests fail on hosts without network access
Package: glibc
Version: 2.24-5
Severity: important
Tags: upstream patch
Forwarded: https://sourceware.org/bugzilla/show_bug.cgi?id=20826
Dear Maintainer,
posix/tst-getaddrinfo.c is causing glibc to FTBFS on tests.reproducible-builds.org:
https://tests.reproducible-builds.org/debian/rbuild/unstable/amd64/glibc_2.24-5.rbuild.log.gz
The attached patch should fix this; I gave a more detailed description in the upstream bug report.
It would be good if this were already applied to the Debian glibc so that we can begin to see diffoscope output again and work on its reproducibility.
Thanks,
X
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'stable'), (300, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.7.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Description: Don't condition failure of double-dot-FQDN on single-dot-FQDN
Otherwise the test fails on systems that disable network access during build
time, since getaddrinfo() fails in all cases and the test returns 2.
.
Normally, such systems can still resolve "localhost." via nsswitch/getent and
getaddrinfo is not suppose to attempt resolution of "localhost." anyways.
Author: Ximin Luo <infinity0@debian.org>
Bug: TBD
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/posix/tst-getaddrinfo5.c
+++ b/posix/tst-getaddrinfo5.c
@@ -36,20 +36,6 @@
size_t len = strlen (host);
struct addrinfo *ai;
- /* If the name doesn't resolve with a single dot at the
- end, skip it. */
- host[len-1] = 0;
- if (getaddrinfo (host, NULL, NULL, &ai) != 0)
- {
- printf ("resolving \"%s\" failed, skipping this hostname\n", host);
- continue;
- }
- printf ("resolving \"%s\" worked, proceeding to test\n", host);
- freeaddrinfo (ai);
-
- /* If it resolved with a single dot, check that it doesn't with
- a second trailing dot. */
- host[len-1] = '.';
if (getaddrinfo (host, NULL, NULL, &ai) == 0)
{
printf ("resolving \"%s\" worked, test failed\n", host);
Reply to: