https://gcc.gnu.org/g:a5c24db958b97c6f804636a1c8d0b25b4b167702
commit r17-1587-ga5c24db958b97c6f804636a1c8d0b25b4b167702 Author: Rainer Orth <[email protected]> Date: Tue Jun 16 14:04:04 2026 +0200 testsuite: Limit shared memory use of coarray tests [PR125584] As discussed in PR testsuite/125584, the gfortran.dg/coarray tests with -lcaf_shmem require excessive amounts of backing store for their shared memory images: for 64-bit tests, each test uses 4 GB images. On Solaris, the mapped files reside in /tmp/.LIBRT/SHM, which is tmpfs. During parallel testing, several such tests can run in parallel, leading to excessive VM use, in particular on targets like Solaris that don't use lazy allocation. This is unacceptable since the testsuite defaults need to be safe for all targets. The tests PASS just fine when limiting GFORTRAN_SHARED_MEMORY_SIZE to 2M instead. To allow for testing with either the default or a different size, setting GCC_TEST_RUN_EXPENSIVE to a non-empty string allows to override this. Tested on amd64-pc-solaris2.11 and x86_64-pc-linux-gnu. 2026-06-13 Rainer Orth <[email protected]> gcc/testsuite: PR testsuite/125584 * gfortran.dg/coarray/caf.exp: Default GFORTRAN_SHARED_MEMORY_SIZE to 2 MB unless running expensive tests. Diff: --- gcc/testsuite/gfortran.dg/coarray/caf.exp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/testsuite/gfortran.dg/coarray/caf.exp b/gcc/testsuite/gfortran.dg/coarray/caf.exp index bb4fb53050e1..3acf1a5a2ebc 100644 --- a/gcc/testsuite/gfortran.dg/coarray/caf.exp +++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp @@ -82,6 +82,11 @@ if { [getenv GFORTRAN_NUM_IMAGES] == "" } { setenv GFORTRAN_NUM_IMAGES 8 } +if { [getenv GCC_TEST_RUN_EXPENSIVE] == "" } { + # Lower caf_shmem shared memory block size to avoid excessive VM consumption. + setenv GFORTRAN_SHARED_MEMORY_SIZE 2M +} + # Main loop. foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]] { # If we're only testing specific files and this isn't one of them, skip it.
