diff --git a/test/test-functions b/test/test-functions index 674ba1ce91..e2d3f109a2 100644 --- a/test/test-functions +++ b/test/test-functions @@ -1032,7 +1032,6 @@ EOF DefaultEnvironment=${default_environment[*]} ManagerEnvironment=${manager_environment[*]} DefaultTimeoutStartSec=180s -DefaultStandardOutput=journal+console EOF # ASAN and syscall filters aren't compatible with each other. @@ -1785,10 +1784,10 @@ save_journal() { dest_name="system.journal" fi - if [[ -n "$TEST_SHOW_JOURNAL" ]]; then - echo "---- $source_dir ----" - "$JOURNALCTL" --no-pager -o short-monotonic --no-hostname --priority="$TEST_SHOW_JOURNAL" -D "$source_dir" - fi + # Show messages from the testsuite-XX.service or messages with priority "warning" and higher + echo " --- $source_dir ---" + "$JOURNALCTL" --no-pager --no-hostname -o short-monotonic -D "$source_dir" \ + _SYSTEMD_UNIT="testsuite-${TESTID:?}.service" + PRIORITY=4 + PRIORITY=3 + PRIORITY=2 + PRIORITY=1 + PRIORITY=0 if get_bool "$save"; then # If we don't have systemd-journal-remote copy all journals from /var/log/journal/ @@ -3339,18 +3338,6 @@ test_setup() { mask_supporting_services fi - # Send stdout/stderr of testsuite-*.service units to both journal and - # console to make debugging in CIs easier - # Note: we can't use a dropin for `testsuite-.service`, since that also - # overrides 'sub-units' of some tests that already use a specific - # value for Standard(Output|Error)= - # (e.g. test/units/testsuite-66-deviceisolation.service) - if ! get_bool "$INTERACTIVE_DEBUG"; then - local dropin_dir="${initdir:?}/etc/systemd/system/testsuite-${TESTID:?}.service.d" - mkdir -p "$dropin_dir" - printf '[Service]\nStandardOutput=journal+console\nStandardError=journal+console' >"$dropin_dir/99-stdout.conf" - fi - if get_bool "$IS_BUILT_WITH_COVERAGE"; then # Do an initial coverage capture, to make sure the final report includes # files that the tests didn't touch at all