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

Issue 654619 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

automated tests assume ectool works if present

Project Member Reported by harpreet@chromium.org, Oct 11 2016

Issue description

Starting with CrOS M55-8853.0.0 ectool is now available on various CrOS platforms which was not the case till M55-8852.0.0
Build diff: https://crosland.corp.google.com/log/8852.0.0..8853.0.0


On devices like buddy where ectool has been available all along, running a command like 'ectool temps all' returns various temperature readings.

FROM BUDDY:
localhost ~ # which ectool
/usr/sbin/ectool
localhost ~ # 
localhost ~ # ectool temps all
0: 319
1: 320
2: 322
3: 314


This is not the case with any of the other devices that recently added ectool. below is an example of the 'ectool temps all' command from zako:

FROM ZAKO:
localhost ~ # which ectool
/usr/local/sbin/ectool
localhost ~ #
localhost ~ # ectool temps all
Port 0x204,0x200 are both 0xFF.
Very likely this board doesn't have a Chromium EC.
Cannot find I2C adapter
Unable to establish host communication
Couldn't find EC




This has resulted in enterprise_CFM_Perf test failing on multiple platforms including (panther, guado, rikku, zako, etc.). https://cs.corp.google.com/chromeos_public/src/third_party/autotest/files/server/site_tests/enterprise_CFM_Perf/enterprise_CFM_Perf.py?l=43



 
Cc: venkatar...@chromium.org
Owner: sha...@chromium.org

Comment 3 by dchan@chromium.org, Oct 11 2016

you mention mosys will get you the value also, why not use mosys always ?

Comment 4 by sha...@chromium.org, Oct 11 2016

Zako is a Chromebox that really doesn't have a Chrome EC (it uses a Super I/O chip instead). ectool will never work on this platform.

I agree we shouldn't include 'ectool' in images for such platforms. I will look into it today.
dchan@ - We only use ectool for devices where it is available, eg. buddy. If ectool is not available then we use mosys. See link above (original comment) for logic used in the test.


shawnn@ - ectool was not included on these platforms till R55-8852.0.0

harpreet@harpreet:~$ ssh root@chromeos1-row3-rack5-host6
localhost ~ # which ectool
which: no ectool in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin)
localhost ~ # 
localhost ~ # 
localhost ~ # cat /etc/lsb-release 
CHROMEOS_RELEASE_APPID={C3EA54EB-348D-5118-8598-CFD6317AD268}
CHROMEOS_BOARD_APPID={C3EA54EB-348D-5118-8598-CFD6317AD268}
CHROMEOS_CANARY_APPID={90F229CE-83E2-4FAF-8479-E368A34938B1}
DEVICETYPE=CHROMEBOX
CHROMEOS_RELEASE_BUILDER_PATH=zako-release/R55-8852.0.0
GOOGLE_RELEASE=8852.0.0
CHROMEOS_DEVSERVER=
CHROMEOS_RELEASE_BOARD=zako
CHROMEOS_RELEASE_BUILD_NUMBER=8852
CHROMEOS_RELEASE_BRANCH_NUMBER=0
CHROMEOS_RELEASE_CHROME_MILESTONE=55
CHROMEOS_RELEASE_PATCH_NUMBER=0
CHROMEOS_RELEASE_TRACK=testimage-channel
CHROMEOS_RELEASE_DESCRIPTION=8852.0.0 (Official Build) dev-channel zako test
CHROMEOS_RELEASE_BUILD_TYPE=Official Build
CHROMEOS_RELEASE_NAME=Chrome OS
CHROMEOS_RELEASE_VERSION=8852.0.0
CHROMEOS_AUSERVER=https://tools.google.com/service/update2

Comment 6 by sha...@chromium.org, Oct 11 2016

Cc: hungte@chromium.org waihong@chromium.org
This was apparently done intentionally:

https://chromium-review.googlesource.com/#/c/390880/

Certain tests check for the existence of ectool and assume it works if the binary exists, eg. enterprise_CFM_Perf.

There is a FAFT config attribute 'chrome_ec' that we set in board-level config files to indicate whether the device has a Chrome EC. Does it make sense to check the same config attribute for tests like enterprise_CFM_Perf, even though they are not FAFT tests?

Comment 7 by sha...@chromium.org, Oct 11 2016

Summary: automated tests assume ectool works if present (was: ectool does not return temperature values)
Status: WontFix (was: Untriaged)
I'll change it to use 'ectool version' instead of 'which ectool'.

On devices that don't have chrome ec the output of 'ectool version' is as below:

localhost ~ # which ectool
/usr/local/sbin/ectool
localhost ~ # ectool version
Port 0x204,0x200 are both 0xFF.
Very likely this board doesn't have a Chromium EC.
Cannot find I2C adapter
Unable to establish host communication
Couldn't find EC



Platforms that have chrome ec the version is returned as such:

localhost ~ # which ectool
/usr/sbin/ectool
localhost ~ # ectool version
RO version:    buddy_v1.1.2342-798806a
RW version:    buddy_v1.1.2342-798806a
Firmware copy: RW
Build info:    buddy_v1.1.2342-798806a 2016-01-08 16:00:40 @build169-m2
Cc: sha...@chromium.org
Owner: harpreet@chromium.org
Status: Started (was: WontFix)
Assigning it to myself and submitting the above listed fix for the test.
Project Member

Comment 10 by bugdroid1@chromium.org, Oct 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/79980a0b5711c4687e2c44f6d081955170998aa9

commit 79980a0b5711c4687e2c44f6d081955170998aa9
Author: harpreet <harpreet@google.com>
Date: Tue Oct 11 17:55:50 2016

Use 'ectool version' to detect if chrome ec is available

ec-utils is now included on test images for all platforms even if chrome
ec is not available. Using 'ectool version' instead of 'which ectool'
still works for the purpose of this test.

BUG= chromium:654619 
TEST=Tested on a local dut setup.

Change-Id: I04cf27eb71f28999b6a17290ce605d041cd001df
Reviewed-on: https://chromium-review.googlesource.com/396484
Commit-Ready: Harpreet Grewal <harpreet@chromium.org>
Tested-by: Harpreet Grewal <harpreet@chromium.org>
Reviewed-by: danny chan <dchan@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>

[modify] https://crrev.com/79980a0b5711c4687e2c44f6d081955170998aa9/server/site_tests/enterprise_CFM_Perf/enterprise_CFM_Perf.py

Status: Fixed (was: Started)

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

Labels: VerifyIn-59

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

Labels: VerifyIn-60
Labels: VerifyIn-61
Status: Verified (was: Fixed)

Sign in to add a comment