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

Issue 860623 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

factory: Revise HWID generating/verification flow

Project Member Reported by yhong@chromium.org, Jul 6

Issue description

This bug aims to track the progress of decoupling the HWID generating flow and the second source component verification in factory side.

Currently both HWID string generating and second source verification are done by the `hwid` pytest.  However, ideally we should obtain a payload which records a list of approved second source components and their probe information from CPFE.  And we should use a different pytest to verify if all installed components are approved.

But before we actually get the payload, we can implement the factory side work first by following steps:
1. Generate the payload by converting the HWID database into a new and simpler format because currently every information are recorded in HWID database and managed by human.
2. Write a new test to do second source verification in GRT stage.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 20

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

commit 1e650e4bbc7e243eda616a94f1ced345470c12bd
Author: Yuan-Yao Sung <yysung@google.com>
Date: Fri Jul 20 12:31:19 2018

probe: Add concat function

Adds a combination to provide a list concatenation operation.  This
function assumes the outputs of the sub-functions are lists and it will
combine those outputs by concatenating all of them.

BUG=chromium:860623
TEST=make test

Change-Id: Ia76f9b99d1c4210e1481052b3bbf0c8a14ed3a49
Reviewed-on: https://chromium-review.googlesource.com/1139838
Commit-Ready: Yuan-Yao Sung <yysung@google.com>
Tested-by: Yuan-Yao Sung <yysung@google.com>
Reviewed-by: Yong Hong <yhong@google.com>

[add] https://crrev.com/1e650e4bbc7e243eda616a94f1ced345470c12bd/py/probe/functions/concat_unittest.py
[add] https://crrev.com/1e650e4bbc7e243eda616a94f1ced345470c12bd/py/probe/functions/concat.py

Project Member

Comment 2 by bugdroid1@chromium.org, Jul 31

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

commit 3eb8451723059cf4bab60214e579c80631c8c46a
Author: Yuan-Yao Sung <yysung@google.com>
Date: Tue Jul 31 23:37:13 2018

hwid: Convert probe statement for each project

Convert the HWID database and the generic probe statement into a
"project specific probe statement", which is expected to be more similar
to the probe statement from AVL.

BUG=chromium:860623
TEST=make test

Change-Id: I9864abb912959db4669bbcf09c37bc68227816ba
Reviewed-on: https://chromium-review.googlesource.com/1127915
Commit-Ready: Yuan-Yao Sung <yysung@google.com>
Tested-by: Yuan-Yao Sung <yysung@google.com>
Reviewed-by: Yong Hong <yhong@google.com>

[add] https://crrev.com/3eb8451723059cf4bab60214e579c80631c8c46a/py/hwid/v3/converter_unittest.py
[modify] https://crrev.com/3eb8451723059cf4bab60214e579c80631c8c46a/py/hwid/v3/default_probe_statement.json
[modify] https://crrev.com/3eb8451723059cf4bab60214e579c80631c8c46a/py/hwid/v3/probe.py
[add] https://crrev.com/3eb8451723059cf4bab60214e579c80631c8c46a/py/hwid/v3/testdata/test_converter_db.yaml
[add] https://crrev.com/3eb8451723059cf4bab60214e579c80631c8c46a/py/hwid/v3/converter.py
[modify] https://crrev.com/3eb8451723059cf4bab60214e579c80631c8c46a/py/hwid/v3/hwid_cmdline.py
[modify] https://crrev.com/3eb8451723059cf4bab60214e579c80631c8c46a/py/hwid/v3/common.py
[add] https://crrev.com/3eb8451723059cf4bab60214e579c80631c8c46a/py/hwid/v3/testdata/test_converter_result.json

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 1

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

commit c00987c7c87a662ba7b937bebd8bd2666c3828f3
Author: Yuan-Yao Sung <yysung@google.com>
Date: Wed Aug 01 21:52:27 2018

hwid: Use name from probed results to generate BOM list

Use component name from converted probed results to
generate the BOM list.

BUG=chromium:860623
TEST=make test

Change-Id: Iba2e6659125e1059a60cbd2112b11c2e05b2e76b
Reviewed-on: https://chromium-review.googlesource.com/1149676
Commit-Ready: Yuan-Yao Sung <yysung@google.com>
Tested-by: Yuan-Yao Sung <yysung@google.com>
Reviewed-by: Yong Hong <yhong@google.com>

[modify] https://crrev.com/c00987c7c87a662ba7b937bebd8bd2666c3828f3/py/hwid/v3/probe_unittest.py
[modify] https://crrev.com/c00987c7c87a662ba7b937bebd8bd2666c3828f3/py/hwid/v3/hwid_cmdline.py
[modify] https://crrev.com/c00987c7c87a662ba7b937bebd8bd2666c3828f3/py/hwid/v3/hwid_cmdline_unittest.py
[modify] https://crrev.com/c00987c7c87a662ba7b937bebd8bd2666c3828f3/py/hwid/v3/hwid_utils.py
[modify] https://crrev.com/c00987c7c87a662ba7b937bebd8bd2666c3828f3/py/hwid/v3/probe.py

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 14

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

commit 9a855820b5d8e6fcef4bfcaaa243d94b6539be7b
Author: yysung <yysung@google.com>
Date: Tue Aug 14 12:55:33 2018

i18n: Add chinese translation for verify component test

Since a new pytest was added, po/zh-CN.po should be regenerated and
translated. Also translate the table header in verify component test.

BUG=chromium:860623
TEST=make test

Change-Id: Ia876743657466fd43a666a6c682ecae9ba36d313
Reviewed-on: https://chromium-review.googlesource.com/1172302
Commit-Ready: Yuan-Yao Sung <yysung@google.com>
Tested-by: Yuan-Yao Sung <yysung@google.com>
Reviewed-by: Cheng-Han Yang <chenghan@chromium.org>

[modify] https://crrev.com/9a855820b5d8e6fcef4bfcaaa243d94b6539be7b/po/zh-CN.po
[modify] https://crrev.com/9a855820b5d8e6fcef4bfcaaa243d94b6539be7b/py/test/pytests/verify_component_static/verify_component.html

Status: Started (was: Untriaged)
Project Member

Comment 7 by bugdroid1@chromium.org, Aug 16

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

commit 2af49478c80e839994a9c2928af2137776c07122
Author: Yuan-Yao Sung <yysung@google.com>
Date: Thu Aug 16 07:30:09 2018

hwid: Checksum of converted probe statement file

Add --output-checksum argument to hwid converter. It would
compute sha1 checksum of converted probe statement file and
write to the checksum file. Add checksum verification in
verify component test.

BUG=chromium:860623
TEST=manually run on device

Change-Id: Ic2a62cbbdbfcfefaa6cfce22756200b2c5c6b6ad
Reviewed-on: https://chromium-review.googlesource.com/1164155
Commit-Ready: Yuan-Yao Sung <yysung@google.com>
Tested-by: Yuan-Yao Sung <yysung@google.com>
Reviewed-by: Yong Hong <yhong@google.com>

[modify] https://crrev.com/2af49478c80e839994a9c2928af2137776c07122/py/hwid/v3/hwid_cmdline.py
[modify] https://crrev.com/2af49478c80e839994a9c2928af2137776c07122/py/test/pytests/verify_component.py

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 29

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

commit 1bd17a4f54812840c13f240804bc1e0dd7f8b659
Author: Yuan-Yao Sung <yysung@google.com>
Date: Wed Aug 29 13:27:17 2018

probe: Cache probed results of `vpd` function.

This CL revises the function `vpd` to have the caching
mechanism and adds `CleanCachedData` function to
`LazyCachedProbeFunction` for unittesting.
Since there are 60 `vpd` function calls when running
`probe probe` with converted probe statement, we can
use caching mechanism to get about 2.45 times faster
than before.

BUG=chromium:860623
TEST=make test

Change-Id: I53be7178e87b8c3de6740913a1c7d335407623ea
Reviewed-on: https://chromium-review.googlesource.com/1189531
Commit-Ready: Yuan-Yao Sung <yysung@google.com>
Tested-by: Yuan-Yao Sung <yysung@google.com>
Reviewed-by: Yong Hong <yhong@google.com>

[modify] https://crrev.com/1bd17a4f54812840c13f240804bc1e0dd7f8b659/py/probe/functions/vpd_unittest.py
[modify] https://crrev.com/1bd17a4f54812840c13f240804bc1e0dd7f8b659/py/probe/functions/vpd.py
[modify] https://crrev.com/1bd17a4f54812840c13f240804bc1e0dd7f8b659/py/probe/lib/cached_probe_function.py

Sign in to add a comment