redo console_login with multiple matches, move to main_common
ClosedPublic

Authored by adamwill on Sep 28 2016, 11:16 PM.

Details

Summary

Since we can match on multiple needles, we can drop the loop
from console_login and instead do it this way, which is simpler
and should work better on ARM (the timeouts will scale and
allow ARM to be slow here). Also move it to main_common as
there's no logical reason for it to be a class method.

Also remove the check arg. check was only set to 0 by two
tests, _console_shutdown and anacondatest's _post_fail_hook.

For _console_shutdown, I think I just wanted to give it the
best possible chance of succeeding. But we're really not going
to lose anything significant by checking, the only case where
check=>0 would've helped is if the 'good' needle had stopped
matching, and all sorts of other tests will fail in that case.

anacondatest was only using it to save a screenshot of whatever
was on the tty if it didn't reach a root console, which doesn't
seem that useful, and we'll get screenshots from check_screen
and assert_screen anyway.

Test Plan

Run all tests, check they behave as expected and
none inappropriately fails on console login.

Diff Detail

Repository
rOPENQATESTS os-autoinst-distri-fedora
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to redo console_login with multiple matches, move to main_common.Sep 28 2016, 11:16 PM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
adamwill updated this revision to Diff 2601.Sep 29 2016, 1:32 AM

lengthen match times, add missing uses

garretraziel accepted this revision.Sep 30 2016, 11:17 AM
This revision is now accepted and ready to land.Sep 30 2016, 11:17 AM
This revision was automatically updated to reflect the committed changes.