summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 09b2394)
raw | patch | inline | side by side (parent: 09b2394)
author | Carlos Hernandez <ceh@ti.com> | |
Fri, 14 Mar 2014 19:38:13 +0000 (15:38 -0400) | ||
committer | Carlos Hernandez <ceh@ti.com> | |
Fri, 14 Mar 2014 19:42:32 +0000 (15:42 -0400) |
It is possible that a late interrupt will cause the suspend path to
abort. In such scenario, the current suspend code will fail the test.
This patch detects such condition and it starts a new rtcwake call.
It is believe that one retry such be enough to handle this late
interrupts scenario.
Signed-off-by: Carlos Hernandez <ceh@ti.com>
abort. In such scenario, the current suspend code will fail the test.
This patch detects such condition and it starts a new rtcwake call.
It is believe that one retry such be enough to handle this late
interrupts scenario.
Signed-off-by: Carlos Hernandez <ceh@ti.com>
testcases/ddt/scripts/common/functions.sh | patch | blob | history |
index ade42487b6fc70cfcee5add1397535586d66a9fb..48fdf6a226ef2f3fe308ff1a8200d4781a5d5f3e 100644 (file)
echo -n "$power_state" > /sys/power/state
elif [ -e /dev/rtc0 ]; then
report "Use rtc to suspend resume"
- do_cmd rtcwake -d /dev/rtc0 -m ${power_state} -s ${suspend_time}
+ # sending twice in case a late interrupt aborted the suspend path.
+ # since this is not common, it is expected that 2 tries should be enough
+ do_cmd rtcwake -d /dev/rtc0 -m ${power_state} -s ${suspend_time} || do_cmd rtcwake -d /dev/rtc0 -m ${power_state} -s ${suspend_time}
else
# Stop the test if there is no rtcwake or wakeup_timer support
die "There is no automated way (wakeup_timer or /dev/rtc0) to wakeup the board. No suspend!"