From: Collin Funk Date: Thu, 24 Jul 2025 02:55:41 +0000 (-0700) Subject: sethostname tests: Avoid test failure on Haiku. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e936bfd8c0aad5eba0b6dfc7586d1b512bd90c26;p=thirdparty%2Fgnulib.git sethostname tests: Avoid test failure on Haiku. * tests/test-sethostname2.c (main): On Haiku, skip the "too long hostname" test. * doc/glibc-functions/sethostname.texi: Mention the Haiku problem. --- diff --git a/ChangeLog b/ChangeLog index 0bca5616a4..5a30fab82d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-07-23 Collin Funk + + sethostname tests: Avoid test failure on Haiku. + * tests/test-sethostname2.c (main): On Haiku, skip the "too long + hostname" test. + * doc/glibc-functions/sethostname.texi: Mention the Haiku problem. + 2025-07-23 Bruno Haible run-test: Suggest a more reliable way of invoking valgrind. diff --git a/doc/glibc-functions/sethostname.texi b/doc/glibc-functions/sethostname.texi index 51d1e3cb8a..16a5672797 100644 --- a/doc/glibc-functions/sethostname.texi +++ b/doc/glibc-functions/sethostname.texi @@ -44,5 +44,6 @@ macOS 14, FreeBSD 14.0, MidnightBSD 3.0, Solaris 11 2010-11, Solaris 11 OpenIndi @item This function does not reject a too long host name on some platforms: @c https://cygwin.com/pipermail/cygwin/2024-May/255986.html -Cygwin 3.5.3. +@c https://dev.haiku-os.org/ticket/19692 +Cygwin 3.5.3, Haiku. @end itemize diff --git a/tests/test-sethostname2.c b/tests/test-sethostname2.c index df10cd3741..01a4053bfa 100644 --- a/tests/test-sethostname2.c +++ b/tests/test-sethostname2.c @@ -107,9 +107,10 @@ main (int argc, _GL_UNUSED char *argv[]) #endif } - /* Known Cygwin bug: - */ -#if !defined __CYGWIN__ + /* Known bug on Cygwin and Haiku: + + . */ +#if !(defined __CYGWIN__ || defined __HAIKU__) { char longname[HOST_NAME_MAX + 2];