Commit Graph

6901 Commits

Author SHA1 Message Date
Treehugger Robot
30b3905091 Merge "Remove unnecessary dependencies on ART internal libraries." 2019-10-19 12:20:47 +00:00
Jimmy Chen
8a9a9adaeb Merge "p2p: mirgrate p2p into tethering modes" 2019-10-18 05:42:31 +00:00
Martin Stjernholm
969ad1d1c0 Remove unnecessary dependencies on ART internal libraries.
Bug: 133140750
Test: atest FrameworksNetTests
Change-Id: Id6817a2ae09eb6ecfc4c5c8dc08ade44a16d710b
2019-10-17 23:29:57 +01:00
Andrei-Valentin Onea
3914defb43 Merge "Revert "Example for disabling changes at test time"" 2019-10-16 10:29:59 +00:00
Andrei-Valentin Onea
64d5222a95 Revert "Example for disabling changes at test time"
This reverts commit 12765612f3.

Reason for revert: http://b/142758681 

Change-Id: I3e844bf1794e355187934a0370cdc94ece44deb8
2019-10-16 10:10:36 +00:00
Andrei-Valentin Onea
f39e53882c Merge "Example for disabling changes at test time" 2019-10-15 17:38:52 +00:00
Andrei Onea
12765612f3 Example for disabling changes at test time
Add test for the CompatChangeRule using dummy apis, gated using both
available APIs (Compatibility and IPlatformCompat). There's no need to
actually have these compat changes defined, since CompatChangeRule will
inject them regardless.

Bug: 140367850
Test: atest Gating
Change-Id: I3d41925fc579d5212100d9c081cd290f18efa43b
2019-10-11 14:07:53 +01:00
Treehugger Robot
e1d902dd9e Merge "Remove @FlakyTest on testTcpBufferReset" 2019-10-11 11:06:14 +00:00
Valentin Iftime
c86ebbaebc API to detect which network interfaces support wake-on-lan
Add a new method in LinkProperties, isWakeOnLanEnabled() which returns
true if network interface is defined in config_wakeonlan_enabled_interfaces
string-array (config.xml)

Bug: 132705025
Test: atest LinkPropertiesTest & atest ConnectivityServiceTest
Change-Id: I3f7803aafd2f8eaf8aa18419b21339e15d4b7a0b
2019-10-08 13:03:30 +02:00
Jimmy Chen
bcd86d0c9b p2p: mirgrate p2p into tethering modes
Bug: 137602441
Bug: 139783330
Test: atest FrameworksNetTests
Test: atest FrameworksWifiTests
Test: CtsVerifier - Wi-Fi Direct
Test: Enable hotspot when P2P GO is running
      * P2P GO is terminated
      * hotspot is running
Test: Enable P2P GO when hotspot is running
      * hotspot is intact
      * P2P GO could not be launched
Test: Verify P2P functions with legacy WifiP2pService

Change-Id: Icb2e2b106ae52b19af29b7a1ebc55d3cdf80db9c
2019-10-08 14:37:19 +08:00
Chalard Jean
059c426d15 Rename CallbackRecord to CallbackEntry
Test: FrameworkNetTests NetworkStackTests
Change-Id: I8f6ea8fb6879cf7c40396d92f13cb5e12cc45ee7
2019-10-07 13:00:50 +09:00
Chalard Jean
4b4f463d3c Merge "Decrease load-related flakiness in ConnectivityServiceTest" 2019-10-02 02:38:30 +00:00
Mathieu Chartier
bafd39c1cb Add a test that we get samples for a common core-oj method
Test: atest frameworks/base/tests/BootImageProfileTest/src/com/android/bootimageprofile/BootImageProfileTest.java
Bug: 139883463
Change-Id: I11d0d98731756da5b9739b18acb5ab140657ca34
2019-10-01 19:53:19 +00:00
Jeffrey Vander Stoep
152ced4b87 Merge "InetDiagSocketTest: ignore test that times out" 2019-10-01 10:44:24 +00:00
Jeff Vander Stoep
69b83c9b3c InetDiagSocketTest: ignore test that times out
Test: atest InetDiagSocketTest
Change-Id: Ieef0ca291924c0d81b1110bd25020d57fa9f0fec
Bug: 141870193
2019-10-01 08:21:41 +00:00
Jeffrey Vander Stoep
20bdc26698 Merge "Fix FD leak in ConnectivityManager.getConnectionOwnerUid" 2019-09-30 17:41:30 +00:00
Jeff Vander Stoep
59940afb16 Fix FD leak in ConnectivityManager.getConnectionOwnerUid
Add unit tests to verify that bug has been fixed.

Re-enable testGetConnectionOwnerUid() unit tests in presubmit. These
were disabled due to test flakiness caused by expected failures passing
as a result of other sockets on the system. This is fixed by checking
that failures do not have the UID of the calling process instead of
INVALID_UID since previously some Qualcomm telephony sockets were
causing lookup successes.

Test: atest InetDiagSocketTest#testGetConnectionOwnerUid
Test: ls -1 /proc/<pid of system_server>/fd | wca
Test: atest --generate-new-metrics 200 InetDiagSocketTest#testGetConnectionOwnerUid
   To verify flakes have been cleaned up.
Bug: 141603906
Bug: 141459241
Change-Id: Ib76674f10e4bd24952c557bac7b9c65fba42fdb2
2019-09-30 12:46:03 +02:00
Treehugger Robot
f2a739d5f0 Merge changes from topic "flicker-rotation"
* changes:
  New FlickerTests: Run split screen tests at 0 and 90 degrees
  New FlickerTests: Start app warm and cold at both 0 and 90 degrees
  New FlickerTests: Start IME alongside the app (0 and 90 degrees)
  New FlickerTests: Start IME tests with app rotated by 90 degrees
2019-09-27 14:21:58 +00:00
Chalard Jean
b299b8418f Decrease load-related flakiness in ConnectivityServiceTest
Almost always this timeout is not waited anyway.

Test: ConnectivityServiceTest
Change-Id: I74376633d0ec8d93fb48609a4df73cad5fc5d508
2019-09-27 21:44:54 +09:00
Treehugger Robot
0e45bfabfe Merge "Properly test TrafficController permissions on package updates." 2019-09-27 05:35:25 +00:00
Treehugger Robot
a828ee6442 Merge changes from topic "system_ext"
* changes:
  Consider overlay in system_ext as system's
  Support /system_ext partition
2019-09-26 22:18:07 +00:00
Nataniel Borges
40c517afac New FlickerTests: Run split screen tests at 0 and 90 degrees
Test: atest ResizeSplitScreenTest
Change-Id: I44b0733f8abbb022f2a00072bbb398e6d29699c7
2019-09-26 17:46:47 +02:00
Treehugger Robot
1170b46a74 Merge "Add secure settings to the test apps" 2019-09-26 11:57:33 +00:00
Nataniel Borges
97572097a4 Add secure settings to the test apps
When running the flicker tests on postsubmit the apps require the following permission: "android.permission.WRITE_SECURE_SETTINGS"

Test: atest FlickerTests
Change-Id: I6a2647fb6d2351617297b3f89ae3f3edc1aad981
2019-09-26 12:01:57 +02:00
Mathieu Chartier
37f8bfb2c1 Merge "Wait for the profile to not be empty in BootImageProfileTest" 2019-09-25 15:54:59 +00:00
Nataniel Borges
d051c3b767 New FlickerTests: Start app warm and cold at both 0 and 90 degrees
Test: atest OpenAppColdTest OpenAppWarmTest
Change-Id: I1ea7377a07938b583c537b3db2da7bd5a3fc0ae1
2019-09-25 16:12:18 +02:00
Nataniel Borges
4bfe816030 New FlickerTests: Start IME alongside the app (0 and 90 degrees)
Test: atest FlickerTests:CloseImeAutoOpenWindowToAppTest
Change-Id: I8ed60eb5e4653cdcf4d31402069be7da96c5d2bb
2019-09-25 16:11:14 +02:00
Nataniel Borges
89888bf124 New FlickerTests: Start IME tests with app rotated by 90 degrees
Test: atest FlickerTests:CloseImeWindowToAppTest FlickerTests:CloseImeWindowToHomeTest
Change-Id: Ib78e3ecf5629938b722e067027098b8c43a64771
2019-09-25 16:10:50 +02:00
Jorim Jaggi
7943776f9a Merge changes from topic "flicker-move"
* changes:
  Ignore flicker tests with open bugs
  Don't remove flicker test logs from device for easier debugging
  Reduce delays on Flicker test rotation
  Make OpenAppCold/Warm tests compatible with AOSP
  Make Flicker Tests compatible with current AOSP
2019-09-25 13:03:18 +00:00
Chalard Jean
6f41ae928a Merge "Fix TestNetworkAgentWrapper flakiness" 2019-09-25 08:58:34 +00:00
Mathieu Chartier
4aafe443c3 Wait for the profile to not be empty in BootImageProfileTest
Keep trying to force profile saves until it's not empty. This handles
the case when the system server isn't started enough to save a profile
yet. This can be affected by boot time fluctuations if we don't wait.

Test: atest BootImageProfileTest
Bug: 139883463

Change-Id: I98b359412f919bd64c2cd2a5b7d6659d1cef113d
2019-09-24 15:13:26 -07:00
Jeongik Cha
f6629839d1 Support /system_ext partition
This commit is mainly from I7a6a30bf8e8db9f2738594d187bb9148f138b8da, so
test cases and features are mostly same.

We change product_services partition name to "system_ext" because this
partition's purpose changes.

 - installing a RRO package for framework from /system_ext/overlay
 - installing apps from /system_ext/app
 - installing priv-apps from /system_ext/priv-app
 - installing permissions from
   /system_ext/etc/[default-permissions|permissions|sysconfig]

Bug: 134359158
Test: `mma` under frameworks/base/tests/[libs|privapp]-permissions
      adb sync && adb reboot
      adb shell cmd package list libraries
        => confirmed com.android.test.libs.system_ext library
      adb shell cmd package dump \
        com.android.framework.permission.privapp.tests.system_ext
        => confirmed that the package is a priv-app

Change-Id: Ibbccbba64156a7bc464ffb3785fb8fe69ebb973c
Merged-In: Ibbccbba64156a7bc464ffb3785fb8fe69ebb973c
(cherry picked from commit 9ec059ac1d)
2019-09-23 22:00:50 +00:00
Mathieu Chartier
feca77fc81 Add test for boot image profile collection
Test that the expected properties are set.

Test that saving the system server profile contains both the boot image
profile and system server profile.

The test requires root to run.

Bug: 139883463
Test: atest BootImageProfileTest

(cherry picked from commit f7849d916a)

Change-Id: Id7fa4ecc507864c2855da276025be076e5768df1
Merged-In: I6bb39337ba07be58b7dc2b314a8ee92154256f17
2019-09-20 16:42:06 -07:00
Chalard Jean
3da8e0f80f Fix TestNetworkAgentWrapper flakiness
The underlying issue here is that before aosp/986824 the call to
waitForIdle is the local ConnectivityServiceTest function, but
after that patch TestNetworkAgentWrapper has an identically
named member that only wait for its own handler.

Bug: 141341704
Test: ConnectivityServiceTest --generate-new-metrics 100
Change-Id: I38709cc69ec7a261c1c6e008abe03d2882e2083d
2019-09-20 17:19:31 +09:00
Lorenzo Colitti
fc901157dc Properly test TrafficController permissions on package updates.
The current test we have for a package changing TrafficController
permissions (i.e., INTERNET or UPDATE_DEVICE_STATS permissions)
is not realistic.

This is because the test simulates the update by removing and
adding the package. But TrafficController permissions are not
driven by broadcasts, they are driven by PackageListObserver,
and when an app is updated, PackageListObserver does not see a
remove and and add, but a single change event.

Add a new test for this.

Bug: 137864893
Test: new unit test added
Change-Id: I691b928f57c79c19dfb6ddb01983d55ef305c472
2019-09-20 11:58:43 +09:00
Nataniel Borges
0e476aa881 Ignore flicker tests with open bugs
Some flicker tests are failing because of open bugs. Mark them as
ignored until the bugs are fixed to prevent test failures.

Test: atest FlickerTests
Change-Id: If9216bccc32d64cd32ff87fae785df200eae8b79
2019-09-18 17:18:22 +02:00
Nataniel Borges
eb63fdd6e5 Don't remove flicker test logs from device for easier debugging
Test: atest FlickerTests
Change-Id: Id8a7869967df2ccd2e905c61cc1a348ae06d4430
2019-09-18 17:17:35 +02:00
Nataniel Borges
f5a1ed72a8 Reduce delays on Flicker test rotation
Flicker tests currently wait 3 seconds until the screen rotation have
been complete. This long delay may hide some issues. Reduce delay to 1
second.

Test: atest FlickerTests
Change-Id: I1646086018fac52c0751ff70fff1f5082fee4685
2019-09-18 17:17:24 +02:00
Nataniel Borges
527ee2e145 Make OpenAppCold/Warm tests compatible with AOSP
Test: atest FlickerTests
Change-Id: Ib1071b125597e73a5c72e22e9107ae4d29f5cb7f
2019-09-18 17:17:03 +02:00
Nataniel Borges
f5c828cb48 Make Flicker Tests compatible with current AOSP
Current status:
atest FlickerTests: Passed: 132, Failed: 11, Ignored: 0

Test: atest FlickerTests
Change-Id: I581005fd293631630a3939eeaae485c1fd41ebb9
2019-09-18 12:45:46 +02:00
Winson Chung
0d4ac4ec1c Exposing flickerlib classes and layer tracing to sysui
- Allow recents component to enable/disable layer tracing
- Expose flickerlib classes for use with sysui/launcher tests
- Allow trace files to be moved to a path that the client can read
- Ensure layers are flattened with depth traversal to encode ordering

Bug: 140244969
Test: atest FlickerTests
Change-Id: I7af5699ff5b8a4bc62c1a8105c67b31bc45a2236
Merged-In: Ia0934ec7c2b9484fa6c85f5aa8d9b2e5e6f7dc0f
2019-09-16 18:08:13 +00:00
paulhu
1d15e5dff7 Remove @FlakyTest on testTcpBufferReset
After aosp/1111617 merged, the test pass rate of
testTcpBufferReset is 100% on Android Test Metrics. That means
this test is not flaky. So remove @FlakyTest annotation on the
test.

Change-Id: I1fb47a9fda294030c41dc53cf4bac3849a2f3d54
Fix: 140305678
Test: atest ConnectivityServiceTest#testTcpBufferReset
2019-09-10 17:44:33 +08:00
Steven Moreland
0daed48a88 Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I136e4d4459bb8c3c5abf3c0758dd5ae14d0ad2a2
2019-09-09 16:28:55 +00:00
Xin Li
d191463bb0 Merge "DO NOT MERGE - Merge Android 10 into master" 2019-09-05 16:53:23 +00:00
Lucas Lin
3f275ca900 Merge "Fix flaky test - testPartialConnectivity" 2019-09-05 11:40:01 +00:00
lucaslin
fe39f0a777 Fix flaky test - testPartialConnectivity
This timing issue is happened when test case already verified
NetworkMonitor#setAcceptPartialConnectivity() before
NetworkAgent send the CONNECTED state to ConnectivityService.
This test case expects that the
NetworkMonitor#setAcceptPartialConnectivity() will be invoked
when network state is CONNECTED in
ConnectivityService#updateNetworkInfo().

NetworkAgent communicates with ConnectivityService by
AsyncChannel. Before they connect to each other, the thread of
NetworkAgent is keeping idle, so waitForIdle cannot handle this
kind of case. Although they have connected to each other, but
they don't communicate with each other, waitForIdle() still
cannot handle this case. It means waitForIdle() can only handle
the case that NetworkAgent already connected to
ConnectivityService and NetworkAgent is communicating with
ConnectivityService. So, that's why waitForIdle() sometimes
doesn't work in this case, and the most simplest and right way
to fix this case is to wait the available callback then verify
the method.

Bug: 140306320
Test: atest FrameworksNetTests: \
      ConnectivityServiceTest#testPartialConnectivity \
      --generate-new-metrics 500

Change-Id: I64bfecbfe3c5776bd5c347a821f9127e79539c48
2019-09-05 11:39:20 +00:00
Treehugger Robot
4339cf3402 Merge "Add NetIdManagerTest" 2019-09-05 06:39:43 +00:00
Treehugger Robot
324d724fd7 Merge "Add ConnectivityServiceIntegrationTest" 2019-09-05 05:26:34 +00:00
Remi NGUYEN VAN
f8a4272491 Add NetIdManagerTest
Add a simple test to verify that IDs loop correctly, that they skip used
IDs correctly, and throw when there is no remaining ID.

Test: atest com.android.server.NetIdManagerTest
Change-Id: I4c9518c725156d743286e062fd2eec1423a0459e
2019-09-04 15:57:58 +09:00
Remi NGUYEN VAN
bb59253d6d Add ConnectivityServiceIntegrationTest
This test exercises the Connectivity <-> NetworkMonitor integration.
This CL only contains a simple test (network validates), but more
generally it sets up a test package that contains both services.jar
classes and NetworkStack classes, and runs NetworkStack components in
another process (using TestNetworkStackService).

ConnectivityServiceIntegrationTest runs in the test process and binds to
TestNetworkStackService to obtain TestNetworkStackConnector and to
NetworkStackInstrumentationService to obtain
NetworkStackInstrumentationConnector. That last connector allows the
test to mock NetworkMonitor HTTP Requests.

Test: atest FrameworksNetIntegrationTests
Change-Id: Ieca18e273609044cf6b1870d2f0dba33ca7b38d3
2019-09-04 15:57:47 +09:00