From: Daan De Meyer Date: Wed, 2 Apr 2025 18:43:41 +0000 (+0200) Subject: test: Unset JOURNAL_STREAM for integration test units X-Git-Tag: v258-rc1~930^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1da030e6e1f8e488d292ef15ebf6b4eb78615aa6;p=thirdparty%2Fsystemd.git test: Unset JOURNAL_STREAM for integration test units We use StandardOutput=journal+console for integration test units to make sure the output from the test ends up on both the serial console and in the journal. Unfortunately this only works for messages written to stdout/stderr of the test service. All journal messages logged by systemd tools will only end up in the journal and not on the serial console. This makes test failures harder to debug than needed because developers have to fetch the journal to figure out the actual error that was logged by any systemd tool that failed when invoked from the integration test script. To fix this, let's unset $JOURNAL_STREAM for the integration test units. This forces all output to go through stdout, which will make journald forward it to the console and save it in the journal. --- diff --git a/test/test.service.in b/test/test.service.in index 223df0399a4..a2e60afa4d8 100644 --- a/test/test.service.in +++ b/test/test.service.in @@ -10,3 +10,4 @@ ExecStart=@command@ Type=oneshot MemoryAccounting=@memory-accounting@ Environment=SYSTEMD_PAGER= @env@ +UnsetEnvironment=JOURNAL_STREAM