diff options
author | Lily Foster <lily@lily.flowers> | 2022-10-31 15:31:10 +0100 |
---|---|---|
committer | Atemu <atemu.main@gmail.com> | 2022-11-06 22:15:35 +0100 |
commit | c2b3c9794dfb5a9ec4aa643fca07c1ac8ad3f644 (patch) | |
tree | b2e2ba2ec78963d0ee040631abce77bcbb4519f8 /nixos/tests/installer.nix | |
parent | 753f883c35d0bd52002ce2d049a26bb1ae37c122 (diff) | |
download | nixpkgs-c2b3c9794dfb5a9ec4aa643fca07c1ac8ad3f644.tar nixpkgs-c2b3c9794dfb5a9ec4aa643fca07c1ac8ad3f644.tar.gz nixpkgs-c2b3c9794dfb5a9ec4aa643fca07c1ac8ad3f644.tar.bz2 nixpkgs-c2b3c9794dfb5a9ec4aa643fca07c1ac8ad3f644.tar.lz nixpkgs-c2b3c9794dfb5a9ec4aa643fca07c1ac8ad3f644.tar.xz nixpkgs-c2b3c9794dfb5a9ec4aa643fca07c1ac8ad3f644.tar.zst nixpkgs-c2b3c9794dfb5a9ec4aa643fca07c1ac8ad3f644.zip |
nixosTests: test spaces in mount options via btrfs subvols
Also enabled the btrfs tests for installer-systemd-stage-1 again
Diffstat (limited to 'nixos/tests/installer.nix')
-rw-r--r-- | nixos/tests/installer.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index d9f64a781c5..9b3c8a76299 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -911,4 +911,25 @@ in { ) ''; }; + + # Test to see if we can deal with subvols that need to be escaped in fstab + btrfsSubvolEscape = makeInstallerTest "btrfsSubvolEscape" { + createPartitions = '' + machine.succeed( + "sgdisk -Z /dev/vda", + "sgdisk -n 1:0:+1M -n 2:0:+1G -N 3 -t 1:ef02 -t 2:8200 -t 3:8300 -c 3:root /dev/vda", + "mkswap /dev/vda2 -L swap", + "swapon -L swap", + "mkfs.btrfs -L root /dev/vda3", + "btrfs device scan", + "mount LABEL=root /mnt", + "btrfs subvol create '/mnt/nixos in space'", + "btrfs subvol create /mnt/boot", + "umount /mnt", + "mount -o 'defaults,subvol=nixos in space' LABEL=root /mnt", + "mkdir /mnt/boot", + "mount -o defaults,subvol=boot LABEL=root /mnt/boot", + ) + ''; + }; } |