]> Savannah Git Hosting - gnulib.git/commitdiff
posix_spawn_file_actions_addclose tests: Avoid test failure on musl.
authorBruno Haible <bruno@clisp.org>
Wed, 7 Sep 2022 21:33:31 +0000 (23:33 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 10 Sep 2022 01:02:07 +0000 (03:02 +0200)
Reported by Valery Ushakov <uwe@stderr.spb.ru> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-09/msg00041.html>.

* 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
modules/posix_spawn_file_actions_addclose-tests
tests/test-posix_spawn_file_actions_addclose.c

index 4c9405b54cb66bb734857f01acfd923ea3fece12..fde4c9098dfc1aa10b75bcd64c87bc11cf35b751 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-09-07  Bruno Haible  <bruno@clisp.org>
+
+       posix_spawn_file_actions_addclose tests: Avoid test failure on musl.
+       Reported by Valery Ushakov <uwe@stderr.spb.ru> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2022-09/msg00041.html>.
+       * 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  <bruno@clisp.org>
 
        pthread-h: Fix compilation error on mingw with --enable-threads=windows.
index b115e3dfcab8ac0b6ae1af70ddc408b7fde4794c..701e04dc1713cfa248235cffe6fdfef05539dd49 100644 (file)
@@ -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
index 0ab75cea159dc889a77d4675b49a3181d47fee09..1c9059c9838bc0d562602dc27fa83d044ba46cc8 100644 (file)
@@ -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);