about summary refs log tree commit diff
path: root/nixos/tests/systemd.nix
AgeCommit message (Collapse)AuthorFilesLines
2022-03-31Merge pull request #165035 from roberth/nixosTest-remove-machine-argRobert Hensing1-1/+1
nixosTest: remove `machine` syntax sugar
2022-03-30nixos/systemd: Switch to ManagerEnvironment=Janne Heß1-0/+4
This accomplishes multiple things: - Allows us to start systemd without stage-2-init.sh. This was not possible before because the environment would have been wrong - `systemctl daemon-reexec` also changes the environment, giving us newer tools for the fs packages - Starts systemd in a fully clean environment, making everything more consistent and pure
2022-03-28treewide: machine -> nodes.machineRobert Hensing1-1/+1
2021-12-16nixos/systemd: set TZDIR for PID 1Naïm Favier1-0/+12
Fixes #105049
2021-11-21nixos/qemu-vm: default memorySize 384 -> 1024Artturin1-1/+0
the default hasn't been changed since 2009 this can improve our test performances nixos/tests: remove explicit memorySize <1024 1024MiB is now the default
2021-02-14nixosTests.*: update to use virtualisation.fileSystemsMaciej Krüger1-1/+1
2020-11-27Merge master into staging-nextFrederik Rietdijk1-1/+1
2020-11-24utillinux: rename to util-linuxGraham Christensen1-1/+1
2020-11-19nixosTests.systemd: increase accounting coverageFlorian Klink1-11/+24
For now, testing IO Accounting is skipped, as it seems to be either broken, or hard to reproduce in a VM.
2020-08-24nixosTests.systemd: disable RuntimeWatchdogUSec=30s assertionFlorian Klink1-1/+2
For some reason, this value isn't updated, at least not inside the VM. Uncomment it, so we still test the rest. Needs to be investigated further.
2020-08-13nixosTests.systemd: update outputFlorian Klink1-2/+2
systemd shows minutes as `min`, not `m`.
2020-08-05nixosTests.systemd: test cryptsetup supportFlorian Klink1-1/+24
This creates and opens a luks volume, puts its passphrase into a keyfile and writes a /etc/crypttab. It then reboots the machine, and verifies systemd parsed /etc/crypttab properly, and was able to unlock the volume with the keyfile provided (as we try to mount it). The memorySize of the VM had to be bumped, as luksFormat would otherwise run out of memory.
2020-07-15Merge branch 'staging-next' into stagingJan Tojnar1-0/+22
2020-07-11systemd: Allow setting the transient hostname via DHCPMichael Weiss1-0/+5
This permits using method_set_hostname but still denies method_set_static_hostname. As a result DHCP clients can now always set the transient hostname via the SetHostname method of the D-Bus interface of systemd-hostnamed (org.freedesktop.hostname1.set-hostname). If the NixOS option networking.hostName is set to an empty string (or "localhost") the static hostname (kernel.hostname but NOT /etc/hostname) will additionally be updated (this is intended). From "man hostnamectl": The transient hostname is a fallback value received from network configuration. If a static hostname is set, and is valid (something other than localhost), then the transient hostname is not used. Fix #74847. Note: It's possible to restrict access to the org.freedesktop.hostname1 interface using Polkit rules.
2020-07-08nixos/systemd: add options for hardware watchdog managementMatt Layher1-0/+22
2020-04-07treewide: use runtimeShell in nixos/Jörg Thalheim1-1/+1
This is needed for cross-compilation.
2020-01-30Merge pull request #78241 from andrew-d/andrew/systemd-tests-pythonworldofpeace1-37/+56
nixosTests.systemd: port to Python
2020-01-29nixos/display-managers/auto: removeworldofpeace1-1/+1
This module allows root autoLogin, so we would break that for users, but they shouldn't be using it anyways. This gives the impression like auto is some special display manager, when it's just lightdm and special pam rules to allow root autoLogin. It was created for NixOS's testing so I believe this is where it belongs.
2020-01-22nixosTests.systemd: port to PythonAndrew Dunham1-37/+56
2019-08-31nixos/tests/systemd: Fix x-initrd-mount flakiness (#67798)aszlig1-4/+6
It turns out that checking for the last mount time of an ext4 file system isn't a very reliable way to check whether the file system was properly unmounted. When creating that test in the first place (88530e02b6fa9b5429dc09972b), I was reluctant to inspect the file system when the VM is down and was searching for a way to check for a clean unmount *after* the file system was mounted again to make sure we don't need to create a 512 MB raw image on the host. Fortunately however, when converting from qcow2, qemu-img actually writes a sparse file, so for most file systems (that is, file systems supporting sparse files) this shouldn't waste a lot of disk space. So when investigating the flakiness, I found that whenever the test is failing, the unmount of /test-x-initrd-mount was done *before* the final step during which systemd remounts+unmounts all the remaining file systems. I haven't investigated why this is the case, but the test is a regression test for https://github.com/NixOS/nixpkgs/issues/35268, which actually didn't unmount the file system *at* *all*, so really all we need to take care here is whether the unmount has happened and not *how*. To make sure that checking the filesystem state is enough for this, I temporarily replaced the $machine->shutdown call with $machine->crash and verified that the file system state is "not clean". Signed-off-by: aszlig <aszlig@nix.build> Fixes: https://github.com/NixOS/nixpkgs/issues/67555
2019-08-25nixos/systemd: add cgroup accounting testFlorian Klink1-0/+7
2019-08-18nixosTests.systemd: add fq_codel testFlorian Klink1-0/+6
2019-08-18nixosTests.systemd: remove duplicate copypastaFlorian Klink1-9/+0
It seems the regression test for #35268 sneaked in twice.
2019-08-01systemd test: add test for systemd-shutdown scriptsNikolay Amiantov1-2/+25
2018-12-12nixos/systemd: Add a regression test for #50273Arian van Putten1-0/+5
2018-04-16nixos/test/systemd: fix broken testxeji1-0/+2
timing bug resulted in sporadic test failures on hydra
2018-03-03systemd: Update to latest NixOS branchaszlig1-0/+66
Updated to the latest version of the nixos-v237 branch, which fixes two things: * Make sure that systemd looks in /etc for configuration files. https://github.com/NixOS/systemd/pull/15 * Fix handling of the x-initrd.mount option. https://github.com/NixOS/systemd/pull/16 I've added NixOS VM tests for both to ensure we won't run into regressions. The newly added systemd test only tests for that and is by no means exhaustive, but it's a start. Personally I only wanted to fix the former issue, because that's the one I've been debugging. After sending in a pull request for our systemd fork (https://github.com/NixOS/systemd/pull/17) I got a notice from @Mic92, that he already fixed this and his fix was even better as it's even suitable for upstream (so we hopefully can drop that patch someday). The reason why the second one came in was simply because it has been merged before the former, but I thought it would be a good idea to have tests for that as well. In addition I've removed the sysconfdir=$out/etc entry to make sure the default (/etc) is used. Installing is still done to $out, because those directories that were previously into sysconfdir now get into factoryconfdir. Quote from commit NixOS/systemd@98067cc806ae0d2759cdd2334f230cd8548e531: By default systemd should read all its configuration from /etc. Therefore we rely on -Dsysconfdir=/etc in meson as default value. Unfortunately this would also lead to installation of systemd's own configuration files to `/etc` whereas we are limited to /nix/store. To counter that this commit introduces two new configuration variables `factoryconfdir` and `factorypkgconfdir` to install systemd's own configuration into nix store again, while having executables looking up files in /etc. Tested this change against all of the NixOS VM tests we have in nixos/release.nix. Between this change and its parent no new tests were failing (although a lot of them were flaky). Signed-off-by: aszlig <aszlig@nix.build> Cc: @Mic92, @tk-ecotelecom, @edolstra, @fpletz Fixes: #35415 Fixes: #35268