Add a 'blind' mode to do_bootloader, use it in notifications test
All checks were successful
CI via Tox and perl / tox (pull_request) Successful in 1m25s
CI via Tox and perl / perl (pull_request) Successful in 3m31s
CI via Tox and perl / checkwiki (pull_request) Successful in 34s
AI Code Review / ai-review (pull_request_target) Successful in 28s

This makes it just keep hitting left until the boot menu shows up
(rather like a human would), instead of trying to see the boot menu
before pressing a key.

It seems like the notifications test on aarch64 often fails because
we somehow don't match the boot menu even though it shows up for
5 seconds. I don't understand why not, but this should hopefully
work around it, let's see.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2026-04-16 09:10:14 -07:00
commit 4394c668db
2 changed files with 12 additions and 3 deletions

View file

@ -396,6 +396,7 @@ sub do_bootloader {
timeout => 30,
uefi => get_var("UEFI"),
ofw => get_var("OFW"),
blind => 0,
@_
);
my $relnum = get_release_number;
@ -403,9 +404,17 @@ sub do_bootloader {
# sure we actually did a UEFI boot
my $boottag = "bootloader_bios";
$boottag = "bootloader_uefi" if ($args{uefi});
assert_screen $boottag, $args{timeout};
if ($args{blind}) {
# press left, which should harmlessly interrupt the countdown,
# till we match on the screen
send_key_until_needlematch($boottag, 'left', $args{timeout}, 1);
}
else {
assert_screen $boottag, $args{timeout};
}
if ($args{mutex}) {
# cancel countdown
# repeated if we're in blind mode, but should be harmless
send_key "left";
mutex_lock $args{mutex};
mutex_unlock $args{mutex};

View file

@ -26,10 +26,10 @@ sub _handle_bootloader {
# boot with '3' to get to a console. factored out of run() as
# it's repeated on the update flow
if (get_var("BOOTFROM")) {
do_bootloader(postinstall => 1, params => '3');
do_bootloader(postinstall => 1, params => '3', blind => 1);
}
else {
do_bootloader(postinstall => 0, params => '3');
do_bootloader(postinstall => 0, params => '3', blind => 1);
}
}