From ebed809e4301a037e737d13c24d25a416ee0fc6f Mon Sep 17 00:00:00 2001 From: Willem Vanhulle Date: Mon, 2 Nov 2026 18:47:58 +0100 Subject: [PATCH] test: record the resume itself and show it in the guide Stop before the jump into the restored system, because the virtual GPU of the test machine does not repaint after a restore. --- docs/guide.md | 2 ++ vm-tests/hibernate-resume/check.py | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/guide.md b/docs/guide.md index 9680448..b1a594e 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -85,6 +85,8 @@ stage 2, from `sysinit.target` on. ## Resuming from hibernation +The tree held still during a resume, with the kernel's image loading progress in a band across the middle of the screen + Resuming from hibernation looks different from a boot, because the kernel freezes every process before it loads the image, bootvine included. The tree stops moving, and a band across the middle of the screen shows the kernel's own diff --git a/vm-tests/hibernate-resume/check.py b/vm-tests/hibernate-resume/check.py index 0307214..d260609 100644 --- a/vm-tests/hibernate-resume/check.py +++ b/vm-tests/hibernate-resume/check.py @@ -13,9 +13,7 @@ def assert_console_returned(): assert console_level() == BOOT_CONSOLE_LEVEL, f"kernel console level was not restored: {console_level()}" -recording = ScreenRecording(machine) machine.start() -recording.start() machine.wait_for_unit("default.target") assert_console_returned() @@ -29,22 +27,19 @@ machine.succeed( machine.execute("systemctl hibernate >&2 &", check_return=False) machine.wait_for_shutdown() -recording.stop() resume_recording = ScreenRecording(machine) -resume_recording.frames_directory = os.path.join(machine.out_dir, "resume-recording") resume_recording.frame_seconds = 0.1 machine.start() resume_recording.start() machine.wait_for_console_text("Image loading progress") machine.wait_for_console_text("Image loading done") +resume_recording.stop() machine.succeed(f"grep '{SENTINEL_TEXT}' /run/test/sentinel") assert console_level() == BOOT_CONSOLE_LEVEL, f"the restored system kept the opened level: {console_level()}" assert foreground_terminal() != f"tty{BOOTVINE_TERMINAL}", "the restored system came back on bootvine's terminal" machine.fail("systemctl is-active bootvine") -resume_recording.stop() - machine.crash() machine.start() machine.wait_for_unit("default.target")