commit:     1f516d68b80369bdf06faec58ba4c552aba0043d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  8 23:34:34 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jul  8 23:34:34 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f516d68

toolchain.eclass: disable coredump handlers in src_test

Use the magic value of 1 which avoids invoking coredump handlers
like systemd-coredumpd which can be really slow when we have many
intentional or expected crashes.

This trick was suggested by Alexander Monakov.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index ae7a0bf46cce..bcbdd1305cfa 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -2450,6 +2450,11 @@ toolchain_src_test() {
        # From opensuse's spec file: "asan needs a whole shadow address space"
        ulimit -v unlimited
 
+       # Use the magic value of 1 which avoids invoking coredump handlers
+       # like systemd-coredumpd which can be really slow when we have many
+       # intentional or expected crashes.
+       prlimit -c=1 -p $$
+
        # 'asan' wants to be preloaded first, so does 'sandbox'.
        # To make asan tests work, we disable sandbox for all of test suite.
        # The 'backtrace' tests also do not like the presence of 
'libsandbox.so'.

Reply via email to