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

Issue 707200 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Testlog can't get the correct serial numbers

Project Member Reported by chuntsen@chromium.org, Mar 31 2017

Issue description

Testlog can't get the correct serial numbers from device.
 
Cc: hungte@chromium.org stimim@chromium.org

Comment 2 by hungte@chromium.org, Mar 31 2017

Cc: kitching@chromium.org
Hi chuntsen, can you write a more complete description of this issue? Including
 - How this can be reproduced
 - Why this occurs (root cause)
 - Possible solutions
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 6 2017

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

commit 078e3e18b0f8e2a6f0f78c9969863d2bf759aa1b
Author: chuntsen <chuntsen@google.com>
Date: Thu Apr 06 02:18:09 2017

device: Fix serial number in testlog not updated after scan

When the device serial number is scanned (by a pytest) and updated into
device data, the serial numbers in testlog was not updated (keeping NULL
if it has never assigned SN yet).

The reason is that invocation, inside Goofy, uses same DUT instance and
already cached. Invocation calls GetAllSerialNumbers which always
returning a new dict, but the underlying data, serial_number and
mlb_serial_number, are still cached by InfoProperty.

As a temporary solution, we change GetAllSerialNumbers do call functions
instead of reading InfoProperties.

BUG= chromium:707200 
TEST=Tried on DUT, and could update SN

Change-Id: I5ee8c656e6e3d06c2e4114fc259be1c51ccdbb6d
Reviewed-on: https://chromium-review.googlesource.com/464806
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Chun-Tsen Kuo <chuntsen@chromium.org>
Commit-Queue: Chun-Tsen Kuo <chuntsen@chromium.org>

[modify] https://crrev.com/078e3e18b0f8e2a6f0f78c9969863d2bf759aa1b/py/device/info.py

Reproduce:
GetAllSerialNumbers() in device/info.py is called before HandleScanValue() in scan/scan.py

Why:
If GetAllSerialNumbers() in device/info.py is called before HandleScanValue() in scan/scan.py, SNs will be cached as Nones because of InfoProperty. So SNs will always be Nones.

Temporary solution:
Change GetAllSerialNumbers do call functions instead of reading InfoProperties.

Possible solution:
Call Overrides() in device/info.py to override caches in the end of some functions will change SNs.

Comment 5 by hungte@chromium.org, May 19 2017

Per stimim's presentation yesterday , I think we want to change these to a way that

- Serial number should be stored in state, something like serial_numbers
- Goofy and testlog should read from state.serial_numbers
- Individual tests can feed different SNs to state.serial_numbers
- dut.info should not put serial_number implementations, or
  have a cache-able serial_number maps to state.serial_numbers
- Only pytests can call dut.info because it may be cached. Goofy should not use it if SN may be changed.
Project Member

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

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

commit 45f1deceec0111e90418052dc7cc400f442dad80
Author: Chih-Yu Huang <akahuang@google.com>
Date: Mon Jun 12 08:23:36 2017

Workaround: rf_graphyte: get DUT serial number from VPD.

BUG= chromium:707200 
TEST=manually test

Change-Id: If2811001cfea21324d95e62d63d30ecd427fd4f2
Reviewed-on: https://chromium-review.googlesource.com/530605
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Shen-En Shih <petershih@chromium.org>

[modify] https://crrev.com/45f1deceec0111e90418052dc7cc400f442dad80/py/test/pytests/rf_graphyte/rf_graphyte.py

Comment 7 by hungte@chromium.org, Jul 26 2017

Cc: -kitching@chromium.org -hungte@chromium.org -stimim@chromium.org chromeos-factory-eng@google.com
chuntsen, can you review what still needs to be done?

Comment 8 by hungte@chromium.org, Sep 26 2017

Do we have anything left?
Status: Fixed (was: Assigned)
I think everything is done.

Sign in to add a comment