1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
--- a/bin/graphics_stress_test
+++ b/bin/graphics_stress_test
@@ -117,15 +117,11 @@
def do_suspend(self, mode):
'''
Suspend the system and hope it wakes up.
- Previously tried writing new state to /sys/power/state but that
- seems to put the system into an uncrecoverable S3 state. So far,
- pm-suspend seems to be the most reliable way to go.
-
'''
if mode == 'mem':
- status = call('/usr/sbin/pm-suspend')
+ status = call(['systemctl', 'suspend'])
elif mode == 'disk':
- status = call('/usr/sbin/pm-hibernate')
+ status = call(['systemctl', 'hibernate'])
else:
logging.debug('Unknown sleep state passed')
status == 1
--- a/bin/sleep_test
+++ b/bin/sleep_test
@@ -132,10 +132,6 @@
def DoSuspend(self, mode):
'''
Suspend the system and hope it wakes up.
- Previously tried writing new state to /sys/power/state but that
- seems to put the system into an uncrecoverable S3 state. So far,
- pm-suspend seems to be the most reliable way to go.
-
'''
# Set up our start and finish markers
self.time_stamp = self.GetCurrentTime()
@@ -144,9 +140,9 @@
self.MarkLog(self.start_marker)
if mode == 'mem':
- status = call('/usr/sbin/pm-suspend')
+ status = call(['systemctl', 'suspend'])
elif mode == 'disk':
- status = call('/usr/sbin/pm-hibernate')
+ status = call(['systemctl', 'hibernate'])
else:
logging.debug('Unknown sleep state passed: %s' % mode)
status == 1
@@ -154,7 +150,7 @@
if status == 0:
logging.debug('Successful suspend')
else:
- logging.debug('Error while running pm-suspend')
+ logging.debug('Error while running suspend command')
self.MarkLog(self.end_marker)
def GetResults(self, mode, perf):
--- a/jobs/suspend.txt.in
+++ b/jobs/suspend.txt.in
@@ -305,7 +305,7 @@
id: suspend/`echo ${index}`_hybrid_sleep_`echo "${product}" | sed 's/ /_/g;s/[^_a-zA-Z0-9-]//g'`
user: root
command:
- set -o pipefail; fwts_test -f none -l $PLAINBOX_SESSION_SHARE/`echo ${index}`_hybrid_sleep_single -s s3 --s3-hybrid --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 --pm-method=pm-utils | tee $PLAINBOX_SESSION_SHARE/`echo ${index}`_hybrid_sleep_single_times.log
+ set -o pipefail; fwts_test -f none -l $PLAINBOX_SESSION_SHARE/`echo ${index}`_hybrid_sleep_single -s s3 --s3-hybrid --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/`echo ${index}`_hybrid_sleep_single_times.log
estimated_duration: 90.0
_description:
PURPOSE:
@@ -409,7 +409,7 @@
user: root
depends: suspend/suspend_advanced
estimated_duration: 120.0
-command: pm-suspend
+command: systemctl suspend
_description:
PURPOSE:
Wake up by USB keyboard
@@ -426,7 +426,7 @@
user: root
depends: suspend/suspend_advanced
estimated_duration: 120.0
-command: pm-suspend
+command: systemctl suspend
_description:
PURPOSE:
Wake up by USB mouse
|