diff options
author | Javi Merino <javi.merino@arm.com> | 2014-09-23 15:05:45 +0530 |
---|---|---|
committer | Sanjay Singh Rawat <sanjay.rawat@linaro.org> | 2014-09-24 11:11:41 +0530 |
commit | afd155753332ebb41f81e881f1da91b3bec5c4c7 (patch) | |
tree | 3fc29ae56dafea13af047f571a282565e067866d | |
parent | 07b4b6b0b1faf0dd3e37d442f2d2867fc85471fe (diff) |
thermal: don't allow the thermal governor to change cdev states in thermal_04
thermal_04 disables thermal_zone0 during the test to prevent it from
changing the cooling state of the cooling devices while it runs.
Unfortunately, cooling devices can be bound to multiple thermal zones,
so a governor attached to another thermal zone can change the cooling
state and make the test fail.
Furthermore, the meaning of "enabled" and "disabled" is determined by
the platform code. Some platforms turn off polling but leave
interrupts enabled, so cooling device states may still be updated even
when the thermal zone is disabled.
Instead of just disabling thermal_zone0, change all the thermal
governors to user_space to prevent them from altering the states of
any cooling device while running the test.
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
-rwxr-xr-x | thermal/thermal_04.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/thermal/thermal_04.sh b/thermal/thermal_04.sh index 99a3430..8bf3799 100755 --- a/thermal/thermal_04.sh +++ b/thermal/thermal_04.sh @@ -48,8 +48,6 @@ verify_cooling_device_temp_change() { fi local max_state=$(cat $dirpath/max_state) local prev_state_val=$(cat $dirpath/cur_state) - local prev_mode_val=$(cat $tzonepath/mode) - echo -n disabled > $tzonepath/mode local count=1 local cur_state_val=0 @@ -74,11 +72,15 @@ verify_cooling_device_temp_change() { count=$((count+1)) done heater_kill - echo $prev_mode_val > $tzonepath/mode echo $prev_state_val > $dirpath/cur_state } trap "heater_kill; sigtrap" SIGHUP SIGINT SIGTERM +set_thermal_governors user_space + for_each_cooling_device verify_cooling_device_temp_change + +restore_thermal_governors + test_status_show |