Skip to content

test-driver.py: sleep in between executing things periodically inside the vm#74868

Closed
flokli wants to merge 1 commit intoNixOS:masterfrom
flokli:test-driver-sleep
Closed

test-driver.py: sleep in between executing things periodically inside the vm#74868
flokli wants to merge 1 commit intoNixOS:masterfrom
flokli:test-driver-sleep

Conversation

@flokli
Copy link
Copy Markdown
Member

@flokli flokli commented Dec 2, 2019

while it's fine to use an endless loop on a blocking socket, we
can't do the same with executing commands inside the VM. instead, wait
1sec in between each interval.

Motivation for this change

I saw a lot of spam while waiting for a wait_until_succeeds method to finish inside a nixos vm test.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @tfc

… the vm

while it's fine to use an endless loop on a blocking socket, we
can't do the same with executing commands inside the VM. instead, wait
1sec in between each interval.
@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Dec 2, 2019
@tfc
Copy link
Copy Markdown
Contributor

tfc commented Dec 3, 2019

Hey @flokli this is not the right approach. The perl test driver uses the retry primitive to loop with intervals between the retrys. Yesterday i started converting the python test driver functions to the same style, which will also fix the problems this PR tackles. Would you be fine with closing this PR and waiting for my PR?

@tfc
Copy link
Copy Markdown
Contributor

tfc commented Dec 3, 2019

see #74898

@flokli
Copy link
Copy Markdown
Member Author

flokli commented Dec 4, 2019

Closing in favor of #74898.

@flokli flokli closed this Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants