Currently, this is the default so this is a no-op,
But the default is changing to true.
Bug: 180375550
Test: Treehugger
Merged-In: I153e6f842e03a732bfa852b830e0f65050e9270f
Change-Id: I153e6f842e03a732bfa852b830e0f65050e9270f
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.
Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas. Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:
-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage
Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance. With this extensive
effort, we've now improved our coverage as follows:
-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage
This specific change is automatically generated by a script that
identifies relevant "include" directives.
Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Also move OverlayRemountedTest, RollbackTest
The test config takes longer than 15mins to run. Move it to a dedicated
group for running slow presubmit Test Mapping test.
Bug: 174654670
Bug: 174495337
Test: none
Change-Id: Ie134c5d171bd99cca908f316d03050001c22ac32
The original code is flawed in that `pm install-abandon` only abandons
the 1st session returned by `pm get-stagedsessions ...`.
1. move AbandonSessionsRule to be shared by multiple host tests
2. use AbandonSessionsRule to do the job
Bug: 160754072
Test: StagedInstallInternalTest
Change-Id: Ib7b32fbd7b1133ac6a8e6782234a4fe2c5a782bd
Merged-In: Ib7b32fbd7b1133ac6a8e6782234a4fe2c5a782bd
(cherry picked from commit 3ac333f2d2)
See b/160281947#comment2 for the analysis.
Let's clean up staged sessions to improve test isolation.
Bug: 160281947
Test: atest StagedRollbackTest
Change-Id: I3ad6317eaee3ffb4c6351c630460dd8f1d27e644
Merged-In: I3ad6317eaee3ffb4c6351c630460dd8f1d27e644
(cherry picked from commit be2c3fc558)
This CL passes the correct install user when creating sessions in
StagingManager and effectively reverts ag/6901350.
Add a test to ensure b/129397974 is not regressed as described in
b/158222747#comment11.
(Cherry-picked from 838dea54ca)
Fix: 129744602
Fix: 158222747
Test: atest MultiUserRollbackTest#testStagedRollback
Merged-In: I718992240aa76898ff9e4220ea6a769ee8cd61f5
Change-Id: I718992240aa76898ff9e4220ea6a769ee8cd61f5
This change handles the case of split APKs. All files starting with
"NetworkStack" will be returned as split APKs.
See b/159978937#comment6. NetworkStack is changed from a single APK to
split APKs. We need this change for install to succeed.
Bug: 159978937
Test: atest NetworkStagedRollbackTest
Change-Id: I20f5fee08ea208ba4dc7711d82a1718239c647c2
See comment#6.
Clean up rollbacks and test apps before and after running tests.
This ensure we are in a good and expected condition when running tests.
Bug: 154080003
Test: atest RollbackTest
Test: atest MultiUserRollbackTest
Test: atest NetworkStagedRollbackTest
Test: atest StagedRollbackTest
Change-Id: If10fc8865e644611f1cf6a9db9d6dca6c7f11aee
1. Document behavior changes due to ag/11475396
2. Test snapshots are deleted after restoration
See go/rollbackmanager-snapshot-deletion for more details.
Bug: 151805360
Test: atest StagedRollbackTest
Change-Id: Ia8993f82073a145889243bcefc74b6336bf71749
The test failed because it can't find the apk file for NetworkStack.
Let's include more names for search.
Bug: 154792230
Test: atest NetworkStagedRollbackTest
Change-Id: I0909e531fcd0e99fcedb8d07ba0be01f4e762914
The test failed because we failed to enable rollback for
ModuleMetadataGoogle which is not a module on AOSP builds.
Let's skip the test for builds which have no mainline modules
installed.
Bug: 152721401
Test: atest StagedRollbackTest
Change-Id: Iaf75dea5388e2a751a26f983a79924c4358d4833
See b/152840581#comment2 for the analysis.
1. call #waitForDeviceNotAvailable to wait for reboot reliably.
2. reduce watchdog timeout to 120s which works well for me and speeds up
the test.
Bug: 152840581
Test: atest StagedRollbackTest
Merged-In: Ibbc9998c74681b1b8fc29b90ea66406f39ae7443
Change-Id: Ic791fbc00c231a5f24751b36e99515cfad13b7e7
See b/152840581#comment2 for the analysis.
call #waitForDeviceNotAvailable to wait for reboot reliably.
Bug: 152840581
Test: atest NetworkStagedRollbackTest
Change-Id: Ibbc9998c74681b1b8fc29b90ea66406f39ae7443
See b/151890602#comment4.
If the assumption is true, we will see logs that the rollback for
testappA is exipred happens slightly after the call to #getAvailableRollbacks.
Also move assertions below so the test runs to the end and we have a
better picture for what happened during the test.
(Cherry-picked from eab998a9af)
Bug: 151890602
Test: m
Merged-In: I85adb8c3c5598ef4ce11550b51f22d1ce3c282a6
Change-Id: I85adb8c3c5598ef4ce11550b51f22d1ce3c282a6
It is possible to have multiple committed rollbacks which include the
same app.
Uninstalling an app will delete committed rollbacks which include
the app. However, there is a race condition between when the app is
uninstalled and when rollback manager deletes the rollback as is stated
here:
https://cs.corp.google.com/android/frameworks/base/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/RollbackTest.java?rcl=75dfeca3d40624b745f41155aa38bc5e3fa405fe&l=116
We hit the assertion in #getUniqueRollbackInfoForPackage when there are
multiple rollbacks including the same package which is caused by the
race condition above.
Let's rewrite the code by calling #hasRollbackInclude instead which will
not throw.
Also do some cleanup in the xml to improve the isolation of our tests.
Bug: 152271716
Test: atest RollbackTest
Change-Id: Iad3effe52db2a0d2d5e3914bcd08ed93926f3fd3
https://g3doc.corp.google.com/experiments/g3doc/mobile/phenotype/android/testing.md?cl=head#hermetic
Phenotype talks to a server to override the device config changes made
by the tests. Therefore, rollback expiration didn't happen as expected
and caused the test to fail.
We need to override the flags on our own during tests so the
device config values ('rollback_lifetime_in_millis' in this case)
won't be changed in an unexpected way.
Note this is the same fix as ag/10467568.
Bug: 151890602
Test: atest RollbackTest
Change-Id: Ie884e4807999d105f6224c46a39434e1f437ed1b
When tradefed fails to run a test, it will try to recover the device
which might lead to another reboot. This interferes with our test
flow which also involves reboot. See b/150749023#comment2 for more
details.
Let's rewrite the test to prevent auto-recovery of tradefed from kicking
in. Generally, it is a bad practice to depend our test flow on a failed
test due to reboot. We should call #waitForDeviceNotAvailable to wait
for reboot to happen and then call #waitForDeviceAvailable before
continuing next tests.
Bug: 150749023
Test: atest StagedRollbackTest#testBadApkOnly
Change-Id: Ia39630585c3b7344174a8c66d0a33f05a2d80cc7
Somehow rollbacks related to testappA are not cleaned before running the
test and cause test failures. See b/150653097#comment2 for more details.
Let's clean rollbacks manually to have a clean start.
Bug: 150653097
Test: atest MultiUserRollbackTest
Change-Id: I4eb126e193f76c821d26fc62115263b86066a215
https://g3doc.corp.google.com/experiments/g3doc/mobile/phenotype/android/testing.md?cl=head#hermetic
Phenotype talks to a server to override the device config changes made
by the tests. Therefore, watchdog timeout didn't happen as expected and
caused tests to fail.
We need to override the flags on our own during tests so the
device config values ('watchdog_request_timeout_millis' in this case)
won't be changed in an unexpected way.
See b/148042585#comment21 for more details.
Bug: 148042585
Test: atest NetworkStagedRollbackTest
Change-Id: I4d8944f7fef93445de8f971c6a96fef7c71872db
In the cases that a logging parent cannot be found for any packages
in a rollback, the watchdog event should still be logged. Ensure
that the state of a rollback is captured on boot by removing the
condition of only saving a rollback id if there is a logging package,
and by adding a symbolic null package to the list of logging packages
on boot if none were found. Expand tests to verify.
Bug: 149957011
Test: atest StagedRollbackTest
Test: atest NetworkStagedRollbackTest
Change-Id: I56f8afb6730e59fbe67ea8747e0da3aca19a0d8a
'-g' to grant permissions automatically without checking the API level.
This works around the issue of b/149733368#comment2.
'--user all' to install the app on all users. This is more efficient
than calling #installPackageAsUser one by one on each user.
Bug: 149876119
Test: atest MultiUserRollbackTest
Change-Id: Ia5d85d3c13925ae969ffab9319360c1fefe1f950
My local test shows that switch-user doesn't work on my physical device.
In fact there are APIs to run tests against a particular user without
switching. It also speeds up tests without switching users from time to
time.
Bug: 149876119
Test: atest MultiUserRollbackTest
Change-Id: I34d26ddcb6a6e9cdc39228310830a3cd83212e4a
Sometimes RollbackManager is slow in making rollbacks available.
Let's give it enough time to do the job and make test less flaky.
Bug: 149876119
Test: atest MultiUserRollbackTest
Change-Id: I0a64e2dcde1f5e6dae618cacd6546ad953c1aca7
Don't reboot the device when there is no file to delete. This saves us a
significant amount of time since each reboot takes 1 min and there are
dozens of reboot during the whole test case.
Bug: 149528114
Test: atest StagedRollbackTest
Change-Id: If3b06a304d9c87680c7cc5b7498d3b2ecf11cdfa
By classifying the tests into 2 categories, we can:
1) run remaining tests with network disabled to reduce the interference
of network crashes.
2) make it easier to identify bugs caused by network stack or
problems in rollback infra.
Note this CL contains stubs only. We will move actual test code later.
Bug: 147785893
Test: m
Change-Id: I5ecc63a057e9a115ea3aa446970a3f20dff750d0
Use the logcat output of WatchdogRollbackLogger as an indication
that the expected log events are sent to statsd.
Bug: 138782888
Test: atest StagedRollbackTest
Change-Id: I9a9d48da1cb1926186b2feedd0b78ab1bbd14fdf
This adds a test for rolling back device encrypted (user) apex data,
similar to the tests previously added for DE_sys and CE data.
Bug: 141148175
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_DeUser
Change-Id: I632957449e4aa4f93df2e8bf0ae541937472d9fe
This adds tests in StagedRollbackTest for apex data directory rollback.
The test performs the following steps:
- Push files into the apex data directory
- Update the APEX with rollback enabled
- Remove files from data directory
- Add new files to data directory
- Roll back the update
- Verify old files are restored
Bug: 141148175
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_DeSys
Test: atest StagedRollbackTest#testRollbackApexDataDirectories_Ce
Change-Id: Ie1e7ed626c0b654c19b23bfcb008ac4d717aafe2
* changes:
No need to call #updateRollbackLifetimeDurationInMillis (3/n)
Register an OnPropertiesChangedListener in onBootCompleted (2/n)
Squash runnables in onBootCompleted (1/n)
This reverts commit 400124c6ae.
Reason for revert: Fixed the compile error; TestAppACrashingV2 was not
available to com.android.apex.apkrollback.test_v1
Change-Id: Ic443e913b837c9bb2716678521ad1d12d3bc7e4d
This reverts commit d56ce00039.
This revert is to fix the wembley build.
Test: Local wembley build
Change-Id: I651f20ffc6ba11cced5a2a737fd3d77211127221