test: boot the sample machine into tuigreet

Log in through a full-screen greeter rather than agreety, so the checks cover
a greeter that redraws over status output.
This commit is contained in:
Willem Vanhulle committed 2026-11-04 19:59:30 +01:00
1 parent 89eec1ddaf
commit a81cc849b5
4 files changed
+8 -8

No files matched your search

+3 -3
View File
@@ -47,10 +47,10 @@ From top to bottom:
## Booting through the initrd
<img src="https://codeberg.org/wvhulle/bootvine/raw/branch/recordings/slow-services.webp" width="640" alt="A NixOS machine booting through the initrd into stage 2, handing over to a greetd login, then powering off">
<img src="https://codeberg.org/wvhulle/bootvine/raw/branch/recordings/slow-services.webp" width="640" alt="A NixOS machine booting through the initrd into stage 2, handing over to a tuigreet login, then powering off">
The `slow-services` machine boots with a held hardware probe in the initrd,
slow units in stage 2 and one failing unit, hands over to its greetd login
slow units in stage 2 and one failing unit, hands over to its tuigreet login
and powers off. With a systemd initrd, bootvine starts about a second after
the kernel:
@@ -212,7 +212,7 @@ shows the shutdown.
| Run | Shows | Recording |
| --- | --- | --- |
| `nix run .#sample-vm-slow-services` | slow units in the initrd and stage 2, one failing unit, and the handover to a greetd login | [booting through the initrd](#booting-through-the-initrd) |
| `nix run .#sample-vm-slow-services` | slow units in the initrd and stage 2, one failing unit, and the handover to a tuigreet login | [booting through the initrd](#booting-through-the-initrd) |
| `nix run .#sample-vm-text-console` | the same units without a display manager, handing over at the default target | [without a display manager](#without-a-display-manager) |
| `nix run .#sample-vm-scripted-initrd` | the same units with NixOS's scripted initrd, so bootvine starts in stage 2 only | [without a systemd initrd](#without-a-systemd-initrd) |
| `nix run .#sample-vm-encrypted-volume` | a LUKS volume unlocked in the initrd; the passphrase is `sample passphrase` | [passphrase prompts](#passphrase-prompts) |
+1 -1
View File
@@ -10,7 +10,7 @@ let
};
machineDescriptions = {
slow-services = "slow and failing units, a held initrd probe and a greetd login";
slow-services = "slow and failing units, a held initrd probe and a tuigreet login";
text-console = "the slow units without a display manager, handing over at the default target";
scripted-initrd = "the slow units with the scripted initrd, so bootvine starts in stage 2";
encrypted-volume = "a LUKS volume unlocked in the initrd with the passphrase 'sample passphrase'";
+3 -3
View File
@@ -38,7 +38,7 @@ machine.wait_for_unit("greetd.service")
retry(lambda _: "another program took the console" in bootvine_journal(), timeout_seconds=60)
assert unit_state("late-sensor-probe") == "activating", "the boot finished before the display manager took over"
assert foreground_terminal() != f"tty{BOOTVINE_TERMINAL}", "bootvine took the console back from the display manager"
machine.wait_until_tty_matches("1", "login: ")
machine.wait_until_tty_matches("1", "Username:")
assert_unit_start_stays_off_console("Mid boot status probe")
show_status = machine.succeed("systemctl show -p ShowStatus --value").strip()
assert show_status == "no", f"systemd status output came back before the boot finished: {show_status}"
@@ -62,9 +62,9 @@ show_status = machine.succeed("systemctl show -p ShowStatus --value").strip()
assert show_status == "yes", f"systemd status output was not restored: {show_status}"
assert_unit_start_stays_off_console("Post boot status probe")
machine.wait_until_tty_matches("1", "login: ")
machine.wait_until_tty_matches("1", "Username:")
machine.send_chars("sample-user\n")
machine.wait_until_tty_matches("1", "Password: ")
machine.wait_until_tty_matches("1", "Password:")
machine.send_chars("sample-user\n")
machine.wait_until_succeeds("pgrep -u sample-user bash", timeout=30)
+1 -1
View File
@@ -37,6 +37,6 @@ in
services.greetd = {
enable = true;
settings.default_session.command = "${pkgs.greetd}/bin/agreety --cmd ${pkgs.bashInteractive}/bin/bash";
settings.default_session.command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd ${pkgs.bashInteractive}/bin/bash";
};
}