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 /include/svx/svdglue.hxx | |
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 'include/svx/svdglue.hxx')
0 files changed, 0 insertions, 0 deletions