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

Issue 680452 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

[Factory] Allow any CC pins to be the first test in raiden_cc_flip_check with DummyDolphinBFTFixture

Project Member Reported by marcochen@chromium.org, Jan 12 2017

Issue description

This case considers the case of no Plankton board support first.

Currently raiden_cc_flip_check will start from CC1 so operator needs to make sure this or he/her needs to re-plug in again with right direction. Therefore it introduces the wasted time.

Actually operator doesn't know what direction of connector is correct so can't guarantee the CC1 pin in the first plugging. And actually this fixed sequence from CC1 to CC2 is no meaningful for the test.

Proposal: 
  1. Allow operator to plug in usb type-c connector in any direction then do tests for CC pin X
  2. Ask to flip then check whether the CC pin is not X
  3. do tests for CC pin not X
 
Just checked the code.
Let DummyDolphinBFTFixture.IsDoubleCCCable() returns True solves this problem.



If you mentioned about [1] then I would say that is a hacky way to just skip the check by existed variable and will confuse the reader later about what actually DoubleCCCable mean.
  1. When IsDoubleCCable is true, it means the physical cable is really customized for not breaking a certain CC pin. But actually it will be not.
  2. Once a reader saw sample code about IsDoubleCCCable returned true, he/her might take a real DoubleCCCable to do test. This will have problem because without Plankton board to cut off one CC pin, both of them will be with voltage and it violates the USB spec.

Proposed solution:
  Actually there is no necessary to consider original_enabled_cc [2]. We just need to use pytest of raiden_cc_flip_check for making sure operator really flip the cable and that is all (no matter what the original pin should be)

  Example test flow:
    5V Charging test -> 20V charging test (until here we checked CC X pin) -> raiden_cc_flip_check (making sure we flip to CC Y pin) -> 5V Charging test -> 20 charging Test (now CC Y pin is tested as well.)

[1] https://chromium.googlesource.com/chromiumos/platform/factory/+/factory-oak-8182.B/py/test/pytests/raiden_cc_flip_check.py#181
[2] https://chromium.googlesource.com/chromiumos/platform/factory/+/factory-oak-8182.B/py/test/pytests/raiden_cc_flip_check.py#180
I tried to find out what is the usage of original_enabled_cc and the result is

  raiden_cc_flip_check is not only used to really ask for flipping but also used to just check whether current active CC pin is the original_enabled_cc or not. In this case, ask_flip_operation is false (with no double cc support of course.).

  Example test flow:
    raiden_cc_flip_check with "ask_flip_operation=false" (this makes sure we are on the CC1 now) -> test... -> raiden_cc_flip_check with "ask_flip_operation=true" (this makes sure we are on the CC2 now).
Project Member

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

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

commit 5e7bbdfc461007d8b504c0f76de161b488351693
Author: Marco Chen <marcochen@chromium.org>
Date: Mon Jan 16 05:46:42 2017

raiden_cc_flip_check: Allow to start from any polarity.

Currently when ask_flip_operation is True, the test will check whether current
CC pin is CC1 or CC2 which is set as original_enabled_cc. What if we don't care
what CC pin now is and just would like to flip the calbe. The new value - None
of orignal_enabled_cc is added for this purpose.

BUG= chromium:680452 
TEST=manual

Change-Id: I637e1f943cddfe173dbb51f303cff30b82796ceb
Reviewed-on: https://chromium-review.googlesource.com/428533
Commit-Ready: Marco Chen <marcochen@chromium.org>
Tested-by: Marco Chen <marcochen@chromium.org>
Reviewed-by: Pin-chih Lin <johnylin@chromium.org>

[modify] https://crrev.com/5e7bbdfc461007d8b504c0f76de161b488351693/py/test/pytests/raiden_cc_flip_check.py

Status: Fixed (was: Untriaged)
Project Member

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

Labels: merge-merged-factory-glados-7828.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/8b7f9d9cffd7aa7222133f39416e935fe5350d35

commit 8b7f9d9cffd7aa7222133f39416e935fe5350d35
Author: Marco Chen <marcochen@chromium.org>
Date: Mon Jan 16 05:46:42 2017

raiden_cc_flip_check: Allow to start from any polarity.

Currently when ask_flip_operation is True, the test will check whether current
CC pin is CC1 or CC2 which is set as original_enabled_cc. What if we don't care
what CC pin now is and just would like to flip the calbe. The new value - None
of orignal_enabled_cc is added for this purpose.

BUG= chromium:680452 
TEST=manual

Change-Id: I637e1f943cddfe173dbb51f303cff30b82796ceb
Reviewed-on: https://chromium-review.googlesource.com/428533
Commit-Ready: Marco Chen <marcochen@chromium.org>
Tested-by: Marco Chen <marcochen@chromium.org>
Reviewed-by: Pin-chih Lin <johnylin@chromium.org>
(cherry picked from commit 5e7bbdfc461007d8b504c0f76de161b488351693)
Reviewed-on: https://chromium-review.googlesource.com/428481
Reviewed-by: Shun-Hsing Ou <shunhsingou@chromium.org>
Commit-Queue: Marco Chen <marcochen@chromium.org>

[modify] https://crrev.com/8b7f9d9cffd7aa7222133f39416e935fe5350d35/py/test/pytests/raiden_cc_flip_check.py

Comment 7 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 8 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 9 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 11 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment