-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/tests: fix switchTest #161859
nixos/tests: fix switchTest #161859
Conversation
Currently the test-watch.service gets started in a loop as long as /testpath exists, so `rm /testpath /testpath-modified` runs into a race condition where if the service was just getting activated, it will create /testpath-modified and make the test fail. This is fixed by making the service RemainAfterExit so that it only starts once, and stopping it manually after we remove /testpath.
@ofborg test switchTest |
Is this also fixed by #161838 ? |
Nope, both issues still present. |
Well, I'm still getting another problem even with this PR:
EDIT: maybe it's just something on my side (even though repeated), as I see OfBorg succeeding and you also surely tested this. |
I only removed the first occurrence of |
It illustrates a real problem with the service (in my opinion), let's fix logrotate :) The following fixes it for me:
And logrotate.timer is still enabled, so the service will run every hour as expected... It can still start randomly during the test, but you won't get the "new units has been started" as it won't be started directly by the switch so I think test won't fail. I'll submit this as a PR with a new test in nixosTests.logrotate to make sure the timer stays enabled, just need to figure out how to wait for the service to have run automatically after a date change... |
Closing in favour of #161929 |
Fixes failures like https://hydra.nixos.org/build/168083601/nixlog/102, as well as #159187 (comment)