New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 674028 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

factory: device API: simplify thermal component.

Project Member Reported by hungte@chromium.org, Dec 14 2016

Issue description

This is initiated when I was trying to revise and clean up the difference between board implementations.

Currently the Thermal in device API has requested a device to support:
 GetTemperatures # return values of all temp sensors
 GetMainTemperatureIndex # index of main in the list of GetTemeratures
 GetTemperatureSensorNames # names of the list

However, this implies whenever a test is requesting "current temperature", our device API will need to read back a dozens of values, even if the test just wants one (main).

It was not a problem for implementations using ectool (since ectool returns all in one call), but is causing lots of traffic for implementations using sysfs via remote link (for example Android).

Also,
 - On x86 most reference boards prefer to read main from coretemp
 - On arm most reference boards prefer to read from thermal_zone (sysfs)

In other words, none of the boards really use the default implementation EctoolThermal or SysfsThermal (except AndroidBoard).

By reviewing current test and test lists, we believe most tests only want the "main temperature". They even don't care about its name.

As a result, we should simplify Thermal to

 GetMainTemperature()
 GetTemperature(sensor_name)

If really needed, we can add

 GetAllTemperatures() # returns a dict from names to values

For backward compatibility, we can still keep the three extra APIs for few more milestones.

And we probably will create two thermal providers:

 CoretempThermal()
 ThermalZoneThermal()

Meanwhile, fan control should be isolated from Thermal because programs using ThermalZone may still want to control fan by ectool.
 

Comment 1 by hungte@chromium.org, Dec 14 2016

fan really needs to be its own module since chromebox (no ec) does that in a totally different way.

Comment 2 by hungte@chromium.org, Dec 14 2016

additional info.

"ec_temp_sensors" tries to validate if all (or given list) sensors by dut.thermal.GetTemperatures() are in valid range.
  On x86, this includes all sensors from "ectool" and "coretemp". (Some boards added Core1/Core2 to coretmp)
  On arm, "ectool tempsinfo all" returns nothing.

Considering that, we do want thermal module to support all sensors for particular test.

So, my proposal:

- Add GetMainTemperature() so tests that only want "main temperature" do not need to do GetTemperatures()[GetMainTemperatureIndex()].
  This would allow boards to implement a quick / efficient way of getting CPU temperature.

- Keep GetTemperatures, GetMainTemperatureIndex, GetTemperatureSensorNames until we've cleaned up more tests.
  Default Thermal can return a simple list that contains only thermal_zone0, which should work on most ARM platforms.
  X86 platforms can replace the main temperature by coretemp.
  chromebooks can provide additional temps using ectool

- ec_temp_sensors should be renamed to thermal_sensors, since it's nothing related to EC now.

Comment 3 by hungte@chromium.org, Dec 14 2016

For now we have 3 types of different thermal sensors:
 - coretemp
 - ectool
 - thermal zone

And a device may want to monitor sensors from multiple sources, because these sensors may all exist on same device (coretemp reads temp inside cpu, thermal zone is usually by ACPI, and ectool directly reads from sensors attached to EC).

As a result, it's not practical to use simple class inheritance like ECToolThermal, ThermalZoneThermal, CoretempThermal and select one of them. I think we'll implement this by having multiple "thermal providers" and that Thermal should contain all providers that a board definition requests.

Comment 4 by hungte@chromium.org, Dec 15 2016

Owner: hungte@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/06c002b099ccb2b306b6e9ff91eddfec06a41fa4

commit 06c002b099ccb2b306b6e9ff91eddfec06a41fa4
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Dec 14 09:56:28 2016

device: Move FanRPM functions to new module 'fan'.

Fan and thermal are related, but we find out that difference devices may
need different combination for fan and thermal providers.

For example, X86 Chromebooks usually want ECTool Thermal + ECTool Fan,
but X86 Chromebox wants ECTool Thermal + Mosys Fan.
Also, ARM Chromebooks are using ThermalZone Thermal + ECTool Fan.

As a result, it seems more reasonable to move fan controls functions
into a new module.

BUG= chromium:674028 
TEST=make test

Change-Id: Ie6b2edf4912440e0cd62b077cca499d2d5e15cdb
Reviewed-on: https://chromium-review.googlesource.com/420184
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@google.com>

[add] https://crrev.com/06c002b099ccb2b306b6e9ff91eddfec06a41fa4/py/device/fan.py
[modify] https://crrev.com/06c002b099ccb2b306b6e9ff91eddfec06a41fa4/py/device/boards/chromeos.py
[modify] https://crrev.com/06c002b099ccb2b306b6e9ff91eddfec06a41fa4/py/device/thermal_unittest.py
[modify] https://crrev.com/06c002b099ccb2b306b6e9ff91eddfec06a41fa4/py/device/board.py
[modify] https://crrev.com/06c002b099ccb2b306b6e9ff91eddfec06a41fa4/py/test/pytests/fan_speed.py
[modify] https://crrev.com/06c002b099ccb2b306b6e9ff91eddfec06a41fa4/py/test/pytests/thermal_slope.py
[modify] https://crrev.com/06c002b099ccb2b306b6e9ff91eddfec06a41fa4/py/device/thermal.py
[add] https://crrev.com/06c002b099ccb2b306b6e9ff91eddfec06a41fa4/py/device/fan_unittest.py
[modify] https://crrev.com/06c002b099ccb2b306b6e9ff91eddfec06a41fa4/py/device/boards/linux.py

Comment 6 by hungte@chromium.org, Dec 16 2016

Components: Factory
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/0dd3a03d49426ed85b65ba442abbf197776e5097

commit 0dd3a03d49426ed85b65ba442abbf197776e5097
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Dec 14 11:10:04 2016

device: Use thermal.GetMainTemperature if possible.

Change factory code that do not need all temperature sensor values to
use GetMainTemperature instead of calling the additional
GetMainTemperatureIndex.

- status.temperatures and status.main_temperature_index are now replaced
  by status.temperature.
- countdown has cached temperature and fan values explicitly, which also
  reduced the cost of making snapshot to all status values.
- thermal_load calls thermal.GetTemperatures() directly.

BUG= chromium:674028 
TEST=make test

Change-Id: I8480a7445c1bf095b08f1ef12d29224125bf0917
Reviewed-on: https://chromium-review.googlesource.com/420187
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/0dd3a03d49426ed85b65ba442abbf197776e5097/py/test/pytests/countdown.py
[modify] https://crrev.com/0dd3a03d49426ed85b65ba442abbf197776e5097/py/test/pytests/thermal_load.py
[modify] https://crrev.com/0dd3a03d49426ed85b65ba442abbf197776e5097/py/device/status_unittest.py
[modify] https://crrev.com/0dd3a03d49426ed85b65ba442abbf197776e5097/py/device/status.py
[modify] https://crrev.com/0dd3a03d49426ed85b65ba442abbf197776e5097/py/device/thermal.py
[modify] https://crrev.com/0dd3a03d49426ed85b65ba442abbf197776e5097/py/goofy/js/goofy.js

Project Member

Comment 8 by bugdroid1@chromium.org, Dec 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/d02dd4f05b4d74834f6337b92232669e9d52bd26

commit d02dd4f05b4d74834f6337b92232669e9d52bd26
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Dec 14 10:42:16 2016

device: Add GetMainTemperature to thermal and add default implementation.

For tests and factory code taking only main temperature, it's more
efficient to provide a direct function to read main (CPU) temperature
without fetching all sensor readings.

BUG= chromium:674028 
TEST=make test

Change-Id: I04ca8511eb63dc74e5e292132a595fd2a36226bd
Reviewed-on: https://chromium-review.googlesource.com/420186
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/d02dd4f05b4d74834f6337b92232669e9d52bd26/py/device/thermal.py

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/02c4a76c0a1c0dde38b9ce275c6ee6ec00b9765d

commit 02c4a76c0a1c0dde38b9ce275c6ee6ec00b9765d
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Dec 15 05:24:21 2016

device: Rewrite thermal to support reading from multiple sensor sources.

Refactor thermal module to move sensor implementations into
ThermalSensorSource so a board may read temperatures from coretemp and
ectool at the same time.

Also added few APIs to change sensors from fixed-order list into
dictionary:
 thermal.GetTemperature(sensor_name)
 thermal.GetMainSensorName()

Old APIs (GetTemperatures, GetMainTemperatureIndex,
GetTemperatureSensorNames) currently will still work, and we may
deprecate them in future.

BUG= chromium:674028 
TEST=make test

Change-Id: I59727fcfef74d73c128c8e05c8b0ad86b8cd500b
Reviewed-on: https://chromium-review.googlesource.com/420149
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/02c4a76c0a1c0dde38b9ce275c6ee6ec00b9765d/py/device/thermal_unittest.py
[modify] https://crrev.com/02c4a76c0a1c0dde38b9ce275c6ee6ec00b9765d/py/device/boards/chromeos.py
[modify] https://crrev.com/02c4a76c0a1c0dde38b9ce275c6ee6ec00b9765d/py/device/thermal.py

Status: Fixed (was: Started)

Comment 11 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58
Project Member

Comment 12 by bugdroid1@chromium.org, Apr 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/6e2bd7eaeb786a33f8fee6ad57800a7141503fd5

commit 6e2bd7eaeb786a33f8fee6ad57800a7141503fd5
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 12 03:22:31 2017

device: Revise thermal API.

Simplify and change thermal API to fully work in dictionary model.

- GetTemperature(name): Returns the temperature of given sensor.
- GetMainSensorName(): Returns the name of main sensor.
- GetAllTemperatures(): Returns mapping of all sensor names and values.
- GetAllSensorNames(): Returns all available sensor names.

Ideally list of all sensors can be retrieved from GetAllTemperatures,
but that will trigger reading values of every sensor, so we still want a
GetAllSensorNames to avoid accessing to sensors directly.

The legacy APIs will be deprecated in future:
- GetMainTemperature
- GetTemperatures
- GetMainTemperatureIndex
- GetTemperatureSensorNames (fixed order)

BUG= chromium:674028 
TEST=make test

Change-Id: I1c3da2029c9d3464340cf913cd39c756e995accb
Reviewed-on: https://chromium-review.googlesource.com/472767
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/6e2bd7eaeb786a33f8fee6ad57800a7141503fd5/py/device/thermal_unittest.py
[modify] https://crrev.com/6e2bd7eaeb786a33f8fee6ad57800a7141503fd5/py/device/thermal.py

Project Member

Comment 13 by bugdroid1@chromium.org, Apr 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/6e2bd7eaeb786a33f8fee6ad57800a7141503fd5

commit 6e2bd7eaeb786a33f8fee6ad57800a7141503fd5
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 12 03:22:31 2017

device: Revise thermal API.

Simplify and change thermal API to fully work in dictionary model.

- GetTemperature(name): Returns the temperature of given sensor.
- GetMainSensorName(): Returns the name of main sensor.
- GetAllTemperatures(): Returns mapping of all sensor names and values.
- GetAllSensorNames(): Returns all available sensor names.

Ideally list of all sensors can be retrieved from GetAllTemperatures,
but that will trigger reading values of every sensor, so we still want a
GetAllSensorNames to avoid accessing to sensors directly.

The legacy APIs will be deprecated in future:
- GetMainTemperature
- GetTemperatures
- GetMainTemperatureIndex
- GetTemperatureSensorNames (fixed order)

BUG= chromium:674028 
TEST=make test

Change-Id: I1c3da2029c9d3464340cf913cd39c756e995accb
Reviewed-on: https://chromium-review.googlesource.com/472767
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/6e2bd7eaeb786a33f8fee6ad57800a7141503fd5/py/device/thermal_unittest.py
[modify] https://crrev.com/6e2bd7eaeb786a33f8fee6ad57800a7141503fd5/py/device/thermal.py

Project Member

Comment 14 by bugdroid1@chromium.org, Apr 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/6e2bd7eaeb786a33f8fee6ad57800a7141503fd5

commit 6e2bd7eaeb786a33f8fee6ad57800a7141503fd5
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 12 03:22:31 2017

device: Revise thermal API.

Simplify and change thermal API to fully work in dictionary model.

- GetTemperature(name): Returns the temperature of given sensor.
- GetMainSensorName(): Returns the name of main sensor.
- GetAllTemperatures(): Returns mapping of all sensor names and values.
- GetAllSensorNames(): Returns all available sensor names.

Ideally list of all sensors can be retrieved from GetAllTemperatures,
but that will trigger reading values of every sensor, so we still want a
GetAllSensorNames to avoid accessing to sensors directly.

The legacy APIs will be deprecated in future:
- GetMainTemperature
- GetTemperatures
- GetMainTemperatureIndex
- GetTemperatureSensorNames (fixed order)

BUG= chromium:674028 
TEST=make test

Change-Id: I1c3da2029c9d3464340cf913cd39c756e995accb
Reviewed-on: https://chromium-review.googlesource.com/472767
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/6e2bd7eaeb786a33f8fee6ad57800a7141503fd5/py/device/thermal_unittest.py
[modify] https://crrev.com/6e2bd7eaeb786a33f8fee6ad57800a7141503fd5/py/device/thermal.py

Project Member

Comment 15 by bugdroid1@chromium.org, Apr 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/7392e475e0effe7a2020ef419e382f59e5664b7b

commit 7392e475e0effe7a2020ef419e382f59e5664b7b
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 12 03:22:30 2017

device: Remove thermal from reference ARM board implementations.

The ARM boards are using thermal zone implementation and already
included in latest thermal sources. No need to create per-board thermal
implementations for them.

BUG= chromium:674028 
TEST=make test

Change-Id: I75ce4f2288e3643815a8cf1d9ea06d2b2a900be4
Reviewed-on: https://chromium-review.googlesource.com/474624
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/7392e475e0effe7a2020ef419e382f59e5664b7b/py/device/boards/spring.py
[modify] https://crrev.com/7392e475e0effe7a2020ef419e382f59e5664b7b/py/device/boards/pit.py
[modify] https://crrev.com/7392e475e0effe7a2020ef419e382f59e5664b7b/py/device/boards/snow.py

Project Member

Comment 16 by bugdroid1@chromium.org, Apr 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/bfe2ac50edeff50d0fa5c58cd44302d868be8d97

commit bfe2ac50edeff50d0fa5c58cd44302d868be8d97
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 12 03:22:31 2017

device: thermal: Revise device.status to use only new thermal API.

Change GetMainTemperature to GetTemperature().

BUG= chromium:674028 
TEST=make test; device_utils.CreateDUTInterface().status.thermal

Change-Id: I1e3eab487926441c0e1cd76054dad129b3a4908c
Reviewed-on: https://chromium-review.googlesource.com/474625
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/bfe2ac50edeff50d0fa5c58cd44302d868be8d97/py/device/status.py
[modify] https://crrev.com/bfe2ac50edeff50d0fa5c58cd44302d868be8d97/py/device/status_unittest.py

Project Member

Comment 17 by bugdroid1@chromium.org, Apr 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/c15c1ddfe4cde3494f77966fb9b7ffb0256a4e32

commit c15c1ddfe4cde3494f77966fb9b7ffb0256a4e32
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 12 06:25:57 2017

tools: Change thermal_monitor to use new thermal API.

The thermal monitor has to track all thermal sensors, so we should use
GetAllTemperatures and keep the order of all sensors for printing logs.
Additionally, we should all check sensors names instead of thermal array
length to figure out if any sensors have been added or removed.

Also revised the output so main sensor is always the first printed
thermal.

BUG= chromium:674028 
TEST=make tet;
     ./py/tools/thermal_monitor.py -p 1 -d 0

Change-Id: If0ceb7bcf013c83a6db8650020442984b7528979
Reviewed-on: https://chromium-review.googlesource.com/474626
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/c15c1ddfe4cde3494f77966fb9b7ffb0256a4e32/py/tools/thermal_monitor.py

Project Member

Comment 18 by bugdroid1@chromium.org, Apr 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/ad8fc2618efea14d9dff2b13f6cecb62210e1d6a

commit ad8fc2618efea14d9dff2b13f6cecb62210e1d6a
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 12 06:25:58 2017

pytests: Change ec_temp_sensors to support name based sensor in dargs.

For changing from 'index-based thermal processing' to 'dictionary-based
thermal processing', we need to first clean up pytests using legacy
index-based thermal API.

This change makes ec_temp_sensors accepting None for main temperature
and '*' for 'all temperatures', eliminating the need of calling
GetTemperatureSensorNames and GetMainTemperatureIndex in test
list.

Note we are still allowing index based sensor in test dargs, and will
remove that once test list migration has been finished.

BUG= chromium:674028 
TEST=make test
     manually started Goofy and run the test.

Change-Id: Id376d29ca3c1c274222cb81acf20c8b0c84e6dc6
Reviewed-on: https://chromium-review.googlesource.com/474664
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/ad8fc2618efea14d9dff2b13f6cecb62210e1d6a/py/test/pytests/ec_temp_sensors.py

Project Member

Comment 19 by bugdroid1@chromium.org, Apr 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/4bbd101ca16800f2ee06e2ef263ff8e3e49ae9e6

commit 4bbd101ca16800f2ee06e2ef263ff8e3e49ae9e6
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 12 06:25:57 2017

pytests: Change thermal_slope to use new device thermal API.

`thermal_slope` actually only cares about main temperature, so we can
easily change it from GetMainTemperature() to GetTemperature().

BUG= chromium:674028 
TEST=Manually invoked thermal_slope test on DUT.

Change-Id: Ifffb90a4d3d3aa86c48f775081212cc1fde4278a
Reviewed-on: https://chromium-review.googlesource.com/474644
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/4bbd101ca16800f2ee06e2ef263ff8e3e49ae9e6/py/test/pytests/thermal_slope.py

Project Member

Comment 20 by bugdroid1@chromium.org, Apr 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/5e84b9376ecfb8262c49f3a4c2227b808212b9ab

commit 5e84b9376ecfb8262c49f3a4c2227b808212b9ab
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 12 12:34:22 2017

pytests: Change countdown to accept sensor names in test criteria.

For changing from 'index-based thermal processing' to 'dictionary-based
thermal processing', we need to first clean up test and test lists using
GetMainTemperatureIndex and pytests using index API.

countdown is changed to accept sensor name, or None (as main sensor) in
the test criteria.

Note we are still allowing index based sensor in test dargs, and will
remove that once test list migration has been finished.

BUG= chromium:674028 
TEST=make test
     manually started Goofy

Change-Id: Ib881a9590ab287c93717400c4a72775d2a2268fa
Reviewed-on: https://chromium-review.googlesource.com/472287
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/5e84b9376ecfb8262c49f3a4c2227b808212b9ab/py/test/test_lists/generic_rrt.py
[modify] https://crrev.com/5e84b9376ecfb8262c49f3a4c2227b808212b9ab/py/test/pytests/countdown.py

Project Member

Comment 21 by bugdroid1@chromium.org, Apr 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/b2680d47f53c402f0d9cb0a3973a2339fd4ea251

commit b2680d47f53c402f0d9cb0a3973a2339fd4ea251
Author: Hung-Te Lin <hungte@chromium.org>
Date: Wed Apr 12 12:34:22 2017

pytests: Change thermal_load to support name based sensors in dargs.

For changing from 'index-based thermal processing' to 'dictionary-based
thermal processing', we need to first clean up pytests using legacy
index-based thermal API.

This change makes thermal_load accepting None for main temperature
and, eliminating the need of calling GetTemperatureSensorNames and
GetMainTemperatureIndex in test list.

Note we are still allowing index based sensor in test dargs, and will
remove that once test list migration has been finished.

BUG= chromium:674028 
TEST=make test
     manually started Goofy and run the test.

Change-Id: If158be047f7eaa7e71bcecfc8cd00363cdd1bd7e
Reviewed-on: https://chromium-review.googlesource.com/474665
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/b2680d47f53c402f0d9cb0a3973a2339fd4ea251/py/test/pytests/thermal_load.py

Comment 22 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 23 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Project Member

Comment 24 by bugdroid1@chromium.org, Jul 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/a7c1c01c471294ce02f88702e4fd239ffb600a00

commit a7c1c01c471294ce02f88702e4fd239ffb600a00
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Jul 27 09:42:54 2017

device: Remove legacy SysFSThermal and ECToolThermal.

ECToolThermal is a backward compatible name and should be deprecated
now.

SysFSThermal is actually doing same thing as ThermalZone provider for
sensor readings, and using hwmon for GetPowerUsage. However, the
GetPowerUsage actually does not work on our Android systems (for example
Pixel C) due to lack of power1_input, so the implementation can be
abandoned since we will need to find other way for implementation in
future.

Also removed legacy code using fan identifiers from thermal module.

BUG= chromium:674028 
TEST=make test; created a DUT Interface using ADBLink to test a Pixel C
     device and able to retrieve thermal sensor readings.

Change-Id: I066f56016f5259c367f54885bf108f06938bf2f8
Reviewed-on: https://chromium-review.googlesource.com/586215
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/a7c1c01c471294ce02f88702e4fd239ffb600a00/py/device/fan.py
[modify] https://crrev.com/a7c1c01c471294ce02f88702e4fd239ffb600a00/py/device/thermal_unittest.py
[modify] https://crrev.com/a7c1c01c471294ce02f88702e4fd239ffb600a00/py/device/boards/android.py
[modify] https://crrev.com/a7c1c01c471294ce02f88702e4fd239ffb600a00/py/device/status_unittest.py
[modify] https://crrev.com/a7c1c01c471294ce02f88702e4fd239ffb600a00/py/device/status.py
[modify] https://crrev.com/a7c1c01c471294ce02f88702e4fd239ffb600a00/py/device/thermal.py

Project Member

Comment 25 by bugdroid1@chromium.org, Jul 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/cf1a44b40ef63815ec5b3ac0fb55f75f335f0a5e

commit cf1a44b40ef63815ec5b3ac0fb55f75f335f0a5e
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Jul 27 22:43:57 2017

device: Remove legacy thermal API.

Remove the legacy thermal APIs that need fixed order of sensors:
 - GetMainTemperature
 - GetMainTemperatureIndex
 - GetTemperatures

BUG= chromium:674028 
TEST=make test

Change-Id: I10cbc05244d61d35aadd1a6aad25f208081d1754
Reviewed-on: https://chromium-review.googlesource.com/586217
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/cf1a44b40ef63815ec5b3ac0fb55f75f335f0a5e/py/device/thermal_unittest.py
[modify] https://crrev.com/cf1a44b40ef63815ec5b3ac0fb55f75f335f0a5e/py/test/pytests/countdown.py
[modify] https://crrev.com/cf1a44b40ef63815ec5b3ac0fb55f75f335f0a5e/py/device/thermal.py
[modify] https://crrev.com/cf1a44b40ef63815ec5b3ac0fb55f75f335f0a5e/py/test/pytests/thermal_sensors.py

Labels: VerifyIn-61

Comment 27 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment