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 49 forks source link

suspend-time-check failed due to incorrect dependency behavior #1547

Open diohe0311 opened 4 weeks ago

diohe0311 commented 4 weeks ago

Bug Description

@fernando79513 and I noticed that some of the machines in linux-generic 6.8 and linux-generic-hwe-20.04 pool failed at suspend-time-check without any log.

It seems that a recent PR modified the dependency of some tests.

Before:

graphics/1_auto_switch_card_{product}  -> was skipped
suspend/1_suspend_after_switch_to_card_{product} -> was run (despite not having switched the card) and outputs "1_suspend_single_times.log"
suspend/1_suspend-time-check_{product}_auto -> could read "1_suspend_single_times.log"

Now:

graphics/1_auto_switch_card_{product}  -> was skipped
suspend/1_suspend_after_switch_to_card_{product} -> Is not run 
suspend/1_suspend-time-check_{product}_auto -> can't read "1_suspend_single_times.log"

The first issue is that suspend/1_suspend-time-check_{product}_auto does not output any debug msgs when it fails to find the log file, which makes troubleshooting difficult.

plugin: shell
category_id: com.canonical.plainbox::suspend
id: suspend/suspend-time-check
depends: suspend/suspend_advanced_auto
estimated_duration: 1.2
command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_single_times.log ] && sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/suspend_single_times.log

The second issue seems to be with incorrect dependency configuration between the tests. Initially, the tests were ordered as: C after B after A Now, they are: C after B depends A

To maintain the correct order, B should use depends instead of after.

To Reproduce

Run job: http://10.102.156.15:8080/job/cert-stock-sru-noble-desktop-eliteone-800-g6-24-sku4-28166/

Environment

Relevant log output

No log

syncronize-issues-to-jira[bot] commented 4 weeks ago

Thank you for reporting us your feedback!

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

This message was autogenerated

pieqq commented 2 weeks ago

@diohe0311 Thanks for the bug report and the investigation! @fernando79513 could you help providing a fix for this?