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

Issue 678690 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

factory: HWID DB builder improvements & bugs

Project Member Reported by hungte@chromium.org, Jan 5 2017

Issue description

Background: during Eve build, we took the chance to try HWID DB builder -- which is pretty good and helps us to create the HWID file from scratch in a very short time.

However, we do have seen few issues:

1. storage probe result will create a \n in compact_str like
    compact_str: 'MMC XXXXXX 0x0 0x0100 0x000015 150100XXXXXXXXXXXX0XXXXXXXXXXX00
      0x4 #24XXXXXX8'
   well, technically this is a probe.py bug.

2. HWID db will add compact_str, even if the dict style values exist.
   I think we should (1) don't put compact_str in HWID file if there are other values, and
   (2) fix probe so every component would have at least one non-compact-str value
   And in future we can deprecate compact_str.

3. most components start to encode with 0 bits. These are non-zero bit fields in my
   result:
  - region_field: 8
  - firmware_keys_field: 3
  - board_version_field: 3
  - ro_main_firmware_field: 3
  - ro_ec_firmware_field: 3
  - storage_field: 1
  - cpu_field: 1

  However, it's slightly weird that it's not really mapped to 5-3-5 fields.
  Was that because I didn't have customization_id in VPD?
  I think we should always reserve 5 bits for it after region_field.

  In fact, I'd recommend to always preserve following fields with given order:

 [- image_id: 5]
  - board_version_field: 3
  - region_field: 5

  - customization_id: 5
  - firmware_keys_field: 3
  - ro_main_firmware: 3
  - ro_ec_firmware: 2

  - cpu_field: 3 
  - dram_field: 2
  - storage_field: 3

BTW, do we already have the way to write "version checking rules" for getting firmware version?
Can we write in HWID evaluate function, or using the new probing language?   
  
 
also, according to proposal "Components in ChromeOS HWID", we should remove following components:
     - chipset (only makes sense on x86 as chipset)
     - display_converter (HDMI converter, only on ZGB era, deprecated by Type-C)
     - power_mgmt_chip (only on Spring, deprecated by Type-C)
     - vga (most Chromebooks are all using SOC today)
Hmmm, not all Chromebooks would have EC, and we probably will remove ro_main_fw in future, so we should migrate the table to:

 [- image_id: 5]
  - board_version_field: 3
  - region_field: 5

  - customization_id: 5
  - firmware_keys_field: 3
  - cpu_field: 5

  - storage_field: 5
  - dram_field: 3
  - ro_main_firmware: 3 
  - ro_ec_firmware: 2

Re #1.

Reply 3: "not really mapped to 5-3-5 fields"
I only let important fields to follow the 5-3-5 rule, including region and customization_id currently. I can add the fields you list into the important fields.
But if I map the rule to all fields, the length of the HWID string will increase really fast. So I think we can ignore the rule for the unimportant fields.

Re#3 I thought in DefaultBitSize you do try to keep the fields 5-3-5 ?

Anyway, I think we definitely will have multiple firmware keys (dev, premp, mp, and more if the device has LOEM / zerg), so we should add firmware_keys_field a 3-bit one.

Most Chromebooks have multiple cpu, storage, and dram, so it's fine to give them 5/5/3.

For the firmware: I'm sure we'll have more then 1, but since in the future we may move them to "checking rules", fine with not having default bits for them.

Now, region & customization are virtual fields so you'll handle them explicitly.
Firmware_keys is almost platform independent so almost all chromebooks will have it. No problem. 
Board_version was supported only on modern systems so I wonder if we should list it explicitly, even if probe founds nothing (or let probe to always return something, for example 'UNKNOWN' if not found).

So... maybe we do need an explicit list on "default (initial) fields".

BTW I changed my mind again. Let's make them

 [- image_id: 5]
  - board_version_field: 3
  - region_field: 5

  - customization_id: 5
  - cpu_field: 3
  - storage_field: 5

  - dram_field: 5
---------------------------------------------- Fields above: always create & preserve, even if they don't exist in probe values.
  - firmware_keys_field: 3
  - ro_main_firmware: 3 
  - ro_ec_firmware: 2
---------------------------------------------- Fields above: add in order if they exist, and give right fields. Can skip if they are not in probe results.


And one more thing, currently the HWID config file does not help people recognizing 5-3-5. Can you group them and and blank line between the 5-3-5 groups?

Comment 5 by hungte@chromium.org, Jan 10 2017

One more bug found.

If a new field was added, builder will say "enable XXX_field" and try to start a new image pattern.

However, "adding new field" does not need new pattern - we can simply add that before the location of last non-zero-bit field. HWID v3 was designed to accept additional fields.
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 11 2017

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

commit 096c1b8306c56790022a38183f3708117136424a
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Jan 05 19:08:11 2017

gooftool: Remove components not in AVL.

There are few components not in AVL and won't help us even if they live
in HWID:
 - chipset (only makes sense on x86 as chipset)
 - display_converter (HDMI converter, only on ZGB era, deprecated by Type-C)
 - power_mgmt_chip (only on Spring, deprecated by Type-C)
 - vga (most Chromebooks are all using SOC today)

BUG= chromium:678690 
TEST=make test

Change-Id: I2b56edc0a94da494574dd4094eee74bf69dbede4
Reviewed-on: https://chromium-review.googlesource.com/425470
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@google.com>

[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/testdata/new_test_probe_result_hwid_utils.yaml
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/tools/testdata/hwid_v3_bundle_X86-GENERIC.sh
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/testdata/test_db.yaml
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/testdata/test_probe_result_hwid_utils.yaml
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/shopfloor/testdata/DEVICE
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/hwid_utils_unittest.py
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/factory_flow/templates/FAKE_HWID
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v2/hwid_unittest.py
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/gooftool/probe.py
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/testdata/test_db_wrong_checksum_field.yaml
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/test/test_lists/generic_smt.py
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/testdata/test_db_builder.yaml
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/testdata/TEST_BOARD
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/gooftool/testdata/test_data.yaml
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/gooftool/testdata/component_db
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/testdata/test_probe_result.yaml
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/database_unittest.py
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/gooftool/testdata/BENDER
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/builder_unittest.py
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/gooftool/gooftool_unittest.py
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/decoder_unittest.py
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/testdata/NEW_TEST_BOARD
[modify] https://crrev.com/096c1b8306c56790022a38183f3708117136424a/py/hwid/v3/testdata/test_db_no_checksum.yaml

Comment 7 by hungte@chromium.org, Jan 11 2017

Regarding the issue "compact_str has \n', that looks like YAML's internal format and it'll truncate long strings.

Ideally YAML will remove the \n and leading spaces on next line, but for some reason our hwid builder will still generate a very long name with \n.

Anyway this should not happen again since we've removed cid.

Comment 8 by hungte@chromium.org, Jan 11 2017

BTW I think we probably want to rename board_version to board, and set its values to
 version: rev1
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 11 2017

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

commit 2878bbfe2f7cbdccc78f421a2793a295549bbf64
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Jan 05 20:10:59 2017

gooftool: Add 'name' to components with only compact_str.

We are going to deprecate compact_str in the future, so fields with only
compact_str should be named with some more descriptive key name.

BUG= chromium:678690 
TEST=make test

Change-Id: Iacdc74431cc16f1f3c4de35587f8f0387785772f
Reviewed-on: https://chromium-review.googlesource.com/425637
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@google.com>

[modify] https://crrev.com/2878bbfe2f7cbdccc78f421a2793a295549bbf64/py/gooftool/probe.py

Project Member

Comment 10 by bugdroid1@chromium.org, Jan 11 2017

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

commit 00993ae196078e8836c5f0816e270ff278796726
Author: Hung-Te Lin <hungte@chromium.org>
Date: Sat Jan 07 08:56:41 2017

hwid: Try to prevent using 'compact_str' in HWID builder.

HWID v3 config file supports dict values so we should abandon
compact_str.

BUG= chromium:678690 
TEST=make test

Change-Id: I91c810b96cd53ad9661d99a3d5c6c7848fcec978
Reviewed-on: https://chromium-review.googlesource.com/425737
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@google.com>

[modify] https://crrev.com/00993ae196078e8836c5f0816e270ff278796726/py/hwid/v3/builder.py

Re #5:

The reason to create new pattern while adding/deleting field is to avoid ambiguity. If we allow to add the new kind of field into pattern, we will decode the old HWID string to index 0 for the field. But actually we don't know if all old devices have the component what maps to index 0.

The detail is described here: https://docs.google.com/document/d/1Cxy9KJkysZTAPQzTTFJGSxVP37BSLVdVyE2nvRTwT2g/edit#heading=h.q2cweossgusl

So the standard way to generate HWID config file in my original thought is:
1. Confirm the categories of the components that should be encoded into HWID.
2. Generate the probe result by "gooftool probe"
3. Check if there are missing components in the probe result. If so, fill a default item first (replacement of placeholder)
4. Create the HWID with the argument "--add-default-comp"

If we cannot confirm the set of encoded components before build, or forgot to add them, we still can add the new field with new pattern. 


But consider the scenario of proto build, creating new pattern seems too heavy. I think we can add a "--force" argument to append the new component into the same pattern if the user is sure that **all old devices have the same kind of this component**.
Re#11: Thanks, I agree maybe adding an option with good error message (tell people why they see this error, what they should check and how to add option) is the proper solution.
Project Member

Comment 13 by bugdroid1@chromium.org, Jan 19 2017

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

commit ff5d88f7b4531f7e3039533cdb9bcd1f721a9096
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Jan 18 06:57:09 2017

hwid builder: allow to add extra field into the pattern.

Originally we do not allow to add extra field into the pattern because
it would cause ambiguity. After adding a new kind of field into the
pattern, we will decode the old HWID string to index 0 for the field,
but we don't know if all old devices have the component what maps to
index 0.

But in practice, we face the scenario in early build:
There is a component that cannot probed after the first HWID config
file is created, and there is no second source for this component.
In this case, we can append the field into the pattern directly after
it can be probed.

BUG= chromium:678690 
TEST=make test

Change-Id: Ib5d4826b1e3a0b31879b77e749f41c1a6fcff573
Reviewed-on: https://chromium-review.googlesource.com/429750
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/ff5d88f7b4531f7e3039533cdb9bcd1f721a9096/py/hwid/v3/builder_unittest.py
[modify] https://crrev.com/ff5d88f7b4531f7e3039533cdb9bcd1f721a9096/py/hwid/v3/builder.py
[modify] https://crrev.com/ff5d88f7b4531f7e3039533cdb9bcd1f721a9096/py/hwid/v3/hwid_utils_unittest.py
[modify] https://crrev.com/ff5d88f7b4531f7e3039533cdb9bcd1f721a9096/py/hwid/v3/hwid_utils.py

Comment 14 Deleted

Project Member

Comment 15 by bugdroid1@chromium.org, Jan 24 2017

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

commit f0677a0a1665461646f7ea64dc71d19d8d198c9e
Author: Chih-Yu Huang <akahuang@google.com>
Date: Thu Nov 10 06:53:28 2016

hwid: database builder supports to add null component.

We added a new argument "--add-null-comp" in database builder that
add a NULL item for the assigned component. Also rename "--add-comp"
to "--add-default-comp" to distinguish these two arguments.

BUG= chromium:678690 
TEST=make test

Change-Id: Ibcbe91d1d4d3ea5c72020e0e25ebdc4915553ac1
Reviewed-on: https://chromium-review.googlesource.com/409891
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Chih-Yu Huang <akahuang@chromium.org>

[modify] https://crrev.com/f0677a0a1665461646f7ea64dc71d19d8d198c9e/py/hwid/v3/builder_unittest.py
[modify] https://crrev.com/f0677a0a1665461646f7ea64dc71d19d8d198c9e/py/hwid/README.md
[modify] https://crrev.com/f0677a0a1665461646f7ea64dc71d19d8d198c9e/py/hwid/v3/hwid_utils.py
[modify] https://crrev.com/f0677a0a1665461646f7ea64dc71d19d8d198c9e/py/hwid/v3/testdata/test_builder_probe_results.yaml
[modify] https://crrev.com/f0677a0a1665461646f7ea64dc71d19d8d198c9e/py/hwid/v3/hwid_cmdline.py
[modify] https://crrev.com/f0677a0a1665461646f7ea64dc71d19d8d198c9e/py/hwid/v3/builder.py
[modify] https://crrev.com/f0677a0a1665461646f7ea64dc71d19d8d198c9e/py/hwid/v3/hwid_utils_unittest.py

Project Member

Comment 16 by bugdroid1@chromium.org, Jan 25 2017

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

commit ce7003af644202fa71f31481a9a2a184503c4580
Author: Chih-Yu Huang <akahuang@google.com>
Date: Wed Jan 18 09:54:23 2017

hwid: Set default initial encoded fields.

We list the important components and preserve the encoded field for
them.

The first group of fields are always created. We add a default item if
they don't exist in the probe result.
[- image_id: 5]
- board_version_field: 3
- region_field: 5
- customization_id: 5
- cpu_field: 3
- storage_field: 5
- dram_field: 5

The second group of field are added in order if they exist in the
probe result.
- firmware_keys_field: 3
- ro_main_firmware: 3
- ro_ec_firmware: 2

BUG= chromium:678690 
TEST=make test

Change-Id: Icc374ba33859719c3b839847fde86a81a37d7b17
Reviewed-on: https://chromium-review.googlesource.com/429970
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Chih-Yu Huang <akahuang@chromium.org>

[modify] https://crrev.com/ce7003af644202fa71f31481a9a2a184503c4580/py/hwid/v3/builder_unittest.py
[modify] https://crrev.com/ce7003af644202fa71f31481a9a2a184503c4580/py/hwid/v3/testdata/test_builder_probe_results.yaml
[modify] https://crrev.com/ce7003af644202fa71f31481a9a2a184503c4580/py/hwid/v3/builder.py
[modify] https://crrev.com/ce7003af644202fa71f31481a9a2a184503c4580/py/hwid/v3/testdata/test_db_builder.yaml
[modify] https://crrev.com/ce7003af644202fa71f31481a9a2a184503c4580/py/hwid/v3/hwid_utils_unittest.py

Project Member

Comment 17 by bugdroid1@chromium.org, Feb 6 2017

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

commit e5f32e3b2c9175285b61827dbeb8b48a4f68504f
Author: Chih-Yu Huang <akahuang@google.com>
Date: Mon Feb 06 07:43:36 2017

hwid: add use case in README.md.

We add the yaml file and the command for each use case, and use
gitiles syntax to add the table of content (TOC), and show the
difference of the yaml file by two-column layout.
Also we replace the word "transfer" by "convert" to describe the
action of replacing legacy style of region field.

BUG= chromium:678690 
TEST=none

Change-Id: Ibca21e802b6ec7e0aa0b5a4011cf06719b408993
Reviewed-on: https://chromium-review.googlesource.com/431545
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>

[modify] https://crrev.com/e5f32e3b2c9175285b61827dbeb8b48a4f68504f/py/hwid/v3/builder_unittest.py
[modify] https://crrev.com/e5f32e3b2c9175285b61827dbeb8b48a4f68504f/py/hwid/v3/testdata/test_db_builder.yaml
[modify] https://crrev.com/e5f32e3b2c9175285b61827dbeb8b48a4f68504f/py/hwid/README.md
[modify] https://crrev.com/e5f32e3b2c9175285b61827dbeb8b48a4f68504f/py/hwid/v3/builder.py

Project Member

Comment 18 by bugdroid1@chromium.org, Feb 10 2017

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

commit 61ce7e20990243818b973dc705be1d492b260960
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Feb 10 05:10:05 2017

gooftool: Remove components not in AVL.

There are few components not in AVL and won't help us even if they live
in HWID:
 - chipset (only makes sense on x86 as chipset)
 - display_converter (HDMI converter, only on ZGB era, deprecated by Type-C)
 - power_mgmt_chip (only on Spring, deprecated by Type-C)
 - vga (most Chromebooks are all using SOC today)

BUG= chromium:678690 
TEST=make test

Change-Id: I2b56edc0a94da494574dd4094eee74bf69dbede4
Reviewed-on: https://chromium-review.googlesource.com/425470
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@google.com>
Reviewed-on: https://chromium-review.googlesource.com/440709
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/61ce7e20990243818b973dc705be1d492b260960/py/factory_flow/templates/FAKE_HWID
[modify] https://crrev.com/61ce7e20990243818b973dc705be1d492b260960/py/test/test_lists/generic_smt.py
[modify] https://crrev.com/61ce7e20990243818b973dc705be1d492b260960/py/gooftool/gooftool_unittest.py
[modify] https://crrev.com/61ce7e20990243818b973dc705be1d492b260960/py/gooftool/testdata/test_data.yaml
[modify] https://crrev.com/61ce7e20990243818b973dc705be1d492b260960/py/gooftool/testdata/component_db
[modify] https://crrev.com/61ce7e20990243818b973dc705be1d492b260960/py/hwid/v2/hwid_unittest.py
[modify] https://crrev.com/61ce7e20990243818b973dc705be1d492b260960/py/gooftool/probe.py
[modify] https://crrev.com/61ce7e20990243818b973dc705be1d492b260960/py/tools/testdata/hwid_v3_bundle_X86-GENERIC.sh
[modify] https://crrev.com/61ce7e20990243818b973dc705be1d492b260960/py/shopfloor/testdata/DEVICE
[modify] https://crrev.com/61ce7e20990243818b973dc705be1d492b260960/py/gooftool/testdata/BENDER

Project Member

Comment 19 by bugdroid1@chromium.org, Feb 10 2017

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

commit b6b91d13b40dcc277dafba56f1311c8171a71d03
Author: Hung-Te Lin <hungte@chromium.org>
Date: Fri Feb 10 05:10:07 2017

gooftool: Add 'name' to components with only compact_str.

We are going to deprecate compact_str in the future, so fields with only
compact_str should be named with some more descriptive key name.

BUG= chromium:678690 
TEST=make test

Change-Id: Iacdc74431cc16f1f3c4de35587f8f0387785772f
Reviewed-on: https://chromium-review.googlesource.com/425637
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Youcheng Syu <youcheng@google.com>
Reviewed-on: https://chromium-review.googlesource.com/440710
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/b6b91d13b40dcc277dafba56f1311c8171a71d03/py/gooftool/probe.py

Project Member

Comment 20 by bugdroid1@chromium.org, Apr 14 2017

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

commit d6ae9e3a12c28cd3cf3d96a8abfe631eaf720584
Author: Chih-Yu Huang <akahuang@google.com>
Date: Fri Apr 14 16:30:28 2017

hwid: Change the method of handling name collision.

Originally, we add a underscore at the end if the name is conflicted
with existed component. So the names would be:

FOO
FOO_
FOO__
FOO___

The name is confusing. Now we added a suffix number if collision. It
becomes:

FOO
FOO_1
FOO_2
FOO_3

BUG= chromium:678690 
TEST=py/hwid/v3/builder_unittest.py

Change-Id: Ic6530aff00fba33ca7a4dad731b607a24bab9c5c
Reviewed-on: https://chromium-review.googlesource.com/474785
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yilun Lin <yllin@chromium.org>

[modify] https://crrev.com/d6ae9e3a12c28cd3cf3d96a8abfe631eaf720584/py/hwid/v3/builder_unittest.py
[modify] https://crrev.com/d6ae9e3a12c28cd3cf3d96a8abfe631eaf720584/py/hwid/v3/builder.py

Status: Verified (was: Assigned)
The issues are fixed and the DB builder is verified at one project. Closed this bug.
Project Member

Comment 22 by bugdroid1@chromium.org, Jun 6 2017

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

commit 99918ab4854742be5dfdd87a103e07ccee3287d5
Author: Chih-Yu Huang <akahuang@google.com>
Date: Tue Jun 06 12:15:55 2017

hwid: database builder chooses better component name.

We refine the naming of mainboard, firmware_keys, and dram in this CL.

BUG= chromium:678690 
TEST=py/hwid/v3/builder_unittest.py

Change-Id: I2f97d7d7eb4788c49113c1034441538892f68ace
Reviewed-on: https://chromium-review.googlesource.com/474784
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/99918ab4854742be5dfdd87a103e07ccee3287d5/py/hwid/v3/builder_unittest.py
[modify] https://crrev.com/99918ab4854742be5dfdd87a103e07ccee3287d5/py/hwid/v3/builder.py

Sign in to add a comment