Skip to content

Commit

Permalink
test: don't store udev worker coredumps in journal
Browse files Browse the repository at this point in the history
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 27fc7a0)
  • Loading branch information
mrc0mmand authored and bluca committed Jan 24, 2024
1 parent 3253db0 commit 668880c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/units/testsuite-17.03.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
}

Expand Down

0 comments on commit 668880c

Please sign in to comment.