]> Savannah Git Hosting - gnulib.git/commitdiff
get-rusage-data tests: Avoid test failure on musl libc.
authorBruno Haible <bruno@clisp.org>
Sun, 17 Jan 2021 08:17:40 +0000 (09:17 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 17 Jan 2021 08:17:40 +0000 (09:17 +0100)
* modules/get-rusage-data-tests (Files): Add m4/musl.m4.
(configure.ac): Invoke gl_MUSL_LIBC.
* tests/test-get-rusage-data.c (main): Treat musl libc like glibc.

ChangeLog
modules/get-rusage-data-tests
tests/test-get-rusage-data.c

index 61d1e9836411eaf1ed44cb0e04af8de0243f43f7..cb9037d282a5ca50034d349f17d9cc00750a679f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-01-17  Bruno Haible  <bruno@clisp.org>
+
+       get-rusage-data tests: Avoid test failure on musl libc.
+       * modules/get-rusage-data-tests (Files): Add m4/musl.m4.
+       (configure.ac): Invoke gl_MUSL_LIBC.
+       * tests/test-get-rusage-data.c (main): Treat musl libc like glibc.
+
 2021-01-17  Bruno Haible  <bruno@clisp.org>
 
        immutable, get-rusage-data: Fix autoconf warning.
index 0b557943021fb9bae132abc62abfe159ea7eadb7..109cce53e99bb2ea8c0b5424989c408986730567 100644 (file)
@@ -1,10 +1,12 @@
 Files:
 tests/test-get-rusage-data.c
 tests/macros.h
+m4/musl.m4
 
 Depends-on:
 
 configure.ac:
+gl_MUSL_LIBC
 
 Makefile.am:
 TESTS += test-get-rusage-data
index 229fd8c5a21ec389ac68e841e062658a5ec3bc67..c626540a32496e06efc84e396acb350b5f9a721a 100644 (file)
@@ -55,7 +55,7 @@ main ()
       ASSERT (value2 >= value1);
       ASSERT (value3 >= value2);
 
-#if !(__GLIBC__ == 2 || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __OpenBSD__ || defined _WIN32 || defined __CYGWIN__)
+#if !(__GLIBC__ == 2 || MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __OpenBSD__ || defined _WIN32 || defined __CYGWIN__)
       /* Allocating 2.5 MB of memory should increase the data segment size.  */
       ASSERT (value3 > value1);
 #endif