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

Issue 692021 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 0
Type: Bug



Sign in to add a comment

'hwid verify' does not check components

Project Member Reported by phoenixshen@chromium.org, Feb 14 2017

Issue description

VerifyProbeResult in py/hwid/v3/common.py incorrectly iterates through a list of field names, and check if it is probeable (obviously not if field name not equal to component name). The result is everything is not probeable, and verification is skipped.


What steps will reproduce the problem?

(1)
# hwid generate --no-verify-checksum -p . --probed-results-file probe_electro.txt --phase DVT                                                                                   
Encoded HWID string: REEF A2A-E6B
Binary HWID string: 0000000000000001

(2)
# hwid verify -p . --no-verify-checksum --probed-results-file probe_basking.txt 'REEF A2A-E6B' --phase DVT

HWID db and probe files are attached.

What is the expected result?
Missing component.

What happens instead?
Verification passed.


Please use labels and text to provide additional information.


For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 
probe_electro.txt
335 bytes View Download
probe_basking.txt
334 bytes View Download
REEF
501 bytes View Download

Comment 1 by hungte@chromium.org, Feb 14 2017

Cc: stimim@chromium.org
Labels: -Pri-3 Pri-0
Owner: akahuang@chromium.org
Status: Assigned (was: Untriaged)
https://chromium-review.googlesource.com/#/c/397202/

-    for comp_cls in self.database.components.GetRequiredComponents():
+    # We only verify the components listed in the pattern.
+    for comp_cls in self.database.pattern.GetFieldNames(self.bom.image_id):

Should that be

for field in self.database.pattern.GetFieldNames(self.bom.image_id):
  comp_cls = self.database.encoded_fields[field] .. ?
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 15 2017

Labels: merge-merged-factory-reef-8811.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/186fdae7bf9f38bbbd011b580ad51ff9edfd4b43

commit 186fdae7bf9f38bbbd011b580ad51ff9edfd4b43
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Feb 15 07:15:12 2017

hwid: fix "hwid verify" does not check component.

When we verify the component, we should get the active encoded_fields
from the patterns, and lookup the components from corresponding
encoded_fields.

BUG= chromium:692021 
TEST=all unittest in py/hwid/v3

Change-Id: I096f456c8c8285e084473ea06eac85855d7ad7cd
Reviewed-on: https://chromium-review.googlesource.com/442967
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>

[modify] https://crrev.com/186fdae7bf9f38bbbd011b580ad51ff9edfd4b43/py/hwid/v3/database.py
[modify] https://crrev.com/186fdae7bf9f38bbbd011b580ad51ff9edfd4b43/py/hwid/v3/common.py
[modify] https://crrev.com/186fdae7bf9f38bbbd011b580ad51ff9edfd4b43/py/hwid/v3/hwid_utils_unittest.py
[modify] https://crrev.com/186fdae7bf9f38bbbd011b580ad51ff9edfd4b43/py/hwid/v3/testdata/TEST_BOARD

Project Member

Comment 3 by sheriffbot@chromium.org, Feb 28 2017

Pri-0 bugs are critical regressions or serious emergencies, and this bug has not been updated in three days. Could you please provide an update, or adjust the priority to a more appropriate level if applicable?

If a fix is in active development, please set the status to Started.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Verified (was: Assigned)

Sign in to add a comment