power: Turn Off remote sync of clock during suspend stress test
This patch will fix issues seen during suspend_stress_test such as:
2016-03-19T12:12:40.078192-07:00 wlan0: associated
2016-03-19T12:12:45.792246-07:00 Going to suspend-to-RAM state
2016-03-19T12:12:45.847019-07:00 Explicit sync
2016-03-19T12:12:45.117888-07:00 last active wakeup source: 00:02
2016-03-19T12:12:45.118318-07:00 Aborting suspend, wake event received
Remote sync of time happens immediately after the network comes up.
The time taken from resume of wlan and getting an IP is ~5 sec.
Hence, sync of hwclock and writing in rtc for wakealarm happens at
almost same time (when wake_interval=5).
This may cause spurious wake event and thus abort suspend.
BUG=chrome-os-partner:49761
TEST=suspend_stress_test -c 5000
Change-Id: Icebeb7e311ff6b716bebd387916a2b90002c23d9
Signed-off-by: Akshu Agrawal <akshu.agrawal@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/334478
Commit-Ready: Shobhit Srivastava <shobhit.srivastava@intel.com>
Reviewed-by: Jenny Tc <jenny.tc@intel.com>
Reviewed-by: Icarus W Sparry <icarus.w.sparry@intel.com>
Reviewed-by: Shobhit Srivastava <shobhit.srivastava@intel.com>
Reviewed-by: Dan Erat <derat@chromium.org>
diff --git a/power_manager/tools/suspend_stress_test b/power_manager/tools/suspend_stress_test
index f8d79ea..bea3251 100755
--- a/power_manager/tools/suspend_stress_test
+++ b/power_manager/tools/suspend_stress_test
@@ -95,6 +95,7 @@
dump_stats_and_exit() {
echo "${preserved_pm_print_times}" > /sys/power/pm_print_times
restore_dark_resume_state
+ start tlsdated
echo ""
echo "Finished ${cur} iterations."
echo "Suspend_failures: $(( cur -
@@ -152,6 +153,9 @@
trap dump_stats_and_exit INT
disable_dark_resume
+# Turn off network sync of time to prevent any spurious RTC wake events
+stop tlsdated
+
cur=0
firmware_errors=0
last_successes=${initial_successes}