Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check power mode before and after suspend (New) #1145

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

binli
Copy link
Contributor

@binli binli commented Apr 3, 2024

Description

With Platform Profile (low-power, balanced, performance) support being added to the kernel and GNOME we'd like this to be tested to confirm it is working during HW enablement/certification.
It is expected functionality on these platforms and we need to highlight any issues with it not working to the FW team so it can be fixed before preload signoff.

Resolved issues

Original bug: https://bugs.launchpad.net/sutton/+bug/2036435

Documentation

This testcase could help verify power mode can stay in the chosen setting after suspend.

Tests

==============[ Running job 8 / 8. Estimated time left: 0:00:01 ]===============
----------------------[ suspend/power_mode_after_suspend ]----------------------                                                        ID: com.canonical.certification::suspend/power_mode_after_suspend
Category: com.canonical.plainbox::suspend                                                                                               
... 8< -------------------------------------------------------------------------
1c1                                                                 
< performance                                                       
---                                                                 
> low-power                                                         
------------------------------------------------------------------------- >8 ---
Outcome: job failed                                                                                                                     
Finalizing session that hasn't been submitted anywhere: checkbox-run-2024-04-03T16.03.02
==================================[ Results ]===================================           
 ☑ : Collect information about kernel modules                                                                                            ☑ : Discover if the system supports power modes via acpi
 ☑ : Collect information about installed software packages                                                                              
 ☑ : Dumps power_mode info to a file for comparison after suspend
 ☑ : Create resource info for supported sleep states
 ☑ : Creates resource info for RTC                                  
 ☑ : Automated test of suspend function 
 ☒ : suspend/power_mode_after_suspend

@binli binli changed the title Power mode before after suspend (New) Check power mode before and after suspend (New) Apr 3, 2024
@binli binli requested a review from a team April 3, 2024 16:12
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.04%. Comparing base (76939c4) to head (2cb1442).
Report is 1 commits behind head on main.

Current head 2cb1442 differs from pull request most recent head ebf8361

Please upload reports for the commit ebf8361 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1145      +/-   ##
==========================================
- Coverage   44.10%   43.04%   -1.06%     
==========================================
  Files         358      355       -3     
  Lines       38765    38572     -193     
  Branches     6571     6549      -22     
==========================================
- Hits        17096    16604     -492     
- Misses      21006    21302     +296     
- Partials      663      666       +3     
Flag Coverage Δ
provider-base 15.98% <100.00%> (-2.59%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suspend story is sadly still to be defined, so this doesn't do what you think it will do. Please consider using one job that has an also-after-suspend flag and:

  1. if the power mode file doesn't exist, it creates it
  2. if the power mode file exists, it diffs it

This doesn't 100% work (as re-runs are a thing), but is more correct than what this PR would yield

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works but it doesn't do what you think it will. The issue here is that while the after_suspend job runs after suspend (due to the dependency), the before suspend may itself run after suspend, making the job pointless. Recently we have made this change #1037, so you can use the also-after-suspend flag to get the result you want (I see that this is a specific suspend job, so idk if it is the same for you as the normal suspend job).

@binli binli force-pushed the power-mode-before-after-suspend branch from 2cb1442 to ebf8361 Compare June 7, 2024 10:17
@fernando79513 fernando79513 added the waiting-for-changes The review has been completed but the PR is waiting for changes from the author label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-changes The review has been completed but the PR is waiting for changes from the author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants