Project

General

Profile

Actions

action #156439

open

Firefox privacy popup causing apache2_changehat to fail

Added by livdywan 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-03-01
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

Observation

The test module
apache2_changehat occasionally fails because a popup bar comes up between the mouse moving to the needle and the click of the button, which is no longer in the same place. The x11test base class has Firefox-specific abstractions which cover this, however this test is currently a consoletest.

Context: This came up in the open conversation in the QE Tools workshop, discussing recurring test issues that come up as flaky.

Suggestions

  • Base the test on x11test
  • Replace duplicated logic to setup Firefox

Reproducible

Fails since (at least) Build 20240226 (current job)

Expected result

Last good: 20240225 (or more recent)

Further details

Always latest result in this scenario: latest


Related issues 1 (1 open0 closed)

Copied to openQA Tests - action #160337: Firefox privacy popup causing apache2_changehat to fail - Evaluate how changehat is being testedWorkable2024-03-01

Actions
Actions #1

Updated by okurz 2 months ago

  • Category set to Feature requests
  • Priority changed from Normal to Low
  • Target version set to future

I'm not sure putting all that in a single backend call would significantly reduce the time needed here. Is this issue reproducible?

Actions #2

Updated by livdywan 2 months ago

okurz wrote in #note-1:

I'm not sure putting all that in a single backend call would significantly reduce the time needed here. Is this issue reproducible?

Yes it is. The test regularly fails after 30 minutes or an hour. Running it again usually fixes it because the bar comes up at different points in time.

Actions #3

Updated by tinita 2 months ago ยท Edited

Just to make sure:
In distri-openQA we are using this function: https://github.com/os-autoinst/os-autoinst-distri-openQA/blob/master/lib/utils.pm#L122

sub prepare_firefox_autoconfig {
    # Enable AutoConfig by pointing to a cfg file
    type_string(q{cat <<EOF > $(rpm --eval %_libdir)/firefox/defaults/pref/autoconfig.js
pref("general.config.filename", "firefox.cfg");
...

to prevent firefox from opening such popups.

(There also a function in distri-opensuse lib/x11test)
Is the test in question also using something like that?

Trying to reduce the delay can help with making the issue appear less often, but a race condition will always be there.

Actions #4

Updated by okurz 2 months ago

@livdywan please make sure to add a "link to latest"

Actions #5

Updated by tinita 2 months ago

  • Description updated (diff)
Actions #6

Updated by livdywan 2 months ago

tinita wrote in #note-3:

(There also a function in distri-opensuse lib/x11test)
Is the test in question also using something like that?

I guess this is not being used:

https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/387a02410f875794b0ef809e01a6583cae311dd2/lib/apparmortest.pm#L540

I prepared a proof of concept using existing Firefox abstractions:

https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/18788/files

However this was not tested and I think this should be checked by relevant test maintainers.

Actions #7

Updated by livdywan 2 months ago

  • Project changed from openQA Project to openQA Tests
  • Subject changed from Race condition in backend implementation of assert_and_click to Firefox privacy popup causing apache2_changehat to fail
  • Category deleted (Feature requests)
  • Target version deleted (future)

Assuming a generic solution is not feasible I'm also retroactively making this a specific test issue.

Actions #8

Updated by livdywan 2 months ago

  • Description updated (diff)
Actions #10

Updated by szarate about 17 hours ago

  • Copied to action #160337: Firefox privacy popup causing apache2_changehat to fail - Evaluate how changehat is being tested added
Actions

Also available in: Atom PDF