]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
calloc-gnu tests: Skip expensive part on Solaris.
authorBruno Haible <bruno@clisp.org>
Sun, 10 May 2026 10:35:01 +0000 (12:35 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 10 May 2026 10:35:01 +0000 (12:35 +0200)
* tests/test-calloc-gnu.c (main): Don't attempt to allocate a huge block
of memory on Solaris.
* tests/test-malloc-gnu.c (main): Add a comment.

ChangeLog
tests/test-calloc-gnu.c
tests/test-malloc-gnu.c

index 3d9685bfbbb56acb4bf531ca9e2ac7aaed9e69d1..a162917acb7545ba8333344d269d2133cb8f74f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-05-10  Bruno Haible  <bruno@clisp.org>
+
+       calloc-gnu tests: Skip expensive part on Solaris.
+       * tests/test-calloc-gnu.c (main): Don't attempt to allocate a huge block
+       of memory on Solaris.
+       * tests/test-malloc-gnu.c (main): Add a comment.
+
 2026-05-10  Bruno Haible  <bruno@clisp.org>
 
        stdlib-h-c++-tests: Fix link error on Solaris 10 with Oracle Studio 12.
index b7eb2ac56dc80fbb93bf2c3ebb491bb44a833594..b8fb00c86f612684c685922230aa9196a9ad8834 100644 (file)
@@ -42,6 +42,10 @@ main ()
 
   /* Check that calloc fails when requested to allocate a block of memory
      larger than PTRDIFF_MAX or SIZE_MAX bytes.  */
+  /* Running this test on a Solaris 10 machine (cfarm210.cfarm.net) makes
+     the machine unresponsive for at least several minutes, possibly
+     indefinitely.  */
+#if !defined __sun
   {
     for (size_t n = 2; n != 0; n <<= 1)
       {
@@ -54,6 +58,7 @@ main ()
         ASSERT (errno == ENOMEM);
       }
   }
+#endif
 
   return test_exit_status;
 }
index 7b243ac462a5f49aaf0fa56114de08dd848ccffb..38fe387cc4698756b8f19b9ee0a6242245149b0f 100644 (file)
@@ -39,6 +39,8 @@ main (int argc, _GL_UNUSED char **argv)
   free (p);
 
   /* Check that malloc (n) fails when n exceeds PTRDIFF_MAX.  */
+  /* Note: Running this test on a Solaris 10 machine (cfarm210.cfarm.net) makes
+     the machine unresponsive for 43 seconds.  */
   if (PTRDIFF_MAX < SIZE_MAX)
     {
       size_t one = argc != 12345;