mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-25 14:41:27 +00:00
Use longer timeout for root console switch after liveinst
For some reason, in recent tests, switching to a console after live install completes is taking a long time, and tests are failing because we 'only' allow 10 seconds for the login prompt to appear. This seems to indicate some kind of performance bug, but we don't really want all liveinst tests to fail on in, this is not primarily a performance testing framework. So let's tweak the root_console / console_login bits a bit to allow a configurable timeout for the login prompt to appear, and use that to wait 30 secs instead of 10 in this case. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
6e262be28b
commit
9869920f5b
@ -61,6 +61,9 @@ sub root_console {
|
||||
# Switch to an appropriate TTY and log in as root.
|
||||
my $self = shift;
|
||||
my %args = (
|
||||
# 0 means use console_login's default, non-zero values
|
||||
# passed to console_login
|
||||
timeout => 0,
|
||||
@_);
|
||||
# Handle https://bugzilla.redhat.com/show_bug.cgi?id=1635033
|
||||
if (get_var("LIVE") && get_var("DESKTOP") eq "gnome") {
|
||||
@ -69,7 +72,7 @@ sub root_console {
|
||||
else {
|
||||
send_key "ctrl-alt-f2";
|
||||
}
|
||||
console_login(user=>"root");
|
||||
console_login(user=>"root", timeout=>$args{timeout});
|
||||
}
|
||||
|
||||
1;
|
||||
|
@ -152,7 +152,10 @@ sub console_login {
|
||||
my %args = (
|
||||
user => "root",
|
||||
password => get_var("ROOT_PASSWORD", "weakpassword"),
|
||||
# default is 10 seconds, set below, 0 means 'default'
|
||||
timeout => 0;
|
||||
@_);
|
||||
$args{timeout} ||= 10;
|
||||
|
||||
# There's a timing problem when we switch from a logged-in console
|
||||
# to a non-logged in console and immediately call this function;
|
||||
@ -179,7 +182,7 @@ sub console_login {
|
||||
sleep 2;
|
||||
}
|
||||
|
||||
check_screen [$good, 'text_console_login'], 10;
|
||||
check_screen [$good, 'text_console_login'], $args{timeout};
|
||||
# if we're already logged in, all is good
|
||||
if (match_has_tag $good) {
|
||||
_console_login_finish();
|
||||
|
@ -117,8 +117,9 @@ sub run {
|
||||
assert_and_click "anaconda_install_done";
|
||||
if (get_var('LIVE')) {
|
||||
# reboot from a console, it's more reliable than the desktop
|
||||
# runners
|
||||
$self->root_console;
|
||||
# runners. As of 2018-10 switching to console after liveinst
|
||||
# seems to take a long time, so use a longer timeout here
|
||||
$self->root_console(timeout=>30);
|
||||
# if we didn't set a root password during install, set it
|
||||
# now...this is kinda icky, but I don't see a great option
|
||||
if (get_var("INSTALLER_NO_ROOT")) {
|
||||
|
Loading…
Reference in New Issue
Block a user