Project

General

Profile

action #33097

[functional][medium] tty login needles are matched prematurely, username typing gets lost (was: needle for "password-prompt" is incorrect, shows login-prompt instead)

Added by rtsvetkov about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Bugs in existing tests
Start date:
2018-03-12
Due date:
2018-03-27
% Done:

0%

Estimated time:
Difficulty:
Duration: 12

Description

Observation

openQA test in scenario sle-12-SP4-Server-DVD-x86_64-create_hdd_textmode@svirt-hyperv fails in
force_cron_run

Reproducible

Fails since (at least) Build 0152

Expected result

Last good: https://openqa.suse.de/tests/1516878#step/force_cron_run/2

Further details

Always latest result in this scenario: latest


Related issues

Related to openQA Tests - action #33307: [qam]test fails in kernel_kexec assuming tty2 but showing tty1, probably `select_console` keypresses got lostResolved2018-03-15

Has duplicate openQA Tests - action #32890: [sle][functional][sporadic] test fails in consoletest_setup - password typed too soonResolved2018-03-08

Has duplicate openQA Tests - action #32584: [sle][functional] improve consoletest_setup stability (test fails in consoletest_setup - password is typed intead of user)Rejected2018-03-01

History

#2 Updated by okurz about 2 years ago

  • Status changed from New to In Progress
  • Assignee set to okurz

Erroneous needles for password prompt have been deleted. Retriggering -> https://openqa.suse.de/tests/1537018

#3 Updated by okurz about 2 years ago

  • Due date set to 2018-03-27
  • Priority changed from Normal to High
  • Target version set to Milestone 15

#4 Updated by okurz about 2 years ago

https://openqa.suse.de/tests/1537018#step/force_cron_run/3 shows the current problem. The test module starts with the login prompt on tty1, then switches to tty2 but fails to type the username "root". Need to check the logfile in detail.

#5 Updated by okurz about 2 years ago

So apparently in first_boot the system looks for the login prompt on tty1. Why tty1 I don't know. In force_cron_run the first action done is select_console 'root-console' which triggers an assert_screen looking for "tty2-selected" - which would be fine - as well as "text-logged-in-root" - which should also be fine and does not apply here because the console is not logged in - and "text-login" which is most likely a problem because what is visible on screen is "tty1" which is detected over the tag "text-login" but the system did not yet switch to tty2. Then the switch to tty2 is triggered while the username "root" is typed which in consequence is lost. So maybe it is wrong to look for "text-login" and we should not do this. Let's check if I find from git log why we do this…

#6 Updated by okurz about 2 years ago

I guess we are lucky.

commit aa9593ae
Author: Oliver Kurz okurz@suse.de
Date: Thu Jul 21 14:23:19 2016 +0200

added the look for "tty$nr-selected" when in before we were just looking for "text-login" as a generic one.

Of course the needle "text-login-20140219" is used like everywhere, e.g. see https://openqa.suse.de/tests/1536747#step/consoletest_setup/2 where we see it being matched but we also have tty2-selected matching so maybe it is not that dramatic. Even more, for SLE15 it seems the old needle does not even match anymore after a console font change: https://openqa.suse.de/tests/1538565#step/keymap_or_locale/13 so maybe about right to delete the old needles and do it properly with tty$nr-selected needles.

So I deleted the needles:

  • text-login-20140219
  • text-login-20160416
  • text-login-eurlatgr-20180130

and checked with https://openqa.suse.de/admin/needles that at least in each "last match" there is an alternative tty-specific needle match available.

but kept text-login-ipmitool-20170624 which seems to be only used for virtualization tests, e.g. https://openqa.suse.de/tests/1535048#step/reboot_and_wait_up_normal/5 . Seems like these tests just want to be special :)

-> https://gitlab.suse.de/openqa/os-autoinst-needles-sles/merge_requests/759

#7 Updated by okurz about 2 years ago

  • Subject changed from [functional] needle for "password-prompt" is incorrect, shows login-prompt instead to [functional] tty login needles are matched prematurely, username typing gets lost (was: needle for "password-prompt" is incorrect, shows login-prompt instead)

#8 Updated by okurz about 2 years ago

  • Has duplicate action #32890: [sle][functional][sporadic] test fails in consoletest_setup - password typed too soon added

#9 Updated by okurz about 2 years ago

  • Related to action #32584: [sle][functional] improve consoletest_setup stability (test fails in consoletest_setup - password is typed intead of user) added

#10 Updated by okurz about 2 years ago

  • Related to deleted (action #32584: [sle][functional] improve consoletest_setup stability (test fails in consoletest_setup - password is typed intead of user))

#11 Updated by okurz about 2 years ago

  • Has duplicate action #32584: [sle][functional] improve consoletest_setup stability (test fails in consoletest_setup - password is typed intead of user) added

#12 Updated by nicksinger about 2 years ago

  • Subject changed from [functional] tty login needles are matched prematurely, username typing gets lost (was: needle for "password-prompt" is incorrect, shows login-prompt instead) to [functional][medium] tty login needles are matched prematurely, username typing gets lost (was: needle for "password-prompt" is incorrect, shows login-prompt instead)

#13 Updated by okurz about 2 years ago

MR merged. https://openqa.suse.de/tests/1543334 triggered to check

#14 Updated by okurz about 2 years ago

  • Status changed from In Progress to Feedback

https://openqa.suse.de/tests/1543334#step/force_cron_run/1 passed. Let's keep this open to wait if we broke something else.

#15 Updated by okurz about 2 years ago

  • Status changed from Feedback to In Progress

seems I have broken migration tests where tty6 must be matched by tty2 is expected by needles -> https://openqa.suse.de/tests/1545352#step/patch_before_migration/2 I created a new needle "tty2-selected-tty6_fallback_for_migration-poo33097-20180315" as workaround. Triggered test as https://openqa.suse.de/tests/1546883#live to check

Also, qam tests broken, e.g. https://openqa.suse.de/tests/1544823#step/consoletest_setup/40 , created new needle, triggered https://openqa.suse.de/tests/1546884#live to check. Also restarted others

#16 Updated by okurz about 2 years ago

  • Related to action #33307: [qam]test fails in kernel_kexec assuming tty2 but showing tty1, probably `select_console` keypresses got lost added

#17 Updated by okurz about 2 years ago

I was monitoring about 100 jobs today, all QAM jobs failing in consoletest_setup, keymap_or_locale as well as kernel_kexec which was also failing as a consequence of me removing a needle which I worked around with a corresponding needle. The proper fix would need to go into #33307 . https://openqa.suse.de/tests/1546885 is one example of a fixed job. I am still waiting for about 15 jobs to execute (waiting scheduled for about 12h now) which should finish over night.

#18 Updated by qmsu about 2 years ago

okurz wrote:

seems I have broken migration tests where tty6 must be matched by tty2 is expected by needles -> https://openqa.suse.de/tests/1545352#step/patch_before_migration/2 I created a new needle "tty2-selected-tty6_fallback_for_migration-poo33097-20180315" as workaround. Triggered test as https://openqa.suse.de/tests/1546883#live to check

Also, qam tests broken, e.g. https://openqa.suse.de/tests/1544823#step/consoletest_setup/40 , created new needle, triggered https://openqa.suse.de/tests/1546884#live to check. Also restarted others

It works for migration tests now, thanks for your help.

#19 Updated by okurz about 2 years ago

  • Status changed from In Progress to Resolved

All jobs I had still open are fine now as well.

Also available in: Atom PDF