diff options
author | Jacek Galowicz <jacek@galowicz.de> | 2020-05-12 18:21:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 18:21:44 +0200 |
commit | 11f49fb94d39ea4548d019542b0d7739d7019789 (patch) | |
tree | 559e9c1a9bb0db0f5262a442cadf051d05fce077 /nixos/tests/installer.nix | |
parent | 1e69c8c24273761b951f3820c6bd671851a93d6c (diff) | |
parent | f6e9deee3c05d18a3d454b830bc5894cf01a62d6 (diff) |
Merge pull request #79966 from chkno/bcache
nixos/bcache: Installer test for / on bcache
Diffstat (limited to 'nixos/tests/installer.nix')
-rw-r--r-- | nixos/tests/installer.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 8443b69359b4..eef9abebf9f2 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -650,6 +650,32 @@ in { ''; }; + bcache = makeInstallerTest "bcache" { + createPartitions = '' + machine.succeed( + "flock /dev/vda parted --script /dev/vda --" + + " mklabel msdos" + + " mkpart primary ext2 1M 50MB" # /boot + + " mkpart primary 50MB 512MB " # swap + + " mkpart primary 512MB 1024MB" # Cache (typically SSD) + + " mkpart primary 1024MB -1s ", # Backing device (typically HDD) + "modprobe bcache", + "udevadm settle", + "make-bcache -B /dev/vda4 -C /dev/vda3", + "echo /dev/vda3 > /sys/fs/bcache/register", + "echo /dev/vda4 > /sys/fs/bcache/register", + "udevadm settle", + "mkfs.ext3 -L nixos /dev/bcache0", + "mount LABEL=nixos /mnt", + "mkfs.ext3 -L boot /dev/vda1", + "mkdir /mnt/boot", + "mount LABEL=boot /mnt/boot", + "mkswap -f /dev/vda2 -L swap", + "swapon -L swap", + ) + ''; + }; + # Test a basic install using GRUB 1. grub1 = makeInstallerTest "grub1" { createPartitions = '' |