diff --git a/nixos/tests/lvm2/default.nix b/nixos/tests/lvm2/default.nix index 1eb9f572a4d6..e0358ec2806f 100644 --- a/nixos/tests/lvm2/default.nix +++ b/nixos/tests/lvm2/default.nix @@ -2,7 +2,7 @@ , config ? { } , pkgs ? import ../../.. { inherit system config; } , lib ? pkgs.lib -, kernelVersionsToTest ? [ "4.19" "5.4" "5.10" "5.15" "latest" ] +, kernelVersionsToTest ? [ "4.19" "5.4" "5.10" "5.15" "6.1" "latest" ] }: # For quickly running a test, the nixosTests.lvm2.lvm-thinpool-linux-latest attribute is recommended diff --git a/nixos/tests/lvm2/thinpool.nix b/nixos/tests/lvm2/thinpool.nix index 82c6460a890a..14781a8a6045 100644 --- a/nixos/tests/lvm2/thinpool.nix +++ b/nixos/tests/lvm2/thinpool.nix @@ -1,5 +1,5 @@ { kernelPackages ? null }: -import ../make-test-python.nix ({ pkgs, ... }: { +import ../make-test-python.nix ({ pkgs, lib, ... }: { name = "lvm2-thinpool"; meta.maintainers = with pkgs.lib.maintainers; [ ajs124 ]; @@ -17,11 +17,13 @@ import ../make-test-python.nix ({ pkgs, ... }: { boot = lib.mkIf (kernelPackages != null) { inherit kernelPackages; }; }; - testScript = '' + testScript = let + mkXfsFlags = lib.optionalString (lib.versionOlder kernelPackages.kernel.version "5.10") "-m bigtime=0 -m inobtcount=0"; + in '' machine.succeed("vgcreate test_vg /dev/vdb") machine.succeed("lvcreate -L 512M -T test_vg/test_thin_pool") machine.succeed("lvcreate -n test_lv -V 16G --thinpool test_thin_pool test_vg") - machine.succeed("mkfs.xfs /dev/test_vg/test_lv") + machine.succeed("mkfs.xfs ${mkXfsFlags} /dev/test_vg/test_lv") machine.succeed("mkdir /mnt; mount /dev/test_vg/test_lv /mnt") assert "/dev/mapper/test_vg-test_lv" == machine.succeed("findmnt -no SOURCE /mnt").strip() machine.succeed("dd if=/dev/zero of=/mnt/empty.file bs=1M count=1024")