mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-06-08 08:17:45 +09:00
kselftest: cpufreq: Get rid of double suspend in rtcwake case
Commit0b631ed3ce
("kselftest: cpufreq: Add RTC wakeup alarm") added support for automatic wakeup in the suspend routine of the cpufreq kselftest by using rtcwake, however it left the manual power state change in the common path. The end result is that when running the cpufreq kselftest with '-t suspend_rtc' or '-t hibernate_rtc', the system will go to sleep and be woken up by the RTC, but then immediately go to sleep again with no wakeup programmed, so it will sleep forever in an automated testing setup. Fix this by moving the manual power state change so that it only happens when not using rtcwake. Link: https://lore.kernel.org/r/20250430-ksft-cpufreq-suspend-rtc-double-fix-v1-1-dc17a729c5a7@collabora.com Fixes:0b631ed3ce
("kselftest: cpufreq: Add RTC wakeup alarm") Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
8ffe772076
commit
23b88515a3
1 changed files with 2 additions and 1 deletions
|
@ -251,9 +251,10 @@ do_suspend()
|
||||||
printf "Failed to suspend using RTC wake alarm\n"
|
printf "Failed to suspend using RTC wake alarm\n"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo $filename > $SYSFS/power/state
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $filename > $SYSFS/power/state
|
|
||||||
printf "Came out of $1\n"
|
printf "Came out of $1\n"
|
||||||
|
|
||||||
printf "Do basic tests after finishing $1 to verify cpufreq state\n\n"
|
printf "Do basic tests after finishing $1 to verify cpufreq state\n\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue