From 2f5606702e4c840e554fc596c75ba64f160c65a6 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sun, 12 Dec 2021 12:01:51 +0300 Subject: [PATCH] mdbx-tests: explicit enable coredumps on Linux. --- test/long_stochastic.sh | 5 +++++ test/stochastic_small.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/test/long_stochastic.sh b/test/long_stochastic.sh index 054e912b..996cd310 100755 --- a/test/long_stochastic.sh +++ b/test/long_stochastic.sh @@ -210,6 +210,11 @@ echo "=== use ${db_size_mb}M for DB" # 3. Create test-directory in ramfs/tmpfs, i.e. create/format/mount if required case ${UNAME} in Linux) + ulimit -c unlimited + if [ "$(cat /proc/sys/kernel/core_pattern)" != "core.%p" ]; then + echo "core.%p > /proc/sys/kernel/core_pattern" >&2 + echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern || true + fi ;; FreeBSD) diff --git a/test/stochastic_small.sh b/test/stochastic_small.sh index 2cf28043..8c9bba5f 100755 --- a/test/stochastic_small.sh +++ b/test/stochastic_small.sh @@ -210,6 +210,11 @@ echo "=== use ${db_size_mb}M for DB" # 3. Create test-directory in ramfs/tmpfs, i.e. create/format/mount if required case ${UNAME} in Linux) + ulimit -c unlimited + if [ "$(cat /proc/sys/kernel/core_pattern)" != "core.%p" ]; then + echo "core.%p > /proc/sys/kernel/core_pattern" >&2 + echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern || true + fi ;; FreeBSD)