canonical / checkbox

Checkbox is a testing framework used to validate device compatibility with Ubuntu Linux. It’s the testing tool developed for the purposes of the Ubuntu Certification program.
https://checkbox.readthedocs.io
GNU General Public License v3.0
33 stars 50 forks source link

On very slow devices, `snap_update_test.py` times out before the snap commands finish #1543

Open pieqq opened 1 month ago

pieqq commented 1 month ago

Bug Description

By default, this script times out after 5 minutes (300 seconds). This is apparently not long enough on very slow devices, like this one we have in the lab. The refresh kernel test is marked as passed, but in fact it has timed out. As a result, the file that's expected by the following test (snapd/snap-verify-after-refresh-...-kernel-to-base-rev) is not present, and this test fails.

When looking at the logs, we can see that after 5 minutes, the project-kernel snap is only 8.7% downloaded, and the script times out, issuing a reboot command (see full command).

$ cat snap-refresh-kernel-project-kernel-to-base-rev.log
Refreshing snap project-kernel from revision 203 to 155
(info) (Doing) Monitoring snap "project-kernel" to determine whether extra refresh steps are required
(info) (Doing) Download snap "project-kernel" (155) from channel "20/stable"
(info) (Doing) Monitoring snap "project-kernel" to determine whether extra refresh steps are required
(info) (Doing) Download snap "project-kernel" (155) from channel "20/stable" (0.2%)
(...)
(info) (Doing) Download snap "project-kernel" (155) from channel "20/stable" (8.7%)
(info) (Doing) Monitoring snap "project-kernel" to determine whether extra refresh steps are required

For the following jobs:

several things to fix:

  1. Make sure the script fails if timeout is reached
  2. Increase default timeout to something compatible with slower devices
  3. (optional) Show time in the logs, to have a better idea of the time needed when debugging

To Reproduce

  1. Run the snap update tests on a very slow device

Environment

Relevant log output

No response

Additional context

No response

syncronize-issues-to-jira[bot] commented 1 month ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CHECKBOX-1613.

This message was autogenerated