]> Savannah Git Hosting - gnulib.git/commitdiff
vasnprintf, u*-asnprintf tests: Adjust memory need.
authorBruno Haible <bruno@clisp.org>
Wed, 19 Jun 2024 23:28:33 +0000 (01:28 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 19 Jun 2024 23:28:33 +0000 (01:28 +0200)
* tests/test-vasnprintf-big.c (main): Require 10, not 12, GiB of RAM.
* tests/unistdio/test-u8-asnprintf-big.c (main): Require 15 GiB of RAM.
* tests/unistdio/test-ulc-asnprintf-big.c (main): Likewise.

ChangeLog
tests/test-vasnprintf-big.c
tests/unistdio/test-u8-asnprintf-big.c
tests/unistdio/test-ulc-asnprintf-big.c

index 04002a54a87e5aa153fbb61172f77c3e6af91b1a..2218550af36ae27c3094d7f017504ed1562d8f24 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-06-19  Bruno Haible  <bruno@clisp.org>
+
+       vasnprintf, u*-asnprintf tests: Adjust memory need.
+       * tests/test-vasnprintf-big.c (main): Require 10, not 12, GiB of RAM.
+       * tests/unistdio/test-u8-asnprintf-big.c (main): Require 15 GiB of RAM.
+       * tests/unistdio/test-ulc-asnprintf-big.c (main): Likewise.
+
 2024-06-19  Bruno Haible  <bruno@clisp.org>
 
        u8-asnprintf tests: Fix mistake.
index e4bb28c95c2eaabbe44a9076f78999300c53b359..65b4dc3f7c64466670541762cb7da96b103919fa 100644 (file)
@@ -54,9 +54,14 @@ main ()
   rl.rlim_cur = rl.rlim_max = 0;
   setrlimit (RLIMIT_CORE, &rl);
 # endif
-  /* The test below needs about 12 GiB of memory:
-     3 GiB for the inputs and up to 9 GiB for temporary output buffers.  */
-  double needed = 12.0 * 1024 * 1024 * 1024;
+  /* The test below needs about 10 GiB of memory:
+       $ time /usr/bin/time -f "Max RSS: %M KiB" ./test-vasnprintf-big
+       Max RSS: 10487464 KiB
+       real    0m34,417s
+       user    0m26,175s
+       sys     0m8,240s
+     5 GiB for the inputs and up to 5 GiB for temporary output buffers.  */
+  double needed = 10.0 * 1024 * 1024 * 1024;
   double avail = physmem_claimable (1.0);
   printf ("memory needed = %g MiB, available = %g MiB\n",
           needed / 1024 / 1024, avail / 1024 / 1024);
index 55eb9336390dc1e1c10fc362a4dda82542764c90..6b7cced5ce05c2bfe123c7e8fa0d947430b06f0b 100644 (file)
@@ -55,9 +55,14 @@ main ()
   rl.rlim_cur = rl.rlim_max = 0;
   setrlimit (RLIMIT_CORE, &rl);
 # endif
-  /* The test below needs about 12 GiB of memory:
-     3 GiB for the inputs and up to 9 GiB for temporary output buffers.  */
-  double needed = 12.0 * 1024 * 1024 * 1024;
+  /* The test below needs about 15 GiB of memory:
+       $ time /usr/bin/time -f "Max RSS: %M KiB" ./test-u8-asnprintf-big
+       Max RSS: 15730356 KiB
+       real    0m58,011s
+       user    0m46,403s
+       sys     0m11,604s
+     5 GiB for the inputs and up to 10 GiB for temporary output buffers.  */
+  double needed = 15.0 * 1024 * 1024 * 1024;
   double avail = physmem_claimable (1.0);
   printf ("memory needed = %g MiB, available = %g MiB\n",
           needed / 1024 / 1024, avail / 1024 / 1024);
index b73ff302beec9084a337ad1d44ec1d9d188f4778..8ef733d962f1732c54d17448d1918517aea411f3 100644 (file)
@@ -54,9 +54,14 @@ main ()
   rl.rlim_cur = rl.rlim_max = 0;
   setrlimit (RLIMIT_CORE, &rl);
 # endif
-  /* The test below needs about 12 GiB of memory:
-     3 GiB for the inputs and up to 9 GiB for temporary output buffers.  */
-  double needed = 12.0 * 1024 * 1024 * 1024;
+  /* The test below needs about 15 GiB of memory:
+       $ time /usr/bin/time -f "Max RSS: %M KiB" ./test-ulc-asnprintf-big
+       Max RSS: 15730376 KiB
+       real    1m13,702s
+       user    1m0,184s
+       sys     0m13,512s
+     5 GiB for the inputs and up to 10 GiB for temporary output buffers.  */
+  double needed = 15.0 * 1024 * 1024 * 1024;
   double avail = physmem_claimable (1.0);
   printf ("memory needed = %g MiB, available = %g MiB\n",
           needed / 1024 / 1024, avail / 1024 / 1024);