Try and get more detailed Firefox logs from startx

When we run Firefox directly on X lately, we often hit a bug
where X just suddenly exits in the middle of doing stuff in
Firefox. I'm not sure if this is a bug in X or in Firefox (if
Firefox crashed, X would immediately exit). Let's see if this
helps get any info on what's going on with Firefox.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2022-09-09 13:08:47 -07:00
parent 9fd78aa99b
commit f424e5bac5
3 changed files with 7 additions and 0 deletions

View File

@ -19,6 +19,7 @@ sub start_cockpit {
# 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";
disable_firefox_studies;
assert_script_run "export MOZ_LOG_FILE=/tmp/firefox.log";
# 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", 60;

View File

@ -42,6 +42,7 @@ 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";
disable_firefox_studies;
assert_script_run "export MOZ_LOG_FILE=/tmp/firefox.log";
type_string "startx /usr/bin/firefox -width 1024 -height 768 https://ipa001.test.openqa.fedoraproject.org\n";
assert_screen ["freeipa_webui_login", $user_screen], 60;
wait_still_screen(stilltime => 5, similarity_level => 45);

View File

@ -120,6 +120,11 @@ sub post_fail_hook {
upload_logs "/var/lib/pgsql/initdb_postgresql.log";
}
# update Firefox default log (for startx firefox tests)
unless (script_run 'test -f /tmp/firefox.log') {
upload_logs "/tmp/firefox.log";
}
# Upload /var/log
# lastlog can mess up tar sometimes and it's not much use
unless (script_run "tar czvf /tmp/var_log.tar.gz --exclude='lastlog' /var/log") {