nixpkgs/nixos/tests/kernel-generic.nix
Fabián Heredia Montiel 79081fda5e linux/hardened/patches/6.9: init at 6.9.1-hardened1
- ACPI_CUSTOM_METHOD: dropped in 0cc46f1a52b4220ec11d98a01575909ca820a7b4
- UBSAN_SANITIZE_ALL: dropped in 918327e9b7ffb45321cbb4b9b86b58ec555fe6b3
2024-05-20 15:13:13 -06:00

52 lines
1.3 KiB
Nix

{ system ? builtins.currentSystem
, config ? { }
, pkgs ? import ../.. { inherit system config; }
}@args:
with pkgs.lib;
let
testsForLinuxPackages = linuxPackages: (import ./make-test-python.nix ({ pkgs, ... }: {
name = "kernel-${linuxPackages.kernel.version}";
meta = with pkgs.lib.maintainers; {
maintainers = [ nequissimus atemu ma27 ];
};
nodes.machine = { ... }:
{
boot.kernelPackages = linuxPackages;
};
testScript =
''
assert "Linux" in machine.succeed("uname -s")
assert "${linuxPackages.kernel.modDirVersion}" in machine.succeed("uname -a")
'';
}) args);
kernels = (removeAttrs pkgs.linuxKernel.vanillaPackages ["__attrsFailEvaluation"]) // {
inherit (pkgs.linuxKernel.packages)
linux_4_19_hardened
linux_5_4_hardened
linux_5_10_hardened
linux_5_15_hardened
linux_6_1_hardened
linux_6_6_hardened
linux_6_8_hardened
linux_6_9_hardened
linux_rt_5_4
linux_rt_5_10
linux_rt_5_15
linux_rt_6_1
linux_libre
linux_testing;
};
in mapAttrs (_: lP: testsForLinuxPackages lP) kernels // {
passthru = {
inherit testsForLinuxPackages;
testsForKernel = kernel: testsForLinuxPackages (pkgs.linuxPackagesFor kernel);
};
}