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

Issue 794260 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Create an autotest for peer to peer autoupdate

Project Member Reported by dhadd...@chromium.org, Dec 12 2017

Issue description

Testing a peer to peer (P2P) update is quite a time consuming manual task that the test team performs every milestone.  

It requires things like:
-manually setting up two or more DUTs to the correct image
-ensuring they can ping each other and putting them on the same network if not
-enabling P2P
-updating one device
-updating a second via P2P
-checking logs. 

I learned that we can have autotest use two DUTs by setting the SYNC_COUNT variable to be >1. 


 

Comment 1 by dchan@chromium.org, Dec 12 2017

Cc: -dchan@chromium.org ka...@chromium.org harpreet@chromium.org rjahagir@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/67d431ca745e8ae9a949d229b1350d79f8363a72

commit 67d431ca745e8ae9a949d229b1350d79f8363a72
Author: David Haddock <dhaddock@chromium.org>
Date: Wed Dec 13 08:32:22 2017

[autotest] Some small AU refactoring before P2P autotest.

This does two things:
1. Moves the staging payload code to the base test class
2. Allows increases to number of updates a devserver instance can handle
because the P2P test will update two DUTs.

BUG= chromium:794260 
TEST=test_that <IP> autoupdate_EndToEndTest still passes
TEST=test_that <ip> autoupdate_ForcedOOBEUpdate still passes

Change-Id: I091e18f00220786502441cba35d793dc3f506339
Reviewed-on: https://chromium-review.googlesource.com/822981
Commit-Ready: David Haddock <dhaddock@chromium.org>
Tested-by: David Haddock <dhaddock@chromium.org>
Reviewed-by: Harpreet Grewal <harpreet@chromium.org>
Reviewed-by: Ruchi Jahagirdar <rjahagir@chromium.org>

[modify] https://crrev.com/67d431ca745e8ae9a949d229b1350d79f8363a72/server/site_tests/autoupdate_EndToEndTest/autoupdate_EndToEndTest.py
[modify] https://crrev.com/67d431ca745e8ae9a949d229b1350d79f8363a72/server/cros/update_engine/omaha_devserver.py
[modify] https://crrev.com/67d431ca745e8ae9a949d229b1350d79f8363a72/server/cros/update_engine/update_engine_test.py

Project Member

Comment 3 by bugdroid1@chromium.org, Dec 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/76a4c8880c98f991d2c631083adb018120d74bf0

commit 76a4c8880c98f991d2c631083adb018120d74bf0
Author: David Haddock <dhaddock@chromium.org>
Date: Fri Dec 15 23:52:48 2017

[autotest] Allow autoupdater.py to handle non interactive updates.

BUG= chromium:794260 
TEST=autoupdate_Rollback still passes

Change-Id: Ibe2714d97468089590ae19ca6beda63b8383344a
Reviewed-on: https://chromium-review.googlesource.com/826171
Commit-Ready: David Haddock <dhaddock@chromium.org>
Tested-by: David Haddock <dhaddock@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[modify] https://crrev.com/76a4c8880c98f991d2c631083adb018120d74bf0/client/common_lib/cros/autoupdater.py

Project Member

Comment 4 by bugdroid1@chromium.org, Dec 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/368126f48cd1e0e8cd18842fd5e3bad9c6e2d089

commit 368126f48cd1e0e8cd18842fd5e3bad9c6e2d089
Author: David Haddock <dhaddock@chromium.org>
Date: Fri Dec 22 04:32:58 2017

Add autoupdate_P2P to autotest-server-tests-9999 ebuild.

CQ-DEPEND=CL:823279
BUG= chromium:794260 
TEST=None

Change-Id: I7f7f977c01712f4071db772e60ef86dec5840c21

[modify] https://crrev.com/368126f48cd1e0e8cd18842fd5e3bad9c6e2d089/chromeos-base/autotest-server-tests/autotest-server-tests-9999.ebuild

Project Member

Comment 5 by bugdroid1@chromium.org, Dec 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/6615f698f0e20fd50805dc4cc90e9a80f273147b

commit 6615f698f0e20fd50805dc4cc90e9a80f273147b
Author: David Haddock <dhaddock@chromium.org>
Date: Fri Dec 22 04:32:57 2017

[autotest] Add a test for a peer to peer (P2P) autoupdate.

This test will update one DUT normally and then update a second DUT via
p2p from the first DUT.

It uses the SYNC_COUNT > 1 mechanism to get the lab to provision and
schedule two DUTs for the test.

I've added two control files: one for running at your desk and another
to be used by the lab.

BUG= chromium:794260 
TEST=test_that <ip> autoupdate_P2P.local
TEST=No idea how to test the sync_count part without just submitting it.
Change-Id: I977bde7a2271bcb56b50539874e9744026bffad7

[add] https://crrev.com/6615f698f0e20fd50805dc4cc90e9a80f273147b/server/site_tests/autoupdate_P2P/autoupdate_P2P.py
[add] https://crrev.com/6615f698f0e20fd50805dc4cc90e9a80f273147b/server/site_tests/autoupdate_P2P/control
[add] https://crrev.com/6615f698f0e20fd50805dc4cc90e9a80f273147b/server/site_tests/autoupdate_P2P/control.local

Project Member

Comment 6 by bugdroid1@chromium.org, Jan 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/a6e4775d68fb804b5e8e853d66725308b27da8b3

commit a6e4775d68fb804b5e8e853d66725308b27da8b3
Author: David Haddock <dhaddock@chromium.org>
Date: Sat Jan 06 00:42:51 2018

[autotest] Fix failing P2P AU tests.

This test uses two DUTs and I do not know how to test it exactly as the
lab does. I missed a bug where the ntuple code returns a list of
machines instead of the list of host objects I had assumed.

The test currently crashes at the first instance where it tries to get
the host to run any command.

BUG= chromium:794260 
TEST=Hacked the local control file to use a list of machines and tested
creating hosts from them before running the test.

Change-Id: I9beebaf2d4ca550e49822a9c653e1717f4aa9de1
Reviewed-on: https://chromium-review.googlesource.com/852801
Commit-Ready: David Haddock <dhaddock@chromium.org>
Tested-by: David Haddock <dhaddock@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>

[modify] https://crrev.com/a6e4775d68fb804b5e8e853d66725308b27da8b3/server/site_tests/autoupdate_P2P/autoupdate_P2P.py
[modify] https://crrev.com/a6e4775d68fb804b5e8e853d66725308b27da8b3/server/site_tests/autoupdate_P2P/control

Status: Fixed (was: Assigned)
Woot! the test is now (mostly) passing:
https://stainless.corp.google.com/search?test=%5Eautoupdate%5C_P2P%24&exclude_non_release=true&exclude_cts=true&col=build&row=board&view=matrix&first_date=20180102&last_date=20180108

I will follow up with fixes for remaining failures in separate bugs. 
Status: Verified (was: Fixed)

Sign in to add a comment