New issue
Advanced search Search tips

Issue 825065 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

AU Backoff tests

Project Member Reported by dhadd...@chromium.org, Mar 23 2018

Issue description

We have 4 manual test cases related to "backoff" that I wanted to automate (Section 1.12):
https://testtracker.googleplex.com/testplans/details/450

But I found out that we specifically disable backoff on test images:
https://cs.corp.google.com/chromeos_public/src/aosp/system/update_engine/payload_state.cc?sq=package:%5Echromeos_(internal%7Cpublic)$&l=411

Amin, is this something that is covered in other automated tests or should we enable a way to get this tested in test images?

 
I think if you turn on back off logic for test images, it will make autotests life difficult and probably increases the times to update and likely timeouts. But it is just a theory and I have no proof that is the case. But, how about explicitly sending the backoffdisabled in the omaha response? I'm guessing if we want turn off the back offs for test images, then probably have to pass backoff disabled in all omaha responses for autotests, provisioning, cros flash, etc. right?

I don't see anywhere in the autotests anything about backups, so I'm assuming this is not auto tested.
Just to be sure... I was asking if backoff is tested in unittests or any other automation of update engine (rather than the python autotests) 

Yeh I agree turning backoff on generally for test images would be a bad idea.

What about a flag or preference that the backoff test could set? 


There are some backoff tests in unittests. But I don't think they thoroughly cover what the manual tests do.

By flag if you mean passing a flag through update_engine_client, that may not be possible because we don't want to add a new dbus and that might have security implications. But I think we can do something with prefs. autotests can set a pref like enable-backoff-for-test and if it was true, and it was a test image, then we turn on backoff. Let me know if you want me do the client side. But I don't think client needs any change other than check for the pref in that if condition.
Cool. Yeh if you can do the client change to look for the pref that would be great 
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/system/update_engine/+/ffb6d804bfeb671a793f781d17cd305499e83eef

commit ffb6d804bfeb671a793f781d17cd305499e83eef
Author: Amin Hassani <ahassani@chromium.org>
Date: Tue Apr 03 23:12:46 2018

update_engine: Do not ignore backoff on test/dev images

Currently we need to automatically try to test backoff scenarios, but the
backoff is disabled by default on test/dev images. This patch adds a check for a
new preference 'no-ignore-backoff' if the image was a non-official build. If the
preference does not exist, the default behavior is achieved, otherwise the
backoff is not being ignored.

BUG= chromium:825065 
TEST=unittest

Change-Id: I2fca7e343479274fc9125407d27a4ae84d543641
Reviewed-on: https://chromium-review.googlesource.com/988296
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: David Haddock <dhaddock@chromium.org>
Reviewed-by: Sen Jiang <senj@chromium.org>

[modify] https://crrev.com/ffb6d804bfeb671a793f781d17cd305499e83eef/payload_state.cc
[modify] https://crrev.com/ffb6d804bfeb671a793f781d17cd305499e83eef/common/constants.cc
[modify] https://crrev.com/ffb6d804bfeb671a793f781d17cd305499e83eef/common/constants.h

Cc: ahass...@chromium.org
Owner: dhadd...@chromium.org
Status: Assigned (was: Untriaged)
Summary: AU Backoff tests (was: AU Backoff tests not automatable )
Thanks!
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 18 2018

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

commit 11eef1a049e02099697d752dc958af0c3421a19d
Author: David Haddock <dhaddock@chromium.org>
Date: Wed Apr 18 11:29:55 2018

Add autoupdate_backoff to ebuild.

CQ-DEPEND=CL:1003769
BUG= chromium:825065 
TEST=autoupdate_OmahaResponse.backoff*

Change-Id: I5a664c0375f7b423cb2ebdf547fef33f1f907ca1
Reviewed-on: https://chromium-review.googlesource.com/1003764
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/11eef1a049e02099697d752dc958af0c3421a19d/chromeos-base/autotest-tests/autotest-tests-9999.ebuild

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 18 2018

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

commit b466b5ac0257582030d24ec3b0fb777f32983d63
Author: David Haddock <dhaddock@chromium.org>
Date: Wed Apr 18 11:29:53 2018

Add autotests for update_engine's backoff mechanism.

Dev team added the ability to test backoff (CL:988296) and this CL tests
this functionality.

In order to test backoff we start an update, then kill the network so it
fails. Then we try to update again with backoff enabled and disabled.

In this CL:
1. Add new entry to OmahaResponse for backoff
2. Added client test autoupdate_Backoff
3. Allowed the number of urls in nano_omaha_devserver to be
configurable so we can get to the backoff testing quicker (ie we only
wait for one url failure before backoff, instead of trying both).
4. Move some code from autoupdate_UrlSwitch to base class

BUG= chromium:825065 
TEST=autoupdate_ForcedOOBEUpdate, autoupdate_OmahaResponse.url_switch
TEST=autoupdate_OmahaResponse.backoff_enabled.full
TEST=autoupdate_OmahaResponse.backoff_disabled.full

Change-Id: Ib59a52008505efb2f468333795e64739a740bd1c
Reviewed-on: https://chromium-review.googlesource.com/1003769
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/b466b5ac0257582030d24ec3b0fb777f32983d63/server/cros/update_engine/update_engine_test.py
[modify] https://crrev.com/b466b5ac0257582030d24ec3b0fb777f32983d63/client/site_tests/autoupdate_UrlSwitch/autoupdate_UrlSwitch.py
[add] https://crrev.com/b466b5ac0257582030d24ec3b0fb777f32983d63/client/site_tests/autoupdate_Backoff/control
[add] https://crrev.com/b466b5ac0257582030d24ec3b0fb777f32983d63/server/site_tests/autoupdate_OmahaResponse/control.backoff_disabled.full
[modify] https://crrev.com/b466b5ac0257582030d24ec3b0fb777f32983d63/server/site_tests/autoupdate_OmahaResponse/control.local
[add] https://crrev.com/b466b5ac0257582030d24ec3b0fb777f32983d63/server/site_tests/autoupdate_OmahaResponse/control.backoff_enabled.full
[modify] https://crrev.com/b466b5ac0257582030d24ec3b0fb777f32983d63/server/site_tests/autoupdate_OmahaResponse/autoupdate_OmahaResponse.py
[add] https://crrev.com/b466b5ac0257582030d24ec3b0fb777f32983d63/client/site_tests/autoupdate_Backoff/autoupdate_Backoff.py
[modify] https://crrev.com/b466b5ac0257582030d24ec3b0fb777f32983d63/client/cros/update_engine/nano_omaha_devserver.py
[modify] https://crrev.com/b466b5ac0257582030d24ec3b0fb777f32983d63/client/cros/update_engine/update_engine_test.py

Sign in to add a comment