mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-21 21:43:08 +00:00
Tweak quit_firefox to handle hang on exit on ppc64le (#2094137)
It seems when we quit Firefox back to a VT on ppc64le, the system hangs. Not sure why, but we can deal with it by rebooting the system and logging back in as root if it happens. Also take the opportunity to clean up the flow of quit_firefox so we always check that we get back to a console then wait 5 seconds for the console to settle, so all the tests that call it can stop doing that. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
e1ed9960f3
commit
4971de39e9
26
lib/utils.pm
26
lib/utils.pm
@ -946,15 +946,31 @@ sub download_modularity_tests {
|
||||
|
||||
sub quit_firefox {
|
||||
# Quit Firefox, handling the 'close multiple tabs' warning screen if
|
||||
# it shows up
|
||||
# it shows up. Expects to quit to a recognizable console
|
||||
send_key "ctrl-q";
|
||||
# expect to get to either the tabs warning or a console
|
||||
if (check_screen ["user_console", "root_console", "firefox_close_tabs"], 30) {
|
||||
# if we hit the tabs warning, click it
|
||||
click_lastmatch if (match_has_tag "firefox_close_tabs");
|
||||
# if we hit a console we're good
|
||||
unless (match_has_tag("firefox_close_tabs")) {
|
||||
wait_still_screen 5;
|
||||
return;
|
||||
}
|
||||
# otherwise we hit the tabs warning, click it
|
||||
click_lastmatch;
|
||||
# again, if we hit a console, we're good
|
||||
if (check_screen ["user_console", "root_console"], 30) {
|
||||
wait_still_screen 5;
|
||||
return;
|
||||
}
|
||||
}
|
||||
# it's a bit odd if we reach here, but could mean we quit to a
|
||||
# desktop, or the firefox_close_tabs needle went stale...
|
||||
# if we reach here, we didn't see a console. This is most likely
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2094137 . soft fail
|
||||
# and reboot. this won't work if we need to decrypt or handle boot
|
||||
# args, but I don't think anything that calls this needs it
|
||||
record_soft_failure "No console on exit from Firefox, probably RHBZ #2094137";
|
||||
power "reset";
|
||||
boot_to_login_screen;
|
||||
console_login(user=>"root", password=>get_var("ROOT_PASSWORD"));
|
||||
}
|
||||
|
||||
sub start_with_launcher {
|
||||
|
@ -44,10 +44,6 @@ sub run {
|
||||
assert_and_click "zezere_provision_schedule";
|
||||
# exit
|
||||
quit_firefox;
|
||||
# we don't get back to a prompt instantly and keystrokes while X
|
||||
# is still shutting down are swallowed, so be careful
|
||||
assert_screen "root_console";
|
||||
wait_still_screen 5;
|
||||
# time before the provision request goes through is kinda hard to
|
||||
# predict, so we'll just try over and over for up to 10 minutes
|
||||
# and bail as soon as it works
|
||||
|
@ -37,11 +37,6 @@ sub run {
|
||||
wait_still_screen 3;
|
||||
# close browser, back to console
|
||||
quit_firefox;
|
||||
# we don't get back to a prompt instantly and keystrokes while X
|
||||
# is still shutting down are swallowed, so be careful before
|
||||
# finishing (and handing off to freeipa_client_postinstall)
|
||||
assert_screen "root_console";
|
||||
wait_still_screen 5;
|
||||
# check we can kinit with changed password
|
||||
assert_script_run 'printf "loremipsum" | kinit test3';
|
||||
# change password via CLI (back to batterystaple, as that's what
|
||||
|
@ -45,11 +45,6 @@ sub run {
|
||||
assert_and_click "freeipa_webui_policy_save";
|
||||
# quit browser to return to console
|
||||
quit_firefox;
|
||||
# we don't get back to a prompt instantly and keystrokes while X
|
||||
# is still shutting down are swallowed, so be careful before
|
||||
# finishing (and handing off to next test)
|
||||
assert_screen "root_console";
|
||||
wait_still_screen 5;
|
||||
# set permanent passwords for both accounts
|
||||
assert_script_run 'printf "correcthorse\nbatterystaple\nbatterystaple" | kinit test3@TEST.OPENQA.FEDORAPROJECT.ORG';
|
||||
assert_script_run 'printf "correcthorse\nbatterystaple\nbatterystaple" | kinit test4@TEST.OPENQA.FEDORAPROJECT.ORG';
|
||||
|
@ -64,11 +64,6 @@ sub run {
|
||||
assert_screen "cockpit_join_complete", 300;
|
||||
# quit browser to return to console
|
||||
quit_firefox;
|
||||
# we don't get back to a prompt instantly and keystrokes while X
|
||||
# is still shutting down are swallowed, so be careful before
|
||||
# finishing (and handing off to next test)
|
||||
assert_screen "root_console";
|
||||
wait_still_screen 5;
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -32,7 +32,6 @@ sub run {
|
||||
|
||||
# Quit Cockpit
|
||||
quit_firefox;
|
||||
sleep 3;
|
||||
|
||||
# Check that the dnf-automatic service has started
|
||||
assert_script_run "systemctl is-active dnf-automatic-install.timer";
|
||||
|
@ -14,11 +14,6 @@ sub run {
|
||||
start_cockpit(0);
|
||||
# quit firefox (return to console)
|
||||
quit_firefox;
|
||||
# we don't get back to a prompt instantly and keystrokes while X
|
||||
# is still shutting down are swallowed, so be careful before
|
||||
# finishing (and handing off to next test)
|
||||
assert_screen "root_console";
|
||||
wait_still_screen 5;
|
||||
}
|
||||
|
||||
sub test_flags {
|
||||
|
@ -48,7 +48,6 @@ sub run {
|
||||
last if (check_screen("cockpit_updates_updated"));
|
||||
if (check_screen("cockpit_updates_reconnect", 1)) {
|
||||
quit_firefox;
|
||||
sleep 5;
|
||||
start_cockpit(1);
|
||||
select_cockpit_update();
|
||||
last;
|
||||
@ -70,10 +69,6 @@ sub run {
|
||||
# Switch off Cockpit
|
||||
quit_firefox;
|
||||
|
||||
# Wait a couple of seconds for the terminal to settle down, the command was
|
||||
# entered incorrectly which resulted in a failure.
|
||||
sleep 5;
|
||||
|
||||
# Verify that the test package was updated correctly.
|
||||
verify_updated_packages;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user