Currently the flicker tests leave data on the /sdcard/flicker directory. We now clean up this data after the test.
The logs are still available in the atest results directory.
Test: atest FlickerTests
Change-Id: Ia83cbedff3104964e3d4be14a7c035f2193d36a8
A number of connectivity checks that protect system-only methods
check for CONNECTIVITY_INTERNAL, but CONNECTIVITY_INTERNAL is a
signature|privileged permission. We should audit the permission
checks, and convert checks that protect code that should not be
called outside the system to a signature permission. So replace
all CONNECTIVITY_INTERNAL to other proper permissions.
Bug: 32963470
Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Change-Id: I8f2dd1cd0609056494eaf612d39820e273ae093f
Merged-In: I8f2dd1cd0609056494eaf612d39820e273ae093f
This is a long standing bug that happens to now be trivial
to fix, and also be beneficial for refactoring
Test: FrameworksNetTests NetworkStackTests
Change-Id: I38110f3a4a75936ea755788e7f9fee67863e14be
* changes:
[NS A14] Move code notifying battery stats in its right place
[NS A13] Move legacy broadcast handling after rematch.
[NS A12] Move some legacy type tracker handling to a function
Add tests for ConnectivityService → BatteryStats messages
This should be done once every time an interface comes online.
Doing this in updateLinkProperties guarantees this happens every
time a new interface comes online, but it doesn't do it more
often than needed.
Test: FrameworksNetTests NetworkStackTests
Change-Id: I0613c23f44192944266d76107308da8d1c541d1c
* changes:
[Tether10]Remove UserManagerInternal usage in Tethering
[Tether07] Migrate Tethering into module
[Tether07] Clean up build rule for libtetheroffloadjni
Now tethering would be run in dedicated service.
TetheringManager is the interface used to communicate with
TetheringService. The new call flow would be: ConnectivityManager
-> ConnectivityService -> TetheringManager -> TetheringService.
Note: the return value of #tether(), #untether() and #setUsbTethering()
APIs would always be no error. Client can use #getLastTetherError()
or #getTetheredIfaces or listen tether state change to check
status of corresponding interface.
Bug: 136040414
Bug: 144742179
Test: -build, flash, boot
-atest TetheringTests
-atest FrameworksNetTests
Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
Sometimes the tests crash because all runs are janky. Our checks are so far robust to jank, so we will consider janky runs too
Test: atest FlickerTests
Change-Id: I20303d530e1a9cc266230530c6f7fa1cecd51020
* changes:
Add multi-user test for the general non-staged case
Increase timeout in testNativeWatchdogTriggersRollback
Fix flaky testEnableRollbackTimeoutFailsRollback test
Wait for available rollbacks in RollbackTest.
Include NewRollbacks in result of getAvailableRollbacks.
Rename RollbackData to Rollback.
Remove INSTALLED_USERS extra from ACTION_PACKAGE_ENABLE_ROLLBACK.
Update to new RollbackUtils.sendCrashBroadcast API.
Extend ROLLBACK_COMMITTED broadcast for the multi-user case
Fix NullPointerException.
Cleanup some obsolete TODOs and unused code.
Test Native Watchdog triggers RollbackManager rollback
Uninstall testapps before running SecondaryUserRollbackTest
delete ENABLING rollback if we can't get session info for it.
Add test for rollback of userdata with multiple rollbacks
Load rollback data in RollbackManagerServiceImpl constructor.
Use "commit" for rollbacks instead of "execute".
Add TestApi to block the RollbackManagerHandlerThread.
Use Slog in RollbackManager, not Log
Make setRequestDowngrade @TestApi
Migrate RollbackTest and StagedRollbackTest to cts utils
Add .apex suffix to apex files during validation
Add host side test for secondary user rollback
Reduce ENABLE_ROLLBACK timeout to 0 for timeout test.
PermissionMonitor#hasUseBackgroundNetworksPermission only uses
the first package name of the uid for checking permission.
This is incorrect since each package declared different
permissions. So using the mApps which already checked both
network and using restricted network permissions. If uid is in
the mApps list that means uid has one of permission at least.
Bug: 135897744
Test: atest FrameworksNetTests
Change-Id: I3500a03ce06b5b822311ad0c67b606ce4039216a
NetworkNotificationManager will only get the first transport
type from the NetworkCapabilities of network, and if the device
connects to a VPN and its underlying network is wifi, then the
first finding transport type will be TRANSPORT_WIFI. So, if the
private DNS is broken when device connected to VPN,
NetworkNotificationManager will try to get the SSID for the
title of notification but failed. For this kind of case, the
title of PRIVATE_DNS_BROKEN notification will show
"null has no internet access".
Bug: 143340533
Test: 1. Build pass.
2. Connect to VPN and let private DNS to be broken, check
title of PRIVATE_DNS_BROKEN notification.
3. atest FrameworksNetTests
Change-Id: I1ed018cc8774d4fce4b94854f8e8703a28818463
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
Bumps a timeout from 1 minute to 5 minutes, because in practice a lot
more needs to happen in that time window than we expect to fit in 1
minute.
Bug: 140223710
Test: atest StagedRollbackTest:com.android.tests.rollback.host.StagedRollbackTest#testNativeWatchdogTriggersRollback
Change-Id: I2e937f8e1f87356815a834241ad5e9ec1e953892
Merged-In: I2a98e71102fc1cbf6ea712e070d6db49cdb05cba
We no longer block on the handler thread in getAvailableRollbacks. That
means it is possible we see an available rollback left over from a
previous test run. Update the test to ensure previous rollbacks are
removed and give sufficient time to make a new rollback available before
concluding that no rollback will be made available in this case.
Test: atest RollbackTest:com.android.tests.rollback.RollbackTest#testEnableRollbackTimeoutFailsRollback
Change-Id: I8b22320bb3ee60152ab808706913eff43ab7cc9f
Merged-In: Id94d5452836b07d6f802758bd0dfdd3c276a3c05
This changes RollbackTest to retry checks for available rollbacks for
a certain period of time, using a new RollbackUtils method
waitForAvailableRollbacks.
Currently many of the tests in RollbackTest are flaky due to race conditions
between checking for available rollbacks and the installer onFinished callback.
This CL should fix all of those issues.
The previous attempt to resolve this by adding NewRollbacks speculatively to
the results of getAvailableRollbacks was not successful. This CL reverts that
change so that getAvailableRollbacks once again only returns rollbacks that are
actually available.
Bug: 136548146
Test: atest RollbackTest run on cuttlefish on acloud repeatedly
Change-Id: I0389ef2413e7642fe2f6ef1a33aef218dd1896ed
Merged-In: I27e2513b34f49af2f41cd627a5d2550541831e11
For the case where there are multiple users on the device,
the ROLLBACK_COMMITTED broadcast should be sent to all
users for which the package is being rolled back.
Test: atest RollbackTest
Test: atest SecondaryUserRollbackTest
Bug: 139060321
Change-Id: I901ff8a3331c7a8a8585c855a0caead347321d5d
Merged-In: I8e20da321f52ebf9e6d584a8c59d2a3106a32212
Test flow:
* Staged install com.google.android.modulemetadata
* Crash a native process (apexd) enough times to trigger a rollback
* Wait for device reboot (automatically)
* Assert rollback of com.google.android.modulemetadata has been
committed
Test: atest StagedRollbackTest#testNativeWatchdogTriggersRollback
Bug: 135864628
Change-Id: I5176cc7890e251e7ccc10abdfcfee3a5190721b2
Merged-In: Ibe726c140939190adb3db9c18b3b442ba59548a3
Add target_preparer for uninstalling TestApp.A and TestApp.B before
running SecondaryUserRollbackTest.
Also, fix the tearDown command after each case to uninstall the right
apps.
Test: atest SecondaryUserRollbackTest ; atest SecondaryUserRollbackTest
Bug: 136538996
Change-Id: I35edde58eb8b520f167bace7848956d091155158
Merged-In: I3d5decae03bf9d2f9d78a534399214da05a6d372
This test ensures that if a staged install is abandoned, and then
staged again, the userdata snapshot will match the correct rollback.
Since there will be multiple rollbacks in the ENABLING state for the
same package, it is important to ensure that the userdata for the
abandoned rollback is not used.
Test: atest StagedRollbackTest
Bug: 134035054
Change-Id: Ic977e747103c9a9a44592846de73287788cbac6d
Merged-In: Icae7226dfb393c5ffc31dd0116f61141e84f5a42
To eliminate flakiness when testing timeout conditions for
RollbackTest.testEnableRollbackTimeoutFailsRollback.
Test: atest RollbackTest.testEnableRollbackTimeoutFailsRollback in a loop
Bug: 134373106
Change-Id: I2d1de148a83231f3fd48cc05b7320fa5fdf091ce
Merged-In: I01f3e769711ffa51fa714ff4bc81e70887f427ad