From d9b7d203de4ede009c98aac19d20dc1f86c4fdc5 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 4 Apr 2024 18:13:03 -0700 Subject: [PATCH] Apply some debugging hacks for the periodic failure bug This is all in aid of trying to figure out what's going on in https://pagure.io/fedora-qa/os-autoinst-distri-fedora/pull-request/312#comment-199540 - sometimes the upgrade process just does not work, it seems like the prepared update file gets wiped for some reason. This is all trying to figure out exactly when that happens and whether it's because we're running out of disk space. Signed-off-by: Adam Williamson --- lib/installedtest.pm | 11 +++++++++++ tests/graphical_upgrade_prerequisites.pm | 3 +++ tests/graphical_upgrade_run.pm | 6 ++++++ 3 files changed, 20 insertions(+) diff --git a/lib/installedtest.pm b/lib/installedtest.pm index 1b7b2200..67cf8c7a 100644 --- a/lib/installedtest.pm +++ b/lib/installedtest.pm @@ -168,6 +168,17 @@ sub post_fail_hook { } } + # TEST TEST FOR DEBUGGING ONLY + if (get_var("GUI_UPGRADE")) { + script_run "df -h"; + script_run "ls -l /var/lib/PackageKit"; + script_run "ls -l /var/lib/PackageKit/prepared-upgrade"; + $self->root_console(tty => 4); + send_key "ctrl-c"; + upload_logs "/tmp/pk.log", failok => 1; + } + # END DEBUGGING + } 1; diff --git a/tests/graphical_upgrade_prerequisites.pm b/tests/graphical_upgrade_prerequisites.pm index 83204c84..81f3ee54 100644 --- a/tests/graphical_upgrade_prerequisites.pm +++ b/tests/graphical_upgrade_prerequisites.pm @@ -71,6 +71,9 @@ sub run { record_soft_failure "Modular repos present! Upgrade will fail, so removing"; assert_script_run "rm -f /etc/yum.repos.d/*modul*"; } + # TEST TEST FOR DEBUGGING ONLY + assert_script_run 'sed -i -e "s,libexec/packagekitd,libexec/packagekitd --verbose,g" /usr/lib/systemd/system/packagekit.service'; + # END DEBUGGING # Switch to a user account enter_cmd("su -l $user"); # Navigate to the version file directory diff --git a/tests/graphical_upgrade_run.pm b/tests/graphical_upgrade_run.pm index d9fe3110..b27c1491 100644 --- a/tests/graphical_upgrade_run.pm +++ b/tests/graphical_upgrade_run.pm @@ -41,6 +41,12 @@ sub run { } # Let's check, that the desktop is shown. check_desktop(); + # TEST TEST FOR DEBUGGING ONLY + $self->root_console(tty => 4); + type_string "while true; do date -u >> /tmp/pk.log; df -h >> /tmp/pk.log; ls -l /var/lib/PackageKit >> /tmp/pk.log 2>&1; sleep 1; done\n"; + $self->root_console(tty => 3); + desktop_vt; + # END DEBUGGING # Start the package manager application depending # on which DE we are on.