mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-08 21:17:47 +03:00
test: don't store udev worker coredumps in journal
udev before #30532 may kill the worker process together with a slow
program, and when running with sanitizers the resulting coredump might
be too big to fit into journal (or the space currently available for
journal):
[ 30.086194] systemd-journald[330]: Failed to write entry to /var/log/journal/e87de9ccbacf4b88924ff6d9ecaaa82d/system.journal (50 items, 68326399 bytes) despite vacuuming, ignoring: Argument list too long
This then makes the test fail, as it checks for the presence of the
coredump.
Since we don't really care about the coredump in this specific case (as
it is an expected one), let's just temporarily override the
testsuite-wide Storage=journal and store the coredumps externally.
This is a v255-stable-only patch, since after #30532 the test no longer
checks for coredumps.
(cherry picked from commit 27fc7a0321
)
This commit is contained in:
parent
3253db0aa9
commit
668880cc30
@ -8,6 +8,9 @@ KILL_PID=
|
||||
setup() {
|
||||
mkdir -p "${TEST_RULE%/*}"
|
||||
[[ -e /etc/udev/udev.conf ]] && cp -f /etc/udev/udev.conf /etc/udev/udev.conf.bak
|
||||
# Don't bother storing the coredumps in journal for this particular test
|
||||
mkdir -p /run/systemd/coredump.conf.d/
|
||||
echo -ne "[Coredump]\nStorage=external\n" >/run/systemd/coredump.conf.d/99-storage-journal.conf
|
||||
|
||||
cat >"${TEST_RULE}" <<EOF
|
||||
ACTION=="add", SUBSYSTEM=="mem", KERNEL=="null", OPTIONS="log_level=debug"
|
||||
@ -32,6 +35,7 @@ teardown() {
|
||||
rm -rf "$TMPDIR"
|
||||
rm -f "$TEST_RULE"
|
||||
[[ -e /etc/udev/udev.conf.bak ]] && mv -f /etc/udev/udev.conf.bak /etc/udev/udev.conf
|
||||
rm /run/systemd/coredump.conf.d/99-storage-journal.conf
|
||||
systemctl restart systemd-udevd.service
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user