Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TestAccounts creates and recycles UIDs a lot, with different user names.
This can lead to failures: testFirst creating user testA, then
cleaning it up, then testSecond creates testB with the same UID, and all
of a sudden logind thinks that the running session of testB belongs to
testA (literally the user name, not just the UID).
logind caches this in /run/systemd/users/, and I haven't found a way to
wean it off that cache. So delete all uid cache files in between tests.
Move from
restart
tostop
, as otherwise the new logind will rewritethe files; and we don't have to explicitly start it as it gets D-Bus
activated.
Move the restarting until after stopping the remaining user@ services,
as otherwise there are still legitimate processes around from the
to-be-removed user.
See my debug odysee notes. This definitively fixes the failure that I can reproduce 100% locally, but this is the kind of change that very likely rips something apart somewhere else. Let's see what the bots think!