Commit 7c33698
committed
Testsuite: T9214: fix GRUB auto-boot race in console-select navigation
Commit 2d525e9 ("Testsuite: T9099: harden GRUB console-select navigation
with expect() check") added expect() checks after each GRUB submenu transition
in BOOTLOADERchooseSerialConsole(), but did not fix the underlying race it
described: on the installed system, BOOTLOADER_LOAD_TMO (5s) is slept before
the first KEY_DOWN is sent, while that system's top-level GRUB menu auto-boots
its default entry after the same 5s with no margin.
Under host load the countdown could win, so GRUB booted straight past
"Boot options" and the new child.expect('Select console type', ...) then
blocked for the full BOOTLOADER_TMO waiting for text that would never appear.
Send the first navigation key immediately after the GRUB banner is detected
instead of sleeping first, so the auto-boot countdown is cancelled right away
rather than raced against.1 parent aee889f commit 7c33698
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
599 | 598 | | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
600 | 606 | | |
601 | 607 | | |
602 | 608 | | |
603 | | - | |
| 609 | + | |
604 | 610 | | |
605 | 611 | | |
606 | 612 | | |
| |||
0 commit comments