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 <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2018-08-24 15:05:50 -07:00
parent cfe2a33038
commit ad99c3fc23
2 changed files with 11 additions and 3 deletions

View File

@ -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;

View File

@ -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;