From 3d84e2a8c20788a27794a4250433d34f8861ff6f Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 13 Oct 2016 18:39:33 -0700 Subject: [PATCH] type root password faster on ostree installs Summary: Since we started using `type_very_safely` for typing the root password, we starting hitting a race issue. If we complete the root password spoke so slowly that the software deployment process completes in the meantime, anaconda will wait until we complete the spoke then immediately flip to the 'post-install configuration' step, at which point access to the USER CREATION spoke is blocked. We don't hit this case on regular RPM installs or live installs as the deployment phase still takes a while for both of those, but we are sometimes hitting it for the Atomic ostree install image, as the software deployment phase is pretty fast there. We *could* just not bother creating a user and testing we can log in as a user for that test, but I don't like that approach, we *should* be testing that user creation and login works OK for ostree installs. So instead, let's just type the root password a bit less safely for ostree installs; this will be more vulnerable to typing errors but hopefully will avoid the race problem. Test Plan: Run a few Atomic installs, see if they hit the race. Might need to run other tests at the same time, and you may not be able to hit it, this is obviously dependent on the I/O of the worker host... Reviewers: jskladan, garretraziel Reviewed By: garretraziel Subscribers: tflink Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1022 --- tests/_do_install_and_reboot.pm | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/_do_install_and_reboot.pm b/tests/_do_install_and_reboot.pm index de280211..fa6858c1 100644 --- a/tests/_do_install_and_reboot.pm +++ b/tests/_do_install_and_reboot.pm @@ -38,12 +38,22 @@ sub run { # wait out animation wait_still_screen 2; $self->switch_layout("us") if (get_var("SWITCHED_LAYOUT")); - # these screens seems insanely subject to typing errors, so let's - # type super safely. Note this doesn't really slow the test down - # as we still get done before the install process is complete. - type_very_safely $root_password; - wait_screen_change { send_key "tab"; }; - type_very_safely $root_password; + if (get_var("IMAGETYPE") eq 'dvd-ostree') { + # we can't type SUPER safely for ostree installer tests, as + # the install completes quite fast and if we type too slow + # the USER CREATION spoke may be blocked + type_safely $root_password; + wait_screen_change { send_key "tab"; }; + type_safely $root_password; + } + else { + # these screens seems insanely subject to typing errors, so + # type super safely. This doesn't really slow the test down + # as we still get done before the install process is complete. + type_very_safely $root_password; + wait_screen_change { send_key "tab"; }; + type_very_safely $root_password; + } assert_and_click "anaconda_spoke_done"; # Set user details