From 1defda6356c29c7f731bddb9e9231f594e01d9c9 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 31 Mar 2024 21:31:34 +0200 Subject: [PATCH] canonicalize[-lgpl] tests: Fix test failure on musl libc. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by Adept's Lab via Pádraig Brady at . * tests/test-canonicalize-lgpl.c (main): Don't special-case "//" handling for musl libc. * tests/test-canonicalize.c (main): Likewise. * modules/canonicalize-lgpl-tests (Files): Remove m4/musl.m4. (configure.ac): Don't invoke gl_MUSL_LIBC. --- ChangeLog | 11 +++++++++++ modules/canonicalize-lgpl-tests | 2 -- tests/test-canonicalize-lgpl.c | 6 +++--- tests/test-canonicalize.c | 6 +++--- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f05098a08..ffae5513ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2024-03-31 Bruno Haible + + canonicalize[-lgpl] tests: Fix test failure on musl libc. + Reported by Adept's Lab via Pádraig Brady at + . + * tests/test-canonicalize-lgpl.c (main): Don't special-case "//" + handling for musl libc. + * tests/test-canonicalize.c (main): Likewise. + * modules/canonicalize-lgpl-tests (Files): Remove m4/musl.m4. + (configure.ac): Don't invoke gl_MUSL_LIBC. + 2024-03-31 Collin Funk gnulib-tool.py: Fix output of 'po/LINGUAS'. diff --git a/modules/canonicalize-lgpl-tests b/modules/canonicalize-lgpl-tests index 409ee7225b..73a0e32abb 100644 --- a/modules/canonicalize-lgpl-tests +++ b/modules/canonicalize-lgpl-tests @@ -1,5 +1,4 @@ Files: -m4/musl.m4 tests/test-canonicalize-lgpl.c tests/signature.h tests/null-ptr.h @@ -11,7 +10,6 @@ same-inode symlink configure.ac: -gl_MUSL_LIBC Makefile.am: TESTS += test-canonicalize-lgpl diff --git a/tests/test-canonicalize-lgpl.c b/tests/test-canonicalize-lgpl.c index 1b2ad98f51..21211e5eac 100644 --- a/tests/test-canonicalize-lgpl.c +++ b/tests/test-canonicalize-lgpl.c @@ -262,9 +262,9 @@ main (void) ASSERT (stat ("/", &st1) == 0); ASSERT (stat ("//", &st2) == 0); bool same = psame_inode (&st1, &st2); -#if defined __MVS__ || defined MUSL_LIBC - /* On IBM z/OS and musl libc, "/" and "//" both canonicalize to - themselves, yet they both have st_dev == st_ino == 1. */ +#if defined __MVS__ + /* On IBM z/OS, "/" and "//" both canonicalize to themselves, yet they both + have st_dev == st_ino == 1. */ same = false; #endif if (same) diff --git a/tests/test-canonicalize.c b/tests/test-canonicalize.c index 6763a525c9..5d19285c00 100644 --- a/tests/test-canonicalize.c +++ b/tests/test-canonicalize.c @@ -394,9 +394,9 @@ main (void) ASSERT (stat ("/", &st1) == 0); ASSERT (stat ("//", &st2) == 0); bool same = psame_inode (&st1, &st2); -#if defined __MVS__ || defined MUSL_LIBC - /* On IBM z/OS and musl libc, "/" and "//" both canonicalize to - themselves, yet they both have st_dev == st_ino == 1. */ +#if defined __MVS__ + /* On IBM z/OS, "/" and "//" both canonicalize to themselves, yet they both + have st_dev == st_ino == 1. */ same = false; #endif if (same) -- 2.39.5