diff options
author | Jacek Galowicz <jacek@galowicz.de> | 2023-03-16 17:42:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-16 17:42:27 +0100 |
commit | 10988b1ff0053cc976b124682b4a8fe675cfa916 (patch) | |
tree | beed90e3a451b36317cf5f94a8d3e598bff8cb2c /nixos/tests | |
parent | d42e0cfa16b08770c40cb1b9727692ef30d2732a (diff) | |
parent | 64a4ae6f37de056eb0aa3b4eb00dc47570910823 (diff) |
Merge pull request #221251 from astro/test-driver
nixos/test-driver: fix allow_reboot
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/login.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/nixos/tests/login.nix b/nixos/tests/login.nix index 2cff38d20059d..67f5764a0a162 100644 --- a/nixos/tests/login.nix +++ b/nixos/tests/login.nix @@ -13,6 +13,8 @@ import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... }: }; testScript = '' + machine.start(allow_reboot = True) + machine.wait_for_unit("multi-user.target") machine.wait_until_succeeds("pgrep -f 'agetty.*tty1'") machine.screenshot("postboot") @@ -53,7 +55,14 @@ import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... }: machine.screenshot("getty") with subtest("Check whether ctrl-alt-delete works"): - machine.send_key("ctrl-alt-delete") - machine.wait_for_shutdown() + boot_id1 = machine.succeed("cat /proc/sys/kernel/random/boot_id").strip() + assert boot_id1 != "" + + machine.reboot() + + boot_id2 = machine.succeed("cat /proc/sys/kernel/random/boot_id").strip() + assert boot_id2 != "" + + assert boot_id1 != boot_id2 ''; }) |