Missing systemd journal messages when running in CI

This test runs fine locally, but fails in CI because the relevant log message is never found in the systemd journal. Not sure why; could it have something to do with this line?

systemd-journald.service: Deactivated successfully.

You’ll need something like loginctl enable-linger alice (imperatively) or set users.users.alice.linger = true; in the config (declaratively), because systemd user sessions are separate sessions that only run when the corresponding user(s) log in.

The fact that it works locally is… surprising.

Setting users.users.alice.linger = true; didn’t seem to change anything.

Well, I see in some of the other subtests you actually make that parent directory manually. Why don’t you do that in this subtest?

The failure has nothing to do with log messages, the file just didn’t get created.

The test is verifying the error message, so there’s nothing wrong there. It’s not a happy path test. What’s being tested is the log message.

Update: After adding a journalctl --output=json > journal.log to the test job I now have an empty log file. Wat.