Merge pull request #284263 from amarshall/fix-zfs-test-wrong-pkg

nixos/tests/zfs: fix using wrong package in tests; minor cleanup
This commit is contained in:
Ryan Lahfa 2024-01-30 16:37:17 +01:00 committed by GitHub
commit bed631549e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,12 +8,9 @@ with import ../lib/testing-python.nix { inherit system pkgs; };
let
makeZfsTest = name:
{ kernelPackage ? if enableUnstable
then pkgs.zfsUnstable.latestCompatibleLinuxPackages
else pkgs.linuxPackages
, enableUnstable ? false
{ kernelPackages
, enableSystemdStage1 ? false
, zfsPackage ? if enableUnstable then pkgs.zfs else pkgs.zfsUnstable
, zfsPackage
, extraTest ? ""
}:
makeTest {
@ -35,7 +32,7 @@ let
boot.loader.timeout = 0;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostId = "deadbeef";
boot.kernelPackages = kernelPackage;
boot.kernelPackages = kernelPackages;
boot.zfs.package = zfsPackage;
boot.supportedFilesystems = [ "zfs" ];
boot.initrd.systemd.enable = enableSystemdStage1;
@ -197,16 +194,22 @@ in {
# maintainer: @raitobezarius
series_2_1 = makeZfsTest "2.1-series" {
zfsPackage = pkgs.zfs_2_1;
kernelPackages = pkgs.linuxPackages;
};
stable = makeZfsTest "stable" { };
unstable = makeZfsTest "unstable" {
enableUnstable = true;
stable = makeZfsTest "stable" {
zfsPackage = pkgs.zfsStable;
kernelPackages = pkgs.linuxPackages;
};
unstableWithSystemdStage1 = makeZfsTest "unstable" {
enableUnstable = true;
unstable = makeZfsTest "unstable" rec {
zfsPackage = pkgs.zfsUnstable;
kernelPackages = zfsPackage.latestCompatibleLinuxPackages;
};
unstableWithSystemdStage1 = makeZfsTest "unstable" rec {
zfsPackage = pkgs.zfsUnstable;
kernelPackages = zfsPackage.latestCompatibleLinuxPackages;
enableSystemdStage1 = true;
};