Skip to content

Commit

Permalink
Limit the platform to perform the sleepgraph test (BugFix) (#1054)
Browse files Browse the repository at this point in the history
* Filter cpuinfo to GenuineIntel only

* Align the sleep time with Windows,
  https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-stress-and-long-duration-validation#test-operation

Signed-off-by: Kai-Chuan Hsieh <[email protected]>
  • Loading branch information
KaiChuan-Hsieh committed Apr 17, 2024
1 parent 6fbcf94 commit 0f496e9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
22 changes: 18 additions & 4 deletions providers/base/units/stress/jobs.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -607,19 +607,26 @@ plugin:shell
category_id: com.canonical.plainbox::stress
id: stress/s2idle_pm-graph_30
estimated_duration: 10m
requires:
requires:
cpuinfo.type == 'GenuineIntel'
executable.name == 'sleepgraph'
sleep.mem_sleep == 's2idle'
user: root
_summary: Resume from idle by using Intel pm-graph
command:
sleepgraph -m freeze -rtcwake 10 -sync -gzip -multi 30 0 -skiphtml -o "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph/s2idle-"$(date -d today +%Y-%m-%d-%H%M)"
if [ ! -f /proc/driver/nvidia/suspend ]; then
sleepgraph -m freeze -rtcwake 60 -sync -gzip -multi 30 30 -skiphtml -o "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph/s2idle-"$(date -d today +%Y-%m-%d-%H%M)"
else
echo "The platform has Nvidia driver loaded, which is not capable of running sleepgraph"
exit 1
fi

plugin: attachment
category_id: com.canonical.plainbox::stress
id: stress/s2idle_pm-graph_30.tar.xz
estimated_duration: 1
requires:
requires:
cpuinfo.type == 'GenuineIntel'
sleep.mem_sleep == 's2idle'
after:
stress/s2idle_pm-graph_30
Expand All @@ -633,18 +640,25 @@ category_id: com.canonical.plainbox::stress
id: stress/s3_pm-graph_30
estimated_duration: 10m
requires:
cpuinfo.type == 'GenuineIntel'
executable.name == 'sleepgraph'
sleep.mem_sleep == 'deep'
user: root
_summary: Resume from suspend by using Intel pm-graph
command:
sleepgraph -m mem -rtcwake 10 -sync -gzip -multi 30 0 -skiphtml -o "$PLAINBOX_SESSION_SHARE"/s3_pm-graph/suspend-"$(date -d today +%Y-%m-%d-%H%M)"
if [ ! -f /proc/driver/nvidia/suspend ]; then
sleepgraph -m mem -rtcwake 60 -sync -gzip -multi 30 30 -skiphtml -o "$PLAINBOX_SESSION_SHARE"/s3_pm-graph/suspend-"$(date -d today +%Y-%m-%d-%H%M)"
else
echo "The platform has Nvidia driver loaded, which is not capable of running sleepgraph"
exit 1
fi

plugin: attachment
category_id: com.canonical.plainbox::stress
id: stress/s3_pm-graph_30.tar.xz
estimated_duration: 1
requires:
cpuinfo.type == 'GenuineIntel'
sleep.mem_sleep == 'deep'
after:
stress/s3_pm-graph_30
Expand Down
2 changes: 2 additions & 0 deletions providers/base/units/stress/test-plan.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,5 @@ include:
stress/s2idle_pm-graph_30.tar.xz
stress/s3_pm-graph_30
stress/s3_pm-graph_30.tar.xz
bootstrap_include:
cpuinfo

0 comments on commit 0f496e9

Please sign in to comment.