nixosTests: test spaces in mount options via btrfs subvols

Also enabled the btrfs tests for installer-systemd-stage-1 again

+1
nixos/release-combined.nix
···
(onFullSupported "nixos.tests.i3wm")
(onSystems ["x86_64-linux"] "nixos.tests.installer.btrfsSimple")
(onSystems ["x86_64-linux"] "nixos.tests.installer.btrfsSubvolDefault")
(onSystems ["x86_64-linux"] "nixos.tests.installer.btrfsSubvols")
(onSystems ["x86_64-linux"] "nixos.tests.installer.luksroot")
(onSystems ["x86_64-linux"] "nixos.tests.installer.lvm")
···
(onFullSupported "nixos.tests.i3wm")
(onSystems ["x86_64-linux"] "nixos.tests.installer.btrfsSimple")
(onSystems ["x86_64-linux"] "nixos.tests.installer.btrfsSubvolDefault")
+
(onSystems ["x86_64-linux"] "nixos.tests.installer.btrfsSubvolEscape")
(onSystems ["x86_64-linux"] "nixos.tests.installer.btrfsSubvols")
(onSystems ["x86_64-linux"] "nixos.tests.installer.luksroot")
(onSystems ["x86_64-linux"] "nixos.tests.installer.lvm")
+4 -3
nixos/tests/installer-systemd-stage-1.nix
···
# them when fixed.
inherit (import ./installer.nix { inherit system config pkgs; systemdStage1 = true; })
# bcache
-
# btrfsSimple
-
# btrfsSubvolDefault
-
# btrfsSubvols
# encryptedFSWithKeyfile
# grub1
# luksroot
···
# them when fixed.
inherit (import ./installer.nix { inherit system config pkgs; systemdStage1 = true; })
# bcache
+
btrfsSimple
+
btrfsSubvolDefault
+
btrfsSubvolEscape
+
btrfsSubvols
# encryptedFSWithKeyfile
# grub1
# luksroot
+21
nixos/tests/installer.nix
···
)
'';
};
}
···
)
'';
};
+
+
# 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",
+
)
+
'';
+
};
}