diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-03-29 13:55:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-04-02 18:02:27 +0200 |
commit | d7ba78e9c7be835a1e2ecdacd25995663e96862f (patch) | |
tree | 5140c7f2141ae27df312dbe842f68ce0cdef043d /config_host.mk.in | |
parent | b05fb34d48da717447b9b86db9546df72b25e988 (diff) |
New --with-coredumpctl to obtain core dumps of crashed tests from coredumpctl
...for (Linux) systems that don't store core.* files in the current working
directory. When enabled, this wraps test execution in `systemd-run --scope
--user --unit=...` with unit values unique per individual test invocation, so
that solenv/bin/gdb-core-bt.sh can query coredumpctl for matching core dumps.
(See the mailing list thread starting at
<https://lists.freedesktop.org/archives/systemd-devel/2023-March/048884.html>
"[systemd-devel] coredumpctl: matching by e.g. env var?" for further details.)
The used --unit=... scheme is a best effort to produce system-wide unique
values, combining the target location path of the given test with a
second-granularity date/time and the current PID. (In case there would be
multiple invocations of the same test per second, which then hopefully wouldn't
reuse the same PID. The date/time and PID could be replaced with a
high-resolution system-wide monotonic clock/counter if one were easily
available. The advantage of the current scheme is that it only uses Posix
features.) The overall length of the unit value (incl. the appended ".scope"
suffix) must not exceed 256 characters, or else systemd-run would fail with
"Failed to mangle scope name: Invalid argument".
It might look more natural to pass the unit value into gdb-core-bt.sh as a
fourth positional argument rather than via a new LIBO_TEST_UNIT env var. But
for one, the unit value is most easily computed from within the recipe shell
command lines, where an env var is the most natural fit. And for another, this
avoids having to tunnel yet another value through the tearDown method in
unotest/source/java/org/openoffice/test/OfficeConnection.java to the given
postprocesscommand.
Change-Id: Idcb20cd1e1141d8ec7f10947e5edc70aa2aa7d32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149690
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'config_host.mk.in')
-rw-r--r-- | config_host.mk.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config_host.mk.in b/config_host.mk.in index 847e5af06a46..8b809bf9141f 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -89,6 +89,7 @@ export COMPILER_PLUGINS_DEBUG=@COMPILER_PLUGINS_DEBUG@ export COMPILER_PLUGINS_TOOLING_ARGS=@COMPILER_PLUGINS_TOOLING_ARGS@ export COMPRESSIONTOOL=@COMPRESSIONTOOL@ export COM_IS_CLANG=@COM_IS_CLANG@ +export COREDUMPCTL=@COREDUMPCTL@ export CPPU_ENV=@CPPU_ENV@ export CPPU_ENV_FOR_BUILD=@CPPU_ENV_FOR_BUILD@ export CPPUNIT_CFLAGS=$(gb_SPACE)@CPPUNIT_CFLAGS@ @@ -360,6 +361,7 @@ export JDK_FOR_BUILD=@JDK_FOR_BUILD@ export JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD=@JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD@ export JFREEREPORT_JAR=@JFREEREPORT_JAR@ export JITC_PROCESSOR_TYPE=@JITC_PROCESSOR_TYPE@ +export JQ=@JQ@ export JVM_ONE_PATH_CHECK=@JVM_ONE_PATH_CHECK@ export KF5_CFLAGS=$(gb_SPACE)@KF5_CFLAGS@ export KF5_LIBS=$(gb_SPACE)@KF5_LIBS@ @@ -691,6 +693,8 @@ SYSTEM_WPS=@SYSTEM_WPS@ SYSTEM_XMLSEC=@SYSTEM_XMLSEC@ SYSTEM_ZLIB=@SYSTEM_ZLIB@ SYSTEM_ZMF=@SYSTEM_ZMF@ +export SYSTEMD_ESCAPE=@SYSTEMD_ESCAPE@ +export SYSTEMD_RUN=@SYSTEMD_RUN@ export TARFILE_LOCATION=@TARFILE_LOCATION@ export TESTINSTALLDIR=@TESTINSTALLDIR@ export THES_SYSTEM_DIR=@THES_SYSTEM_DIR@ @@ -723,6 +727,7 @@ export WINDOWS_SDK_VERSION=@WINDOWS_SDK_VERSION@ export WINDOWS_SDK_WILANGID=@WINDOWS_SDK_WILANGID@ export WINDOWS_X64=@WINDOWS_X64@ export WITH_COMPAT_OOWRAPPERS=@WITH_COMPAT_OOWRAPPERS@ +export WITH_COREDUMPCTL=@WITH_COREDUMPCTL@ export WITH_EXTENSION_INTEGRATION=@WITH_EXTENSION_INTEGRATION@ export WITH_EXTRA_EXTENSIONS=@WITH_EXTRA_EXTENSIONS@ export WITH_FONTS=@WITH_FONTS@ |