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

Give more time to match needles on exit_firefox #15381

Merged

Conversation

michaelgrifalconi
Copy link
Contributor

@michaelgrifalconi michaelgrifalconi commented Aug 19, 2022

Give more time to match needles on exit_firefox, to avoid sending too many alt-f4 and then failing because we can't find the open terminal

@github-actions
Copy link

Great PR! Please pay attention to the following items before merging:

Files matching lib/**.pm:

  • Consider adding or extending unit tests in t/

This is an automatically generated QA checklist based on modified files

lib/x11test.pm Outdated
Comment on lines 719 to 720
wait_still_screen 1, 2;
send_key_until_needlematch([qw(firefox-save-and-quit xterm-left-open xterm-without-focus)], "alt-f4", 3, 30);
send_key_until_needlematch([qw(firefox-save-and-quit xterm-left-open xterm-without-focus)], "alt-f4", 6, 30);
Copy link
Contributor

Choose a reason for hiding this comment

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

@michaelgrifalconi
Seems a timing or performance issue here, I am wondering if we can add some timeout here
wait_still_screen 1, 2;

BTW, I would suggest do more VRs on other SLE versions which hit the same issue as well :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello, started more validation runs.

I don't think a wait_still_screen at the beginning can help much, the issue is between multiple runs of send_key_until_needlematch.
It will send a alt-f4 key initially, wait for it to close firefox and if firefox is not fast enough to close, send another alt-f4 and then both firefox and xterm close and it fails. Increasing the time between sending these alt-f4 keys is the only relevant factor IMHO

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, the reason why I add the comments is that, I try to do some manual tests on my local setup.
ctrl-q key can close the firfox page, then I don't need to send alt-f4 to force closing it.

Anyway, I agree with you, your changes make more sense!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right! the ctrl-q is the one supposed to close it, I missed that sorry! Maybe giving more time could help! I will try to increase it as well.

@michaelgrifalconi michaelgrifalconi changed the title Give more time to match needles on exit_firefox [WIP] Give more time to match needles on exit_firefox Aug 19, 2022
@michaelgrifalconi
Copy link
Contributor Author

Issue is still happening in some tries, looking more into it

@michaelgrifalconi
Copy link
Contributor Author

Tried some statistical investigation with the fix, since the issue is sporadic: https://openqa.suse.de/tests/overview?build=mgrifalconi-firefoxdev

Does not look too bad.

@michaelgrifalconi michaelgrifalconi changed the title [WIP] Give more time to match needles on exit_firefox Give more time to match needles on exit_firefox Aug 19, 2022
Copy link
Contributor

@rfan1 rfan1 left a comment

Choose a reason for hiding this comment

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

LGTM

@michaelgrifalconi michaelgrifalconi merged commit 880b419 into os-autoinst:master Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants