From: Bruno Haible Date: Wed, 19 Jun 2024 23:28:33 +0000 (+0200) Subject: vasnprintf, u*-asnprintf tests: Adjust memory need. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=335ca665041ed16f3da008e34f17c1f7140f7173;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 04002a54a8..2218550af3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-06-19 Bruno Haible + + 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 u8-asnprintf tests: Fix mistake. diff --git a/tests/test-vasnprintf-big.c b/tests/test-vasnprintf-big.c index e4bb28c95c..65b4dc3f7c 100644 --- a/tests/test-vasnprintf-big.c +++ b/tests/test-vasnprintf-big.c @@ -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); diff --git a/tests/unistdio/test-u8-asnprintf-big.c b/tests/unistdio/test-u8-asnprintf-big.c index 55eb933639..6b7cced5ce 100644 --- a/tests/unistdio/test-u8-asnprintf-big.c +++ b/tests/unistdio/test-u8-asnprintf-big.c @@ -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); diff --git a/tests/unistdio/test-ulc-asnprintf-big.c b/tests/unistdio/test-ulc-asnprintf-big.c index b73ff302be..8ef733d962 100644 --- a/tests/unistdio/test-ulc-asnprintf-big.c +++ b/tests/unistdio/test-ulc-asnprintf-big.c @@ -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);