about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorJanne Heß <janne@hess.ooo>2022-03-24 21:00:37 +0100
committerJanne Heß <janne@hess.ooo>2022-03-27 13:51:02 +0200
commit452102db8fe678aea06eb6904895ec2e4f842c4b (patch)
treef388f9db6797db4a5f003a29bc2dd7e18fc78f60 /nixos/tests
parentbd87ad0cd05b816c06573343b4f8d78a0610082d (diff)
nixos/stage-2-init: Clean up legacy commands
We can perform most of the mkdir/ln/rm using systemd-tmpfiles
instead which cleans up the script.

/bin and /home are created by their activation script snippets

usbfs is deprecated and unused.

hwclock seems to be automatically executed by systemd on startup.

The mkswap to prevent hibernation cycles seems to be executed by systemd
as well since the provided regression tests succeeds.
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/hibernate.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/tests/hibernate.nix b/nixos/tests/hibernate.nix
index 3880f1649bd3d..032ac6527bc71 100644
--- a/nixos/tests/hibernate.nix
+++ b/nixos/tests/hibernate.nix
@@ -117,6 +117,11 @@ in makeTest {
       resume = create_named_machine("resume")
       resume.start()
       resume.succeed("grep 'not persisted to disk' /run/test/suspended")
+
+      # Ensure we don't restore from hibernation when booting again
+      resume.crash()
+      resume.wait_for_unit("default.target")
+      resume.fail("grep 'not persisted to disk' /run/test/suspended")
     '';
 
 }