firmware_ECBootTime: Do no rely on "Console is enabled" from EC |
||
Issue descriptionIn firmware_ECBootTime, we wait for "Console is enabled" to appear in the console: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/server/site_tests/firmware_ECBootTime/firmware_ECBootTime.py#59 However, the string may not be intact (it could be interleaved with other strings). We currently use a pair of "cflush" in console_init: https://chromium.googlesource.com/chromiumos/platform/ec/+/1d2c13a1630a1a6222411e1c03186cb9b1f576e0/common/console.c#269 However, these cflush delay the boot process, so we would like to get rid of them (see https://bugs.chromium.org/p/chromium/issues/detail?id=687228 and https://chromium-review.googlesource.com/#/c/chromiumos/platform/ec/+/1073180). We should consider modifying firmware_ECBootTime to not rely on the string: maybe we can try to write a command and wait for a reply. Or at least we could look for the string in a more lazy way, allowing for gaps.
,
May 31 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/bf251ef1055adc9815b2456ac07e990207e10975 commit bf251ef1055adc9815b2456ac07e990207e10975 Author: Nicolas Boichat <drinkcat@chromium.org> Date: Thu May 31 10:50:20 2018 firmware_ECBootTime: Do not rely on "Console is enabled" string from EC Current tests requires "Console is enabled" to be printed from EC. However, depending on how busy the EC is on boot, the string may be corrupted/interleaved with other strings. Instead, after matching the first set of "ec_ready" pattern, we just wait 1 second, ask for the EC version to check if the EC console is ready, then press power button. 1 second is a reasonable delay, and EC console must be ready by then, if not, it is perfectly acceptable to fail this test. We also refactor get_version function out of firmware_FAFTSetup into the ChromeEC class. BUG= chromium:846617 TEST=test_that -b $BOARD $IP firmware_ECBootTime Change-Id: I0faadbff56c372c6be9bd43a2de94f8f1b9125b9 Reviewed-on: https://chromium-review.googlesource.com/1075832 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> [modify] https://crrev.com/bf251ef1055adc9815b2456ac07e990207e10975/server/cros/servo/chrome_ec.py [modify] https://crrev.com/bf251ef1055adc9815b2456ac07e990207e10975/server/site_tests/firmware_FAFTSetup/firmware_FAFTSetup.py [modify] https://crrev.com/bf251ef1055adc9815b2456ac07e990207e10975/server/site_tests/firmware_ECBootTime/firmware_ECBootTime.py
,
Jun 4 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by drinkcat@chromium.org
, May 29 2018Owner: drinkcat@chromium.org
Status: Started (was: Available)