power.CheckStatus fails on some lab machines due to bad batteries |
||
Issue descriptionThe tast_Runner Autotest server test is running on canary builders in the lab now. I guess I didn't take into account the poor state of batteries in many lab machines; though. There are a bunch of devices that appear to have discharging batteries even though line power is connected, and this makes the power.CheckStatus test fail: https://pantheon.corp.google.com/storage/browser/chromeos-autotest-results/177525233-chromeos-test/chromeos2-row6-rack4-host3/ 2018/02/18 02:38:35 Started test power.CheckStatus 2018/02/18 02:38:35 [02:38:35.092] Error at check_status.go:31: Battery discharging while on line power 2018/02/18 02:38:35 [02:38:35.092] Stack trace: chromiumos/tast/local/bundles/cros/power.CheckStatus(0xc420056980) /build/poppy/tmp/portage/chromeos-base/tast-local-tests-cros-0.0.1-r10/work/tast-local-tests-cros-0.0.1/tast-tests/src/chromiumos/tast/local/bundles/cros/power/check_status.go:31 +0x548 chromiumos/tast/testing.(*Test).Run.func1(0xc420056980, 0xc4200580e0, 0xc420011b90) /build/poppy/tmp/portage/chromeos-base/tast-local-tests-cros-0.0.1-r10/work/tast-local-tests-cros-0.0.1/src/chromiumos/tast/testing/test.go:79 +0x66 created by chromiumos/tast/testing.(*Test).Run /build/poppy/tmp/portage/chromeos-base/tast-local-tests-cros-0.0.1-r10/work/tast-local-tests-cros-0.0.1/src/chromiumos/tast/testing/test.go:72 +0xb3 2018/02/18 02:38:35 Completed test power.CheckStatus in 33ms with 1 error(s) Device: Line Power path: /sys/class/power_supply/CROS_USB_PD_CHARGER0 online: yes type: USB_PD enum type: AC voltage (V): 15.4 current (A): 0 max voltage (V): 15 max current (A): 3 active source: CROS_USB_PD_CHARGER0 available sources: CROS_USB_PD_CHARGER0* [0/3200] supports dual-role: yes Device: Battery path: /sys/class/power_supply/BAT0 vendor: SMP-ATL model name: 0RA-3C serial number: 0001 state: Discharging voltage (V): 12.441 energy (Wh): 31.7176 energy rate (W): 0 current (A): 0 charge (Ah): 2.739 full charge (Ah): 3.258 full charge design (Ah): 3.795 percentage: 84.07 display percentage: 86.6701 technology: Li-ion I guess I should just drop this check.
,
Feb 22 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/9455f1648cb15f329e071cb241aa66970870ef9c commit 9455f1648cb15f329e071cb241aa66970870ef9c Author: Daniel Erat <derat@chromium.org> Date: Thu Feb 22 01:26:41 2018 tast-tests: Make power.CheckStatus not check for bad battery Make the power.CheckStatus local test not check if the DUT's battery is discharging while line power is connected, as there are apparently machines in the lab in this state. Instead, just check that the reported battery percentages (which should be capped by powerd) are in the expected range. BUG= chromium:813415 TEST=ran it Change-Id: I1ac16cf180ff096802da07779dfc7e7e0c3abecd Reviewed-on: https://chromium-review.googlesource.com/924506 Tested-by: Dan Erat <derat@chromium.org> Reviewed-by: Eric Caruso <ejcaruso@chromium.org> [modify] https://crrev.com/9455f1648cb15f329e071cb241aa66970870ef9c/src/chromiumos/tast/local/bundles/cros/power/check_status.go
,
Feb 22 2018
I definitely don't want to maintain a whitelist. :-) The issue also seemed to be inconsistent and scattered across many different boards. With regard to a more generic mechanism, were you suggesting permitting discharging if the battery is above some percentage? In the example I quoted above, power_supply_info said that the battery was at 84%, so I'm not sure that this was intentional in that case. I removed the check from the test, in any case, but feel free to reopen this if you think we can do better.
,
Feb 22 2018
Really comes down to the intent/purpose of the test. If its to find flaky hardware or charging SW I'd argue its had been doing its job. As its running as part of canary builders though its likely more of just a sanity check. Any test that wants to deal w/ the intricacies of some devices charging policy will likely want to control charge/discharge across a range of SOC which is likely a separate test. I think closing for now is the right call. |
||
►
Sign in to add a comment |
||
Comment 1 by tbroch@chromium.org
, Feb 20 2018