This test makes assertions about the case where there are two
users running a test application. It verifies that each user can
have its own unique userdata for the same app, and that upgrades
and downgrades are applicable for all users on the device.
Test: atest MultiUserRollbackTest
Test: atest RollbackTest
Bug: 140401995
Change-Id: I77a18cf99ec8d7f30696119919dae8859f9fb25b
Merged-In: I5e5c154758b3f0e4731696c813519ac798fbbae9
Replace the usage of RollbackTestUtils with the API offered by
com.android.cts.install.lib and com.android.cts.rollback.lib.
Test: atest RollbackTest
Test: atest StagedRollbackTest #testBadApkOnly
Bug: 132757394
Bug: 132422403
Change-Id: I1d6789b4fb7ae94ebf7066a6fd215e4ac48c04df
Merged-In: I25cb9dca103852d7ee3691e4df927e1fc5848074
Run RollbackTest#testBasic only under a secondary user.
The host-driven test adds a new user and then installs the TEST (not the
test app) for that new user.
Note: this was the missing step in the previous attempt to test
RollbackTest under a secondary user.
Test: atest SecondaryUserRollbackTest
Test: test failed when multiuser support was removed from rollback
manager
Test: adb shell pm list packages --user 11 | grep rollback while running
the test in order to make sure the test is installing packages for the right user
Bug: 133852817
Bug: 129747710
Change-Id: I9e13f2cdaf825a53846765fa52bc425045f41df1
Merged-In: Id1e54769cc2a9631d1464c07bad2b685f78689bc
This cl improves code coverage for the PackageWatchdog explicit health
checks.
Updating the NetworkStack triggers an explicit health check with
a time deadline. At the deadline, if network is unavailable on the device,
the update is rolled back, if network is available, nothing happens.
Bug: 132640467
Test: atest StagedRollbackTest
Change-Id: I16a40244de9345930a1c981188aa33546fe872fc
If rollback for a package is committed at the same time the package is
updated, it's possible we will incorrectly roll back the newly updated
version of the application.
Add a hidden API to the package installer that lets you set a required
existing version of a package to be updated. If the expected package
version is not installed at the time of commit, the update install
fails.
The RollbackManager uses this new API to ensure that rollback will fail
if the package in question was just updated.
Test: atest RollbackTest, with new test added and manual confirmation
that the race condition was exercised by the new test.
Bug: 128831080
Change-Id: Ifa5627e257d2ef13e2b213ef0dbc93932797ce0d
RollbackManager relies on package changed broadcasts to expire rollbacks
when an application is updated, but we don't receive package changed
broadcasts for apex.
This change adds an extra check when starting RollbackManager to see if
any apex versions have changed and expires rollbacks as appropriate.
Adds a test case to cover the scenario and refactors the test code
to properly set up the test apex in all cases with minimal reboots.
Bug: 126358044
Test: atest StagedRollbackTest, with new test added.
Change-Id: I7ea4953e4aff8d1c7560d6c61e6be5e4e8e1f194
Adds @TestApi for all system apis needed for RollbackTests.
Removes @SystemApi for RollbackManager.expireRollbackForPackage and
RollbackManager.reloadPersistedData, which were always intended to be
used solely for testing.
Bug: 127282563
Test: atest RollbackTest StagedRollbackTest
Change-Id: I183b8a484b4a08f36fc19d64241ab408d28c64ca
The current approach for including built apks as java resources in
RollbackTest.apk appears to cause the RollbackTestApp apks to be
included in the device release image. Convert the Android.mk for
RollbackTest to Android.bp to work around this issue.
This breaks the split apk tests, but we can figure out how to address
that later. Marking the split apk tests @Ignore for now.
Bug: 123695037
Bug: 127520966
Test: make -j80 dist tests, verify no RollbackT*.apk is included in the
built device image.
Test: atest RollbackTest; atest StagedRollbackTest, verify no
RollbackT*.apk is included in the built system image.
Change-Id: Ib413785b0974faddf19ac8dd7387b2642dab37e4
This reverts commit 0145c883e0.
Reason for revert: Causes the RollbackTest apps to be installed to the system partition, which breaks the rollback tests.
Bug: 123695037
Change-Id: I3ee89ecb370144c67fe88bb389abafdda59dc502
Which is more convenient for building a dummy apex module to test
rollback of staged installs.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I30c2fc7d37ca30e47b49012edc02a1fc637ba6f6