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

nixos/wireguard: test against multiple kernel versions #86055

Merged
merged 1 commit into from May 28, 2020

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Apr 26, 2020

Motivation for this change

When testing WireGuard updates, I usually run the VM-tests with
different kernels to make sure we're not introducing accidental
regressions for e.g. older kernels.

I figured that we should automate this process to ensure continuously
that WireGuard works fine on several kernels.

For now I decided to test the latest two LTS versions (5.4 and 4.19) and
the latest kernel (currently 5.6). We can add more kernels in the
future, however this seems to significantly slow down evaluation and
test-time.

The kernelPackages argument in the tests is null by default to make
sure that it's still possible to invoke the test-files directly. In that
case the default kernel of NixOS (currently 5.4) is used.


Things to consider before merging:

  • Just run a subset of those tests by default to speed up evaluation and build-time.
  • I'm not 100% sure if passing the kernelPackages argument like this has implications for cross-builds.
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.

When testing WireGuard updates, I usually run the VM-tests with
different kernels to make sure we're not introducing accidental
regressions for e.g. older kernels.

I figured that we should automate this process to ensure continuously
that WireGuard works fine on several kernels.

For now I decided to test the latest LTS version (5.4) and
the latest kernel (currently 5.6). We can add more kernels in the
future, however this seems to significantly slow down evaluation and
time.

The list can be customized by running a command like this:

   nix-build nixos/tests/wireguard --arg kernelVersionsToTest '["4.19"]'

The `kernelPackages` argument in the tests is null by default to make
sure that it's still possible to invoke the test-files directly. In that
case the default kernel of NixOS (currently 5.4) is used.
@Ma27 Ma27 force-pushed the wireguard-kernel-versions branch from 81bba6a to 41bd6d2 Compare April 29, 2020 21:12
@Ma27
Copy link
Member Author

Ma27 commented May 6, 2020

@Mic92 anything else? :)

@Mic92
Copy link
Member

Mic92 commented May 15, 2020

@GrahamcOfBorg test wireguard

@Ma27
Copy link
Member Author

Ma27 commented May 20, 2020

@Mic92 can we merge this?

@Ma27 Ma27 requested a review from Mic92 May 20, 2020 18:49
@Mic92 Mic92 merged commit 8f01823 into NixOS:master May 28, 2020
@Ma27 Ma27 deleted the wireguard-kernel-versions branch May 29, 2020 08:02
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