Skip to content

Commit

Permalink
Limit the platform to perform the sleepgraph test (BugFix) (#1136)
Browse files Browse the repository at this point in the history
Limit the platform to perform the sleepgraph test (BugFix) (#1054)

* Prevent sleepgraph jobs from running on devices with an Nvidia GPU

sleepgraph triggers suspend using sysfs node without notifying systemd (an upstream bug[1] has been opened for this). However, Nvidia uses a userspace daemon that relies on systemd status, so triggering suspend using sysfs directly may lead to issues on devices with Nvidia graphics cards.

* Filter cpuinfo to GenuineIntel only

* Align the sleep time with testing done on Microsoft Windows[2]



[1] intel/pm-graph#28
[2] 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 authored Apr 18, 2024
1 parent 6f0ca4e commit e1f796b
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions providers/base/units/stress/jobs.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -607,51 +607,67 @@ 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. Exiting..."
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
user: root
_summary: Attach pm-graph logs (s2idle)
command:
tar Jcf "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph_30.tar.xz "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph && cat "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph_30.tar.xz
if [ -d "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph ]; then
tar Jcf "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph_30.tar.xz "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph && cat "$PLAINBOX_SESSION_SHARE"/s2idle_pm-graph_30.tar.xz
fi

plugin:shell
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. Exiting..."
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
user: root
_summary: Attach pm-graph logs (s3)
command:
tar Jcf "$PLAINBOX_SESSION_SHARE"/s3_pm-graph_30.tar.xz "$PLAINBOX_SESSION_SHARE"/s3_pm-graph && cat "$PLAINBOX_SESSION_SHARE"/s3_pm-graph_30.tar.xz
if [ -d "$PLAINBOX_SESSION_SHARE"/s3_pm-graph ]; then
tar Jcf "$PLAINBOX_SESSION_SHARE"/s3_pm-graph_30.tar.xz "$PLAINBOX_SESSION_SHARE"/s3_pm-graph && cat "$PLAINBOX_SESSION_SHARE"/s3_pm-graph_30.tar.xz
fi

unit: job
id: stress/wireless_bluetooth_coex_connect_stress
Expand Down

0 comments on commit e1f796b

Please sign in to comment.