From: Bruno Haible Date: Wed, 7 Sep 2022 21:33:31 +0000 (+0200) Subject: posix_spawn_file_actions_addclose tests: Avoid test failure on musl. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=9e3c6355842177732b565290e64854de52af9aed;p=gnulib.git posix_spawn_file_actions_addclose tests: Avoid test failure on musl. Reported by Valery Ushakov in . * modules/posix_spawn_file_actions_addclose-tests (configure.ac): Invoke gl_MUSL_LIBC. * tests/test-posix_spawn_file_actions_addclose.c (main): Skip one of the tests on musl libc. --- diff --git a/ChangeLog b/ChangeLog index 4c9405b54c..fde4c9098d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2022-09-07 Bruno Haible + + posix_spawn_file_actions_addclose tests: Avoid test failure on musl. + Reported by Valery Ushakov in + . + * modules/posix_spawn_file_actions_addclose-tests (configure.ac): Invoke + gl_MUSL_LIBC. + * tests/test-posix_spawn_file_actions_addclose.c (main): Skip one of the + tests on musl libc. + 2022-09-05 Bruno Haible pthread-h: Fix compilation error on mingw with --enable-threads=windows. diff --git a/modules/posix_spawn_file_actions_addclose-tests b/modules/posix_spawn_file_actions_addclose-tests index b115e3dfca..701e04dc17 100644 --- a/modules/posix_spawn_file_actions_addclose-tests +++ b/modules/posix_spawn_file_actions_addclose-tests @@ -9,6 +9,7 @@ posix_spawn_file_actions_init posix_spawn_file_actions_destroy configure.ac: +gl_MUSL_LIBC Makefile.am: TESTS += test-posix_spawn_file_actions_addclose diff --git a/tests/test-posix_spawn_file_actions_addclose.c b/tests/test-posix_spawn_file_actions_addclose.c index 0ab75cea15..1c9059c983 100644 --- a/tests/test-posix_spawn_file_actions_addclose.c +++ b/tests/test-posix_spawn_file_actions_addclose.c @@ -55,12 +55,14 @@ main (void) ASSERT (posix_spawn_file_actions_addclose (&actions, -1) == EBADF); } /* This behaviour is not mandated by POSIX, but happens to pass on all - platforms. */ + platforms except musl libc. */ +#if !defined MUSL_LIBC { int bad_fd = big_fd (); errno = 0; ASSERT (posix_spawn_file_actions_addclose (&actions, bad_fd) == EBADF); } +#endif posix_spawn_file_actions_destroy (&actions);