tests: fix system-usernames-missing-user multiline MATCH
This test failed with: ``` 2023-09-05T12:51:25.0650751Z + echo 'Then the snap cannot be installed' 2023-09-05T12:51:25.0651128Z Then the snap cannot be installed 2023-09-05T12:51:25.0651591Z + MATCH 'cannot add user/group "snap_daemon": group exists and user does not' 2023-09-05T12:51:25.0652024Z + snap install --edge test-snapd-daemon-user 2023-09-05T12:51:25.0652503Z grep error: pattern not found, got: 2023-09-05T12:51:25.0653135Z error: cannot install "test-snapd-daemon-user": cannot ensure users for snap 2023-09-05T12:51:25.0653797Z "test-snapd-daemon-user" required system username "snap_daemon": cannot 2023-09-05T12:51:25.0654381Z add user/group "snap_daemon": group exists and user does not ``` This is because of the line breaks that are added in the error and that MATCH only matces a single line. This commit fixes it by changing the \n to normal spaces in the error message before doing the match.
Resealing can take more than a minute since it must hash a lot of files that it might need to unpack from snaps. It also needs to interact with the TPM and parse the event log, which might be slow. If we keep the lock, then snapd will not respond for a long time.
This fixes failures for `tests/nested/manual/core20-remodel`
t/n/c/connected-after-reboot-revert: expect one more reboot on UC16
Here are the expected reboot causes: * Make current revision for snap "core" unavailable * Make snap "core" (unset) available to the system * Make current revision for snap "pc-kernel" unavailable * Make snap "pc-kernel" (unset) available to the system