Skip to content
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

tests/installer: give installer VM more cores #109042

Merged
merged 1 commit into from Jan 18, 2021

Conversation

Atemu
Copy link
Member

@Atemu Atemu commented Jan 11, 2021

Motivation for this change

ZFS installer test runtime went from 637s to 380s on my Ryzen 3600

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 nixpkgs-review --run "nixpkgs-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.

ZFS installer test runtime went from 637s to 380s on my Ryzen 3600
@SuperSandro2000
Copy link
Member

Shouldn't this default to NIX_BUILD_CORES?

@Atemu
Copy link
Member Author

Atemu commented Jan 12, 2021

You can't access that variable in a Nix expression, that'd be impure.

You could make a special case for something like virtualisation.cores = 0 in the VM runner script that would try insert $NIX_BUILD_CORES or a fallback in case that variable is empty (the VM script will also be run outside a nixosTest drv through nixos-rebuild build-vm).
That would be a more complex endavour and outside the scope of this PR I think. Tests only use up to 5 cores anyways IME.

@marvin-mk2
Copy link

marvin-mk2 bot commented Jan 18, 2021

Reminder: Please review!

This Pull Request is awaiting review. If you are the assigned reviewer, please have a look. Try to find another reviewer if necessary. If you can't, please say so. If the status is not accurate, please change it. If nothing happens, this PR will be should be put back in the needs_reviewer queue in one day.


Note: This feature is currently broken. The bot will not actually change the status. If you see this message multiple times, please request a status change manually.

@kevincox kevincox merged commit 4ee9a86 into NixOS:master Jan 18, 2021
@Atemu Atemu deleted the installer-tests-more-cores branch January 18, 2021 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants