nixos: Only use compatible kernels for ZFS tests

Right now, the latest kernel is version 5.19, for which there is no
compatible upstream release for ZFS. However, our NixOS VM test always
uses linuxPackages_latest and thus will fail with an evaluation error
most of the time when a new mainline kernel is released.

Since we expose a latestCompatibleLinuxPackages attribute for the ZFS
packages, we already know what's the latest kernel version that is
supported so let's use that instead of linuxPackages_latest.

Signed-off-by: aszlig <aszlig@nix.build>
This commit is contained in:
aszlig 2022-09-16 14:52:54 +02:00
parent 58770a334d
commit 373feb46cf
No known key found for this signature in database
GPG Key ID: 684089CE67EBB691

View File

@ -8,7 +8,9 @@ with import ../lib/testing-python.nix { inherit system pkgs; };
let
makeZfsTest = name:
{ kernelPackage ? if enableUnstable then pkgs.linuxPackages_latest else pkgs.linuxPackages
{ kernelPackage ? if enableUnstable
then pkgs.zfsUnstable.latestCompatibleLinuxPackages
else pkgs.linuxPackages
, enableUnstable ? false
, extraTest ? ""
}: