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

Fix the wrong output from suspend cycles (Bugfix) #1210

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

seankingyang
Copy link
Contributor

@seankingyang seankingyang commented Apr 26, 2024

Description

The bug numbers of sleep_test_log_check.py summary are wrong.
For the following case, it only run 30 suspend with 3 reboot, and it total suspend number is 90.
But the failures number is much larger than 90.

Critical failures:
  s3: 30 failures
========================================
    Expected /sys/power/suspend_stats/total_hw_sleep to increase from 4234715566, got 4234715566. (x 15)
    CRITICAL Kernel message: [ 1969.104760] PM: Some devices failed to suspend, or early wake event detected (x 15)
High failures:
  s3: 1129 failures
========================================
    Expected /sys/power/suspend_stats/last_hw_sleep to be at least 70% of the last sleep cycle, got 0.14%. (x 29)
  <..skip..>
    Expected /sys/power/suspend_stats/last_hw_sleep to be at least 70% of the last sleep cycle, got 68.83%. (x 10)
## Test the 30 suspend with 3 reboot, so the total suspend number should 90.
./submission_202312-33226_365937 $ grep "Iteration" attachment_files/com.canonical.certification__stress-tests_suspend-30-cycles-with-reboot-3-log-attach| nl 
     1  ================================= Iteration 1 ==================================
     2  ================================= Iteration 1 ==================================
     3  ================================= Iteration 1 ==================================
<...skip...>
  1393  ================================= Iteration 1 ==================================
  1394  ================================= Iteration 1 ==================================
  1395  ================================= Iteration 1 ==================================

## How does the 1395 come?
Coz the log will be append in next time, and this log will only destory when reboot/poweroff.
Each reboot will have the (1+30)*30/2 times of fwts log.
Total:
(1+30)*30/2 * 3 (with 3 reboot)= 1395

The RC of this issue is:
checkbox-support-fwts_test script will default restore the log (/tmp/fwts_results.log), and this log will be append in next time.
Only need to remove the /tmp/fwts_results.log, and this issue will not hanppen.

Resolved issues

Wrong number of fwts bug summary.

Documentation

Tests

https://certification.canonical.com/hardware/202312-33226/submission/366229/

## Test the 10 suspend with 3 reboot, so the total suspend number will be 30.

./submission_202312-33226_366229 $ grep "Iteration" attachment_files/com.canonical.certification__stress-tests_suspend-10-cycles-with-reboot-3-log-attach|nl                                                      
     1  ================================= Iteration 1 ==================================
     2  ================================= Iteration 1 ==================================
     3  ================================= Iteration 1 ==================================
     4  ================================= Iteration 1 ==================================
     5  ================================= Iteration 1 ==================================
     6  ================================= Iteration 1 ==================================
     7  ================================= Iteration 1 ==================================
     8  ================================= Iteration 1 ==================================
     9  ================================= Iteration 1 ==================================
    10  ================================= Iteration 1 ==================================
    11  ================================= Iteration 1 ==================================
    12  ================================= Iteration 1 ==================================
    13  ================================= Iteration 1 ==================================
    14  ================================= Iteration 1 ==================================
    15  ================================= Iteration 1 ==================================
    16  ================================= Iteration 1 ==================================
    17  ================================= Iteration 1 ==================================
    18  ================================= Iteration 1 ==================================
    19  ================================= Iteration 1 ==================================
    20  ================================= Iteration 1 ==================================
    21  ================================= Iteration 1 ==================================
    22  ================================= Iteration 1 ==================================
    23  ================================= Iteration 1 ==================================
    24  ================================= Iteration 1 ==================================
    25  ================================= Iteration 1 ==================================
    26  ================================= Iteration 1 ==================================
    27  ================================= Iteration 1 ==================================
    28  ================================= Iteration 1 ==================================
    29  ================================= Iteration 1 ==================================
    30  ================================= Iteration 1 ==================================

@seankingyang seankingyang marked this pull request as draft April 26, 2024 03:39
Copy link

codecov bot commented Apr 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.32%. Comparing base (9318a5c) to head (48aa5a4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1210   +/-   ##
=======================================
  Coverage   43.32%   43.32%           
=======================================
  Files         356      356           
  Lines       38658    38658           
  Branches     6559     6559           
=======================================
  Hits        16750    16750           
  Misses      21245    21245           
  Partials      663      663           
Flag Coverage Δ
provider-base 16.58% <ø> (ø)

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.

@seankingyang seankingyang marked this pull request as ready for review April 26, 2024 08:21
@seankingyang seankingyang changed the title Fix the wrong output from suspend cycles(BugFix) Fix the wrong output from suspend cycles (Bugfix) Apr 26, 2024
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.

Another possible solution was to pass to the fwts_test.py script the log file name via -l so that we don't loose the log in case we want to read it but all the infos are in the checkbox submission, so nothing of value should be lost by doing this

+1

@Hook25 Hook25 merged commit 7a32827 into main Apr 29, 2024
13 of 20 checks passed
@Hook25 Hook25 deleted the Suspend_cycles_output_bug branch April 29, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants