From ad99c3fc230256e35d07537e105e088e375ae26a Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 24 Aug 2018 15:05:50 -0700 Subject: [PATCH] Handle Xorg starting unusually slowly, but soft fail (#1622254) There seems to be a bug in Rawhide lately where, when our tests want to install a bare X and run Firefox on it, this takes an unusually long time to start up, with SELinux in enforcing mode. With SELinux in permissive mode it starts as fast as usual. This isn't a hard failure and we don't want it to block all later tests, so let's handle it and treat it as a soft fail. Signed-off-by: Adam Williamson --- lib/freeipa.pm | 7 +++++-- lib/utils.pm | 7 ++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/freeipa.pm b/lib/freeipa.pm index 70e6a175..7c7f9f10 100644 --- a/lib/freeipa.pm +++ b/lib/freeipa.pm @@ -42,14 +42,17 @@ sub start_webui { # https://bugzilla.redhat.com/show_bug.cgi?id=1439429 assert_script_run "sed -i -e 's,enable_xauth=1,enable_xauth=0,g' /usr/bin/startx"; type_string "startx /usr/bin/firefox -width 1024 -height 768 https://ipa001.domain.local\n"; + unless (check_screen ["freeipa_webui_login", $user_screen], 30) { + record_soft_failure "X starting slowly! Maybe RHBZ#1622254"; + assert_screen ["freeipa_webui_login", $user_screen], 30; + } wait_still_screen 5; # softfail on kerberos ticket bugs meaning we get auto-logged in # as the requested user when we don't expect to be - if (check_screen $user_screen, 5) { + if (match_has_tag $user_screen) { record_soft_failure "already logged in to web UI"; } else { - assert_screen "freeipa_webui_login", 5; type_safely $user; wait_screen_change { send_key "tab"; }; type_safely $password; diff --git a/lib/utils.pm b/lib/utils.pm index 2757fae3..47a710c2 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -348,7 +348,12 @@ sub start_cockpit { assert_script_run "sed -i -e 's,enable_xauth=1,enable_xauth=0,g' /usr/bin/startx"; # run firefox directly in X as root. never do this, kids! type_string "startx /usr/bin/firefox -width 1024 -height 768 http://localhost:9090\n"; - assert_screen "cockpit_login"; + # As of 2018-08-24, X is starting slow in Rawhide, seemingly due + # to an SELinux denial...handle this, but softfail + unless (check_screen "cockpit_login", 30) { + record_soft_failure "X starting slowly! Maybe RHBZ#1622254"; + assert_screen "cockpit_login", 30; + } # this happened on early Modular Server composes... record_soft_failure "Unbranded Cockpit" if (match_has_tag "cockpit_login_unbranded"); wait_still_screen 5;