Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

journal_check: make sure to select a console to avoid incompletes #11439

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

ggardet
Copy link
Collaborator

@ggardet ggardet commented Nov 19, 2020

@ggardet ggardet requested a review from okurz November 19, 2020 12:39
Copy link
Member

@okurz okurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, can't say if this is good or not as I don't know in what scope this is normally called. Maybe the "log-console" is used or both sometimes?

@thehejik @jlausuch @mloviska

@ggardet
Copy link
Collaborator Author

ggardet commented Nov 19, 2020

Currently, journal_check relies on the console used by previous test, which is the root console.

@jlausuch
Copy link
Contributor

Looks good, but I would appreciate 2 things:

  1. Commit message with some more explanation than the title
  2. A link to a failed test case and then a VR with CASEDIR which proves the PR works

@ggardet
Copy link
Collaborator Author

ggardet commented Nov 19, 2020

  1. Commit message with some more explanation than the title

Not sure what additional info you would expect.

  1. A link to a failed test case and then a VR with CASEDIR which proves the PR works

Failed test cases are linked in the poo# ticket, but I can add one here. VR are not easy to get as the problem is sporadic.

@Vogtinator
Copy link
Member

This is what happens:

  1. A test module selects the serial terminal
  2. A snapshot is made
  3. A module selects a tty console
  4. A failure causes a rollback to 2. Now the serial terminal is selected again
  5. journal_check calls script_output, which for some reason thinks the tty console is selected (testapi::is_serial_terminal is true)
[2020-11-16T17:50:05.719 CET] [debug] ||| starting journal_check tests/microos/journal_check.pm
[2020-11-16T17:50:05.736 CET] [debug] tests/microos/journal_check.pm:47 called testapi::script_output
[2020-11-16T17:50:05.736 CET] [debug] <<< testapi::type_string(string="cat - > /tmp/scriptWgMmR.sh;\n", max_interval=250, wait_screen_changes=0, wait_still_screen=0, timeout=30, similarity_level=47)
[2020-11-16T17:50:05.737 CET] [debug] <<< consoles::serial_screen::type_string(text="cat - > /tmp/scriptWgMmR.sh;\n", cmd="backend_type_string", max_interval=250, json_cmd_token="AlpatTIZ")
[2020-11-16T17:50:05.738 CET] [debug] tests/microos/journal_check.pm:47 called testapi::script_output
[2020-11-16T17:50:05.738 CET] [debug] <<< testapi::type_string(string="journalctl --no-pager -p err -o short-precise | tail -n +2\n", max_interval=250, wait_screen_changes=0, wait_still_screen=0, timeout=30, similarity_level=47)
[2020-11-16T17:50:05.739 CET] [debug] <<< consoles::serial_screen::type_string(json_cmd_token="ADrMQnmm", max_interval=250, text="journalctl --no-pager -p err -o short-precise | tail -n +2\n", cmd="backend_type_string")
[2020-11-16T17:50:05.739 CET] [debug] tests/microos/journal_check.pm:47 called testapi::script_output
[2020-11-16T17:50:05.739 CET] [debug] <<< testapi::send_key(key="ctrl-d", do_wait=0, wait_screen_change=0)

Copy link
Member

@Vogtinator Vogtinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but an updated VR would be nice

@ggardet
Copy link
Collaborator Author

ggardet commented Nov 20, 2020

VR passed (failed but as expected), but CI did not start yet...

@foursixnine foursixnine merged commit 3e3eb9c into os-autoinst:master Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants