Skip to content

Commit aeb3483

Browse files
authored
Merge pull request vyos#1269 from c-po/testsuite-grub-boot-race
Testsuite: T9214: fix GRUB auto-boot race in console-select navigation
2 parents aee889f + 7c33698 commit aeb3483

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

scripts/check-qemu-install

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,12 +595,18 @@ def BOOTLOADERchooseSerialConsole(child, live: bool) -> None:
595595

596596
# Wait for GRUB
597597
child.expect(GRUB_STRING, timeout=BOOTLOADER_TMO)
598-
time.sleep(BOOTLOADER_LOAD_TMO)
599598

599+
# Unlike the live ISO menus (10s timeout), the installed system's
600+
# top-level menu auto-boots its default entry after ~BOOTLOADER_LOAD_TMO
601+
# seconds - the same delay this script would otherwise sleep before
602+
# sending any key. Under host load that leaves no margin: GRUB can
603+
# auto-boot before "Boot options" is ever selected. Send the first
604+
# navigation key immediately to cancel the countdown, then give the
605+
# screen time to settle.
600606
# Select GRUB serial console
601607
# Boot options
602608
child.send(KEY_DOWN)
603-
time.sleep(BOOTLOADER_SLEEP)
609+
time.sleep(BOOTLOADER_LOAD_TMO)
604610
child.send(KEY_RETURN)
605611
time.sleep(BOOTLOADER_SLEEP)
606612
# GRUB submenus never time out on their own, so confirm we actually

0 commit comments

Comments
 (0)