From bdce0942d250c278511aad4be55620694b0e5825 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 7 Sep 2022 23:33:31 +0200 Subject: [PATCH] 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. --- ChangeLog | 10 ++++++++++ modules/posix_spawn_file_actions_addclose-tests | 1 + tests/test-posix_spawn_file_actions_addclose.c | 4 +++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bca50a43c1..ed0b9456db 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 c5238c3e38..d0ab33d14f 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); -- 2.39.5