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

Reorganize calls for assert_screen to avoid time waste #8757

Merged
merged 3 commits into from
Oct 28, 2019

Conversation

foursixnine
Copy link
Member

@foursixnine foursixnine commented Oct 23, 2019

@foursixnine foursixnine marked this pull request as ready for review October 23, 2019 10:08
my $timeout = check_var('VIRSH_VMM_FAMILY', 'hyperv') ? 600 : 200;
assert_screen([qw(yast2_bootloader-missing_package yast2_console-finished)], $timeout);
my $timeout = (is_aarch64 || is_hyperv)? 600 : 200;
check_screen([qw(yast2_bootloader-missing_package yast2_console-finished)], $timeout);
Copy link
Member Author

Choose a reason for hiding this comment

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

Note, I'm not checking the tag for yast2_console-finished, because the waitserial will in the end, take care of it too.

Copy link
Member

Choose a reason for hiding this comment

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

Please do not do this. This will be an annoying time-waste and an annoying red border in case of mismatch. Why not simply create a needle for any accepted situation? We also have soft-fail needles that could e.g. cover any "artifacts" if this is the problem

Copy link
Member Author

Choose a reason for hiding this comment

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

@okurz the needle is there, what I could do, is to explicitly return in case yast2_console-finished tag is matched. However again, if it fails, the wait_serial afterwards would take care of it. What would you prefer? :) I'm open to suggestions here

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I know the "assert_screen+wait_serial" combination is a bit tricky here. First, what you are working on looks related to https://progress.opensuse.org/issues/56651 , please discuss with @asdil12 as well. Second, what I see in https://openqa.suse.de/tests/3506803#step/yast2_bootloader/6 is an ugly screen but functionally correct so a needle "yast2_console-finished" should simply cover this and no changes to the test code should be necessary. If you consider this a non-acceptable product behaviour open a bug and create a soft-fail needle referencing the bug but functionally the behaviour stays the same.

Copy link
Member Author

@foursixnine foursixnine Oct 23, 2019

Choose a reason for hiding this comment

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

@okurz indeed there's poo#56651 (I'm just noticing it now, so thanks for catching it up), but what I'm working on, is removing the ugly assert_screen + assert_screen + wait_serial. Although I started by increasing the timeout for aarch64. As for a bug: https://bugzilla.suse.com/show_bug.cgi?id=1154300 ;).

Copy link
Member Author

Choose a reason for hiding this comment

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

Thinking again, actually we'd want to check the screen again, if the missing_package tag was found.

Copy link
Member

Choose a reason for hiding this comment

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

I see. But can we not simply move L41 into the if and keep the assert_screen in place? E.g.:

assert_screen([qw(yast2_bootloader-missing_package yast2_console-finished)], $timeout);
if (match_has_tag('yast2_bootloader-missing_package')) {
    send_key 'alt-i';
    assert_screen 'yast2_console-finished', $timeout;
}

so keep the assert_screen, replace the wait_screen_change by the assert_screen which is only called when necessary

Copy link
Member Author

Choose a reason for hiding this comment

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

Sold! :)

@foursixnine foursixnine changed the title Check screen instead of asserting to avoid unwanted failures Reorganize calls for assert_screen to avoid time waste Oct 24, 2019
@foursixnine
Copy link
Member Author

@okurz can you check again? :)

@asdil12 asdil12 merged commit fcf19c5 into os-autoinst:master Oct 28, 2019
@okurz
Copy link
Member

okurz commented Oct 30, 2019

coming back to this after vacation: LGTM :)

@foursixnine foursixnine deleted the oopsitsbrokenagain branch October 30, 2019 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants