Commit Graph

238 Commits

Author SHA1 Message Date
K900
15d95c7b74 nixos/qemu-vm: split up the "keep EFI variables from system image" logic 2024-04-05 09:00:12 +03:00
K900
7b602cff5c nixos/tests/installer: avoid create_machine, clean up
- use normal VM nodes for target, with some extra trickery
- rename preBootCommands to postBootCommands to match its actual intent
- rename VMs to installer and target, so they're not all called machine
- set platforms on non-UEFI tests properly
- add missing packages for systemd-boot test
- fix initrd secrets leaking into the store and having wrong paths
2024-04-03 16:16:11 +03:00
Will Fancher
f1731f2e28 nixos: Support systemd-gpt-auto-root 2024-03-15 18:22:04 -04:00
K900
423098c284 nixos/lib/test-driver: drop LegacyStartCommand, clean up create_machine API
We can finally do this now that it's no longer used.
2024-02-27 23:15:59 +03:00
K900
786f391922 nixos/tests/installer: inline + fix UEFI start command generation 2024-02-27 23:15:59 +03:00
pennae
258b935d70 nixos/filesystems: make supportedFilesystems an attrset
this lets us *dis*able filesystem explicitly, as is required by e.g. the
zfs-less installer images. currently that specifically is only easily
possible by adding an overlay that stubs out `zfs`, with the obvious
side-effect of also removing tooling that could run without the kernel
module loaded.
2024-02-19 11:46:52 +01:00
Jade Lovelace
e7451cacf9 nixos/tests: fix installer under network-online dep fix 2024-01-19 00:11:35 -08:00
K900
391d29cb04 nixos/tests/installer: fix eval 2024-01-12 15:24:49 +01:00
github-actions[bot]
9f96550945
Merge master into staging-next 2024-01-07 12:01:24 +00:00
Jörg Thalheim
db59d03371
Merge branch 'master' into pr/bcachefs 2024-01-07 11:40:30 +01:00
github-actions[bot]
8455920fda
Merge staging-next into staging 2023-12-28 18:01:49 +00:00
Sandro Jäckel
e2702f5aee
treewide: don't use python3Minimal where it is not required
Building a python environment with python3Minimal requires hydra
to bootstrap pip and build all packages used in the environment
which would otherwise not be built. This reduces cache re-use and duplicates things.

Also common dependencies normally included in python itself
are not properly checked and can cause hard to debug errors
because everyone just assumes those modules are there.
2023-12-21 02:21:48 +01:00
Luflosi
c351a84eec
nixos/tests/installer: test /boot on ZFS
Let's test / on ZFS and /boot on ZFS in separate tests since the GRUB integration for ZFS seems to be not very well maintained.
If the test breaks in the future it's easier to figure out that ZFS on /boot is at fault and either fix the issue or disable the test.
The new test creates a ZFS pool where all features not compatible with GRUB2 are disabled. The dataset is then mounted on /boot and we check that the installer correctly generates a bootable configuration.
Try to use as many ZFS features as possible to verify that GRUB can handle them.
2023-12-07 13:17:49 +01:00
Madoura
8772aa52b6
Revert "treewide: add bcachefsLinuxTesting and bcachefsLinuxTesting tests"
This reverts commit c2450c4515.

No longer needed as the default is 'linuxPackages_testing'
2023-12-05 01:04:21 -06:00
Julien Malka
3aa4ed0985 nixos/tests/installer: init clevis tests
Co-Authored-By: Camille Mondon <camillemondon@free.fr>
2023-12-02 11:55:52 +00:00
Madoura
c2450c4515
treewide: add bcachefsLinuxTesting and bcachefsLinuxTesting tests
nixos/tests/installer: add bcachefsLinuxTesting and bcachefsLinuxTesting tests

bcachefs-tools: add bcachefsLinuxTesting and bcachefsLinuxTesting tests
2023-11-18 09:58:56 -06:00
Ryan Lahfa
a905c3a544
Merge pull request #262854 from ElvishJerricco/systemd-stage-1-bcachefs-decryption
systemd-stage-1: bcachefs decryption
2023-10-29 22:24:38 +01:00
Ryan Lahfa
de47b2e8a5
Merge pull request #263033 from ElvishJerricco/systemd-stage-1-filesystems-encrypted
systemd-stage-1: Enable more encrypted installer tests
2023-10-28 20:38:14 +02:00
misuzu
e0d3bcbb53 nixos/tests/installer: add bpool for grub files in zfsroot test 2023-10-24 13:43:21 +02:00
misuzu
b8a547d38b nixos/tests/installer: add postInstallCommands to makeInstallerTest 2023-10-24 13:43:21 +02:00
Will Fancher
99a47a5e35 systemd-stage-1: Enable more encrypted installer tests 2023-10-23 17:40:34 -04:00
Will Fancher
0425c4de6d systemd-stage-1: bcachefs decryption 2023-10-22 20:07:55 -04:00
Ryan Lahfa
e6ade691a5
Merge pull request #259347 from ElvishJerricco/systemd-stage-1-zfs-sysusr-dependency
systemd 254: ZFS /usr fix with systemd-stage-1
2023-10-21 18:04:13 +01:00
Will Fancher
524714f7ea systemd 254: ZFS /usr fix with systemd-stage-1 2023-10-06 04:25:25 -04:00
Linus Heckemann
f6f5f60879 bcachefs tests: unlock directly to the right keyring 2023-09-22 12:58:04 +02:00
K900
f58e6874f3 nixos/tests/installer: fix after #244449 2023-07-21 10:36:29 +03:00
Robert Hensing
a1d0ee8c50
nixos/nix-channel: Apply suggestions from code review
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2023-07-08 20:49:37 +02:00
Robert Hensing
61afc4d166 nixos/nix-channel: Take care of NIX_PATH's non-empty default when disabled 2023-07-07 23:12:39 +02:00
Robert Hensing
d00e242b80 nixos: Add nixos.channel.enable
For those who wish to get rid of nix-channel.
2023-07-07 19:00:06 +02:00
Robert Hensing
faa1b3babc nixosTests.installer: Fix driverInteractive 2023-07-07 19:00:05 +02:00
Robert Hensing
218ef2f405 nixosTests.installer: Make sure we boot into the config we generated 2023-07-07 19:00:05 +02:00
Jörg Thalheim
af57956199 nixos/test/bcachefs: fix password input 2023-07-01 17:10:11 +02:00
happysalada
97f556cac1 installer: remove unused with 2023-06-19 13:12:04 -04:00
happysalada
31342eea54 installer: remove reference to non existing doc option 2023-06-19 13:12:04 -04:00
nikstur
0bdba6c99b nixos/qemu-vm: use persistent block device names
This change removes the bespoke logic around identifying block devices.
Instead of trying to find the right device by iterating over
`qemu.drives` and guessing the right partition number (e.g.
/dev/vda{1,2}), devices are now identified by persistent names provided
by udev in /dev/disk/by-*.

Before this change, the root device was formatted on demand in the
initrd. However, this makes it impossible to use filesystem identifiers
to identify devices. Now, the formatting step is performed before the VM
is started. Because some tests, however, rely on this behaviour, a
utility function to replace this behaviour in added in
/nixos/tests/common/auto-format-root-device.nix.

Devices that contain neither a partition table nor a filesystem are
identified by their hardware serial number which is injecetd via QEMU
(and is thus persistent and predictable). PCI paths are not a reliably
way to identify devices because their availability and numbering depends
on the QEMU machine type.

This change makes the module more robust against changes in QEMU and the
kernel (non-persistent device naming) and by decoupling abstractions
(i.e. rootDevice, bootPartition, and bootLoaderDevice) enables further
improvement down the line.
2023-06-16 19:36:03 +02:00
Matthias Berndt
feb5a3cdcd remove unneeded import 2023-05-23 14:56:49 +02:00
Matthias Berndt
cb410a8c59 Merge remote-tracking branch 'upstream/master' into mberndt123/stratis-rootfs 2023-05-17 21:47:19 -04:00
Matthias Berndt
92814241a8 improve stratis initrd support
it is now possible to supply a stratis pool uuid
for every filesystem, and if that filesystem
is required for boot, the relevant pool will be
started in the initramfs.
2023-05-16 22:48:36 -04:00
ajs124
6db7450827 nixos/installer/grub1: remove 2023-05-10 21:51:26 +02:00
Matthias Berndt
8aa320b4c2 address code review issues 2023-05-08 23:18:55 +02:00
Matthias Berndt
d1411444b6 add installer test for stratis root fs 2023-05-07 18:48:28 +02:00
Vladimír Čunát
fb91facda2
nixos/tests/installer.nix: add missing kbd.dev
Sometimes the tests fail since splitting kbd.dev in PR #226247
https://hydra.nixos.org/build/218620685/nixlog/2/tail
Apparently the failure isn't 100% reproducible; I don't know how/why.
2023-05-04 08:35:23 +02:00
Raito Bezarius
58f4c3944d nixos/tests(treewide): vdb → vda, vdc → vdb, vdd → vdc, … / bootDevice → rootDevice 2023-04-21 13:00:19 +02:00
Adam Joseph
4d15fb3ade nixos/tests/installer.nix: fix hydra eval
Hydra Eval has been throwing these eval errors for the past four
months, which makes the yellow "Eval Errors" bubble pretty useless:

https://hydra.nixos.org/eval/1790611#tabs-errors

```
in job ‘nixos.tests.installer.separateBoot.aarch64-linux’:
error: Non-EFI boot methods are only supported on i686 / x86_64

in job ‘nixos.tests.installer.simple.aarch64-linux’:
error: Non-EFI boot methods are only supported on i686 / x86_64

in job ‘nixos.tests.installer.lvm.aarch64-linux’:
error: Non-EFI boot methods are only supported on i686 / x86_64
```

This PR moves the failure for the `!isEfi &&
!pkgs.stdenv.hostPlatform.isx86` case from eval-time to runtime, so
the failure gets categorized under the test that produced it, rather
than just being lumped in to the catch-all Eval Errors pile
which... apparently nobody cares about.
2023-03-09 00:58:26 -08:00
rnhmjoj
b139c467e9
Revert "Revert "nixos/tests/installer: test relative paths in initrd secrets""
This reverts commit 8d45d82c71.

The tests shold pass now that systemd-boot handles failures in initrd
for older boot entries.
2023-01-19 20:50:59 +01:00
Vladimír Čunát
8d45d82c71
Revert "nixos/tests/installer: test relative paths in initrd secrets"
This reverts commit 9bb888c9f8 from PR #210812.
We first need to fix nixosTests.installer.simpleUefiSystemdBoot
2023-01-19 10:25:22 +01:00
Vladimír Čunát
2b988c76fd
Revert "nixosTests.installer: bump memorySize"
This reverts commit 309ed272be.
The bump caused nixosTests.installer.luksroot hang, e.g. see
https://hydra.nixos.org/build/205951019
(I don't know why.)

The OOM issues were avoided by 6dccdc4585 (newer but merged earlier)
2023-01-18 11:45:48 +01:00
rnhmjoj
9bb888c9f8
nixos/tests/installer: test relative paths in initrd secrets 2023-01-16 02:31:02 +01:00
rnhmjoj
928181b5f3
nixos/tests/installer: add full disk encryption test
This tests a common full disk encryption setup:
https://gist.github.com/ladinu/bfebdd90a5afd45dec811296016b2a3f
2023-01-16 02:31:01 +01:00
Artturi
ee5e15cf2d
Merge pull request #208614 from LeSuisse/grub2-CVE-2022-2601-CVE-2022-3775 2023-01-15 23:23:33 +02:00