New issue
Advanced search Search tips

Issue 855976 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 15
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Let pytests not read some driver-dependent battery sysfs files

Project Member Reported by chenghan@chromium.org, Jun 25 2018

Issue description

Chrome Version: ToT
OS: ChromeOS

Some pytests (e.g. battery_sysfs) read files from sysfs to get battery information. Some files such as 'current_max' are driver dependent and do not always exist. Whether reading these files are controlled by flags such as 'check_current_max', but these flags are actually not used or set to false, so we should just remove them.


 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 25 2018

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 28 2018

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 1

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

commit c272a4cb0ddb4b273211205f5e09d6132d0760c3
Author: Cheng-Han Yang <chenghan@google.com>
Date: Sun Jul 01 00:21:21 2018

pytest: Do not read driver dependent sysfs files.

Do not read 'current_max' and 'health' files in battery sysfs. These
checks are controlled by flags that are never set, so we can directly
remove them. 'temp' file in sysfs is also driver dependent, so we
don't read it as well.

BUG= chromium:855976 
TEST=make test
CQ-DEPEND=CL:*644574

Change-Id: If0998e1b6015661b00923e86772471e16802ab05
Reviewed-on: https://chromium-review.googlesource.com/1113168
Commit-Ready: Yong Hong <yhong@google.com>
Tested-by: Cheng-Han Yang <chenghan@chromium.org>
Reviewed-by: Yong Hong <yhong@google.com>

[modify] https://crrev.com/c272a4cb0ddb4b273211205f5e09d6132d0760c3/py/test/pytests/plankton_charge.py
[modify] https://crrev.com/c272a4cb0ddb4b273211205f5e09d6132d0760c3/py/test/pytests/battery_sysfs.py

Status: Assigned (was: Untriaged)
This bug has an owner, thus, it's been triaged. Changing status to "assigned".
Status: Fixed (was: Assigned)

Sign in to add a comment