From b3e5dd41cb13904a45b69e385ab16dd5cbb93476 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 16 Feb 2024 12:50:05 -0800 Subject: [PATCH] desktop_update_graphical: try to workaround GGO #2442 In current F40 and Rawhide, this test is frequently failing because gnome-software is behaving weirdly at startup - the third-party software dialog moves around even more than before, the app seems to get stuck in the "not responding" state briefly sometimes, and there's a very weird state it gets into sometimes where the window is shorter than usual and clicks don't seem to register in the right place. While I'm trying to bisect these bugs, these magic voodoo incantations (tested on the staging instance) seem to mostly work around the weird behaviour, and setting RETRY=2 should backstop it a bit further. Signed-off-by: Adam Williamson --- templates.fif.json | 3 ++- tests/desktop_update_graphical.pm | 26 +++++++++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/templates.fif.json b/templates.fif.json index 1166200e..91ce9dd7 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -1310,7 +1310,8 @@ "BOOTFROM": "c", "HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2", "POSTINSTALL": "desktop_update_graphical", - "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%" + "START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%", + "RETRY": 2 } }, "install_addrepo_metalink_graphical": { diff --git a/tests/desktop_update_graphical.pm b/tests/desktop_update_graphical.pm index 220df197..ab7b52de 100644 --- a/tests/desktop_update_graphical.pm +++ b/tests/desktop_update_graphical.pm @@ -41,9 +41,16 @@ sub run { # GNOME Software 44+ has a 3rd party source pop-up, get rid of it # if it shows up (but don't fail if it doesn't, we're not testing that) if ($desktop eq 'gnome' && check_screen 'gnome_software_ignore', 10) { - wait_still_screen 3; - # match again as the dialog may have moved a bit - assert_and_click 'gnome_software_ignore'; + # keep clicking till we hit it, it tends to wobble around, + # especially with GNOME 46 - part of + # https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2442 + click_lastmatch; + my $count = 20; + while (check_screen 'gnome_software_ignore', 3) { + die "couldn't get rid of ignore screen!" if ($count == 0); + $count -= 1; + click_lastmatch; + } } # go to the 'update' interface. We may be waiting some time at a # 'Software catalog is being loaded' screen. @@ -52,8 +59,17 @@ sub run { mouse_set 10, 10; mouse_hide; } - # wait out a possible animation - wait_still_screen 5; + if ($desktop eq 'gnome') { + # wait for it to settle, it seems to take a long time and sometimes + # go into 'app is not responding' mode - part of + # https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2442 + wait_still_screen 10; + # try to click in a 'neutral' area of the UI to get rid of the + # weird 'short window' state - another part of + # https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2442 + mouse_set 36, 128; + mouse_click; + } assert_and_click 'desktop_package_tool_update'; # wait for things to settle if e.g. GNOME is refreshing wait_still_screen 5, 90;