Commit Graph

4234 Commits

Author SHA1 Message Date
Treehugger Robot
35b8fb07a1 Merge "Create NetworkAgent CTS for NET_CAP_TEMP_NOT_METERED" am: 7dde88274a
Original change: https://android-review.googlesource.com/c/platform/cts/+/1316376

Change-Id: Ia81dbc1a8a1c16daf6b82ef93014d6a4f75a969a
2020-07-08 04:43:35 +00:00
Treehugger Robot
7dde88274a Merge "Create NetworkAgent CTS for NET_CAP_TEMP_NOT_METERED" 2020-07-08 04:30:22 +00:00
Chalard Jean
eb4d8b4fab Merge "Let testB141603906 run over ADB-over-network" am: 3cded8dc20
Original change: https://android-review.googlesource.com/c/platform/cts/+/1349862

Change-Id: Id15fb6f4ad19061ffe1564030e5108910a2cc99d
2020-07-01 13:47:14 +00:00
Chalard Jean
3cded8dc20 Merge "Let testB141603906 run over ADB-over-network" 2020-07-01 13:31:26 +00:00
Jiyong Park
8fd64757cb Merge "Drop .stubs from android.test.[base|runner|mock].stubs" am: 188ebc6a7f
Original change: https://android-review.googlesource.com/c/platform/cts/+/1353494

Change-Id: I63b970f7edbc554bea6e9a587a27b90ce88edbac
2020-07-01 12:09:23 +00:00
Jiyong Park
188ebc6a7f Merge "Drop .stubs from android.test.[base|runner|mock].stubs" 2020-07-01 11:58:41 +00:00
Jiyong Park
616e299222 Drop .stubs from android.test.[base|runner|mock].stubs
The .stubs library refer to the stub library of a java_sdk_library.
Since the name of the stub library is the implementation detail of the
build system, direct use of the name should be prohibited. Actually,
clients don't need to use the stub name directly because the build
system automatically redirects <name> to <name>.stubs.

Exempt-From-Owner-Approval: too many owners are involved. This is a
simple build script change.

Bug: 157007292
Test: m
Merged-In: I32502de3d87c5cfdbbcfe5545dd7db5e9bb551a7
(cherry picked from commit 89c4e06853f7ea4b5a62a3b02b4f5113617b2c60)
Change-Id: I32502de3d87c5cfdbbcfe5545dd7db5e9bb551a7
2020-07-01 17:17:28 +09:00
Remi NGUYEN VAN
a88f1bcf28 Merge "Move Inet[4]AddressUtils to libs/net" am: 4c602c3388
Original change: https://android-review.googlesource.com/c/platform/cts/+/1353486

Change-Id: I7d41b57d7c38f199696e6433e4d870bec6174f3a
2020-07-01 04:13:15 +00:00
Remi NGUYEN VAN
4c602c3388 Merge "Move Inet[4]AddressUtils to libs/net" 2020-07-01 04:08:25 +00:00
Remi NGUYEN VAN
ba6f3be791 Move Inet[4]AddressUtils to libs/net
The classes should not be picked up from frameworks/base, as they are
part of several mainline modules.

Bug: 151052811
Test: m; manual: flashed, wifi and telephony working
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalApiTest
(clean cherry-pick from internal branch)
Merged-In: Ic7534afe3a437f2089ed33cebdad391dc498d187

Change-Id: Ic7534afe3a437f2089ed33cebdad391dc498d187
2020-06-30 19:20:40 +09:00
Chalard Jean
5ed6690e66 Let testB141603906 run over ADB-over-network
This test (added in R) failed to take the adb-over-network
case into account like most other tests in the same file. As
such it erroneously fails when tested over such a test setup.
This patch exempts the shell from being subject to the VPN,
like other similar tests do, to avoid the adb connections
being killed.

Test: VpnTest
Bug: 159761399
Change-Id: I0bc14d4d2cade7618c59b2cb88638bdf608d43d3
2020-06-29 02:02:35 +00:00
Lorenzo Colitti
bcd58ba008 Merge "Increase ConnDiagsTest timeout for end-to-end test." am: a86ff10ecf
Original change: https://android-review.googlesource.com/c/platform/cts/+/1349068

Change-Id: I0ff154d73be81e1d7810c07409c0f64ddacd30ab
2020-06-26 07:31:08 +00:00
Lorenzo Colitti
a86ff10ecf Merge "Increase ConnDiagsTest timeout for end-to-end test." 2020-06-26 07:13:56 +00:00
Cody Kesting
c8d9a5706e Increase ConnDiagsTest timeout for end-to-end test.
This change increases the delay allowed for administratorUid updates to
reach ConnectivityService in #testRegisterCallbackWithCarrierPrivileges.
Currently, there is no deterministic signal that can be used to wait for
this change, so Thread#sleep is required. This value is increased
because the previous delay did not give enough time for the
administratorUid change to reach CS, causing test flake.

Bug: 159718782
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Change-Id: I36347f6d52e3ce1bd30e3f74c35f4ecd15c8c65e
2020-06-26 07:13:45 +00:00
Cody Kesting
9a17cc9f1c Merge "Fix ConnDiags Test for invoke-after-validate and unregister CBs." am: 58af3db73e
Original change: https://android-review.googlesource.com/c/platform/cts/+/1320277

Change-Id: I6bb3f71a4d919026d768c7e443afeb30cd928998
2020-06-25 15:54:12 +00:00
Cody Kesting
ee8feba3c1 Fix ConnDiags Test for invoke-after-validate and unregister CBs.
This change fixes several things in ConnectivityDiagnosticsManagerTest:
- testOnConnectivityReportAvailable creates the Test Network after
registering the ConnectivityDiagnosticsCallback. This ensures that the
callback is invoked only after the network is validated (not for the
on-register behavior).

- The TestNetworkInterface created while setting up the Test Network is
held onto for the duration of each test. This ensures that the interface
is not garbage collected during the test. While the interface is not
needed for the test, this change makes it clear when the interface is
cleaned up.

- All registered ConnectivityDiagnosticsCallbacks are unregistered at
the end of each test. This ensures that all accompanying NetworkRequests
are cleaned up. If NetworkRequests are leaked, unrelated test failures
can occur (the platform limits the number of NetworkRequests per UID).

Bug: 156294356
Bug: 148032944
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Change-Id: I1836536fe60a65ba33170cd80e8f4996f1965d19
Merged-In: I1836536fe60a65ba33170cd80e8f4996f1965d19
2020-06-25 01:07:48 +00:00
Luke Huang
7b91e6e0d6 Merge "Add net-utils-framework-common to cts-net" am: 10fa0790d9
Original change: https://android-review.googlesource.com/c/platform/cts/+/1348526

Change-Id: I1fcebc37c5585e8e5d21662b6b97e052f1c01e16
2020-06-24 18:53:29 +00:00
Luke Huang
2ba91a70c6 Merge "Update DnsPacket package name" am: 1ef852ef06
Original change: https://android-review.googlesource.com/c/platform/cts/+/1348525

Change-Id: I4b5a9dba48af60642a72d6fbf13aafdf778f738c
2020-06-24 18:51:42 +00:00
Luke Huang
10fa0790d9 Merge "Add net-utils-framework-common to cts-net" 2020-06-24 18:41:18 +00:00
Luke Huang
1ef852ef06 Merge "Update DnsPacket package name" 2020-06-24 18:39:56 +00:00
Cody Kesting
57033b41a3 Merge "Only run ConnectivityDiagnosticsManagerTest as AppModeFull." am: 1b7351a948
Original change: https://android-review.googlesource.com/c/platform/cts/+/1326394

Change-Id: I66f85a4ef7f6f2146af5084ab7366532d69cad5a
2020-06-24 16:06:38 +00:00
Cody Kesting
5c2e383949 Only run ConnectivityDiagnosticsManagerTest as AppModeFull.
This CL restricts ConnectivityDiagnosticsManagerTest to only being run
as @AppModeFull. This is required, as Instant Apps are not allowed
CHANGE_NETWORK_STATE (required for CM#requestNetwork) or
MANAGE_TEST_NETWORKS (required for TestNetworkManager#setupTestNetwork)
permissions - both of which are required for
ConnectivityDiagnosticsManagerTest.

Bug: 158431112
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Change-Id: Id867b8dcaca758cfeb83009848e1099e900a0790
Merged-In: Id867b8dcaca758cfeb83009848e1099e900a0790
2020-06-24 07:59:36 -07:00
Luke Huang
1eebfa3d87 Add net-utils-framework-common to cts-net
In order to avoid class package missing problem, add
net-utils-framework-common in cts net test build. Also jarjar
the package name to prevent conflict.

Test: build
Test: atest DnsResolverTest
Bug: 150952393
(clean cherry-pick from internal branch)
Merged-In: I40e2d4c4945a0579f6e1923e4722b09354ff050c
Change-Id: I40e2d4c4945a0579f6e1923e4722b09354ff050c
2020-06-24 11:39:56 +00:00
Luke Huang
d9daaff707 Update DnsPacket package name
The package name needs to be updated as
the class is moved into com.android.net.module.util.

Bug: 149403767
Test: atest DnsResolverTest
(clean cherry-pick from internal branch)
Merged-In: I908cb5f7bc6150e461748c8e34c92a19aa0206e4
Change-Id: I908cb5f7bc6150e461748c8e34c92a19aa0206e4
2020-06-24 19:38:10 +08:00
Lorenzo Colitti
9e491121c5 Merge "CTS test ConnectivityDiagnostics via CarrierPrivilegesTracker." am: c7f94d5052
Original change: https://android-review.googlesource.com/c/platform/cts/+/1316384

Change-Id: If5630e02b0ae9a15976c0d21fe48eb4a88f53cf6
2020-06-22 04:55:45 +00:00
Lorenzo Colitti
c7f94d5052 Merge "CTS test ConnectivityDiagnostics via CarrierPrivilegesTracker." 2020-06-22 04:41:43 +00:00
Cody Kesting
7d1159a2d4 CTS test ConnectivityDiagnostics via CarrierPrivilegesTracker.
This change adds a CTS test for ConnectivityDiagnostics using
CarrierPrivilegesTracker to receive permissions for
ConnectivityDiagnostics callbacks.

Specifically, the test provides CarrierPrivileges to the test package
(android.net.cts) for the active subscription via Carrier Configs
overrides. CarrierPrivilegesTracker listens to the Carrier Configs
change and matches the loaded certificate with the test package, then
includes the test package UID as an administrator for the Network in
ConnectivityService. Then, a ConnectivityDiagnosticsCallback is
registered and receives a ConnectivityReport on register for the active
subscription.

Bug: 148032944
Bug: 151332031
Test: atest ConnectivityDiagnosticsManagerTest
Change-Id: Iee8a428ada0b6e2127410267a13c3b688df83e6d
2020-06-17 10:38:48 -07:00
Treehugger Robot
5f38f3067d Merge "Toggle wifi when running CaptivePortalTest" am: 1ae290c1a6
Original change: https://android-review.googlesource.com/c/platform/cts/+/1336114

Change-Id: I4a878a7d328a7a001355e092b81e1e3635dcb853
2020-06-16 00:59:52 +00:00
Treehugger Robot
1ae290c1a6 Merge "Toggle wifi when running CaptivePortalTest" 2020-06-16 00:43:07 +00:00
Benedict Wong
7f63ec96d9 Merge "Verify owner of IKEv2 VPNs" am: a330e50192
Original change: https://android-review.googlesource.com/c/platform/cts/+/1326393

Change-Id: Ia3e9f26c6e28fa02b25b3098fbda98c2bf07c2bf
2020-06-15 17:18:15 +00:00
Benedict Wong
a330e50192 Merge "Verify owner of IKEv2 VPNs" 2020-06-15 17:09:46 +00:00
Remi NGUYEN VAN
fa761d5917 Toggle wifi when running CaptivePortalTest
Instead of reconnecting without disabling/re-enabling wifi in
CaptivePortalTest, actually do the toggle during the test and
on teardown to ensure that the BSSID blacklist is cleared.

CaptivePortalTest intentionally makes the network not validate, which
causes it to be added to the BSSID blacklist. Toggling wifi is necessary
to make sure the test does not affect other tests.

Also check development SDK instead of the exact SDK_INT number so that
the test can pass on current AOSP builds.

Bug: 158924461
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalTest \
          CtsNetTestCasesLatestSdk:ConnectivityManagerTest
Change-Id: I31f9f4a9678e11042005c29535af840246358764
2020-06-15 19:38:01 +09:00
Treehugger Robot
9d3ae2e188 Merge "Fix CtsTetheringTest on devices without permanent softAp interfaces." am: 10f23078c1
Original change: https://android-review.googlesource.com/c/platform/cts/+/1331096

Change-Id: I77c08e18837bd0d04744c4dd5b058c368e90f85d
2020-06-15 10:06:52 +00:00
Treehugger Robot
10f23078c1 Merge "Fix CtsTetheringTest on devices without permanent softAp interfaces." 2020-06-15 09:49:44 +00:00
markchien
24d8b8391e Fix CtsTetheringTest on devices without permanent softAp interfaces.
Normally stop wifi tethering flow would be:
Tethering#stopTethering -> WifiManager#stopSoftAp -> softAp disabled,
then have WIIF_AP_STATE_CHANGED intent -> stop IpServer and broadcast
TETHER_STATE_CHANGED intent. SoftAp is disabled before tethering stop.

Because tethering would shutdown the corresponding IpServer if it
observed the interface is removed. For those devices that softAp
interface would be removed when stop tethering, the flow may be
Tethering#stopTethering -> WifiManager#stopSoftAp -> softAp disabing,
softAp interface is removed -> tethering trigger stop IpServer and
broadcast TETHER_STATE_CHANGED intent -> -> softAp disabled, then wifi
broadcast WIIF_AP_STATE_CHANGED intent. In this case, tethering is
stopped ready before softap is disabled.
For this case, CtsTeteringTest would have race between two test cases.
If two case need to start wifi tethering for testing and stop wifi
tethering after finish testing.
The second test may suffer from startTethering fail problem due to
softAP is not disabled yet.
    E WifiService: Tethering is already active.

Bug: 157806780
Test: atest CtsTetheringTest

Change-Id: I0ba6bc9dcbf7829dcad5561c707d5f5c5540f10b
2020-06-15 13:42:40 +08:00
Treehugger Robot
59fdc91b04 Merge "Fix MultinetworkApiTest fail problem in instant mode" am: 3475b733b5
Original change: https://android-review.googlesource.com/c/platform/cts/+/1326955

Change-Id: I70b8832c7b00cff6d8f9154e4f5b97a3d2fc28de
2020-06-11 00:41:11 +00:00
Treehugger Robot
3475b733b5 Merge "Fix MultinetworkApiTest fail problem in instant mode" 2020-06-11 00:22:51 +00:00
Treehugger Robot
fdf0db07d9 Merge "Fix tests that failed on devices without IPsec tunnel feature" am: 08a29ff260
Original change: https://android-review.googlesource.com/c/platform/cts/+/1322980

Change-Id: Ifbf0790825a9fa6e3e3d6ceca342037401985ce0
2020-06-09 19:41:19 +00:00
Treehugger Robot
08a29ff260 Merge "Fix tests that failed on devices without IPsec tunnel feature" 2020-06-09 18:56:32 +00:00
Luke Huang
23710588f9 Fix MultinetworkApiTest fail problem in instant mode
CtsNetUtils#storePrivateDnsSetting might require WRITE_SECURE_SETTINGS
permission to run.
Therefore, move it from setUp to only belong to the required test case.

Bug: 158538281
Test: run cts --include-filter "arm64-v8a CtsNetTestCases[instant]
android.net.cts.MultinetworkApiTest"

Change-Id: I8ecadd134824a4023a3c6e173d52ba088d46b103
2020-06-10 00:51:39 +08:00
Treehugger Robot
43f52399ac Merge "Reset vpn provision status" am: 5469352727
Original change: https://android-review.googlesource.com/c/platform/cts/+/1323343

Change-Id: I30310a7fe18cb364afb6bf28ba371ce473a4ed61
2020-06-09 04:16:14 +00:00
Treehugger Robot
5469352727 Merge "Reset vpn provision status" 2020-06-09 04:06:06 +00:00
Benedict Wong
9d1f86f3a8 Verify owner of IKEv2 VPNs
This change adds assertions to ensure that the owner UIDs of IKEv2 VPNs
are correctly set.

Bug: 150135470
Test: This
Change-Id: Iabf2859c289aa86ec38aea1edcc1fb248b9d0d26
2020-06-08 14:19:14 -07:00
evitayan
ce3c9ae278 Fix tests that failed on devices without IPsec tunnel feature
Three tests failed when they try to set up IKE Session with a
tunnel mode Child SA and the device does not have ipsec tunnel
feature. This commit changed these tests to set up IKE Session
with a transport mode SA because 1) the logic these tests are
verifying is unrelated to the Child SA type and 2) using
transport mode make sure these tests run on all the devices.

Bug: 158268209
Test: CtsIkeTestCases, verified on taimen
Change-Id: I9a8c7f631f0e6e02492816e3fbf0d751017dc2b3
2020-06-08 11:07:02 -07:00
Xin Li
c149919936 Merge changes from topic "QQ3A.200605.002_merge" am: cacd78fef9
Original change: https://android-review.googlesource.com/c/platform/cts/+/1325311

Change-Id: Ibfbcf71f7297bf8b13a147e4d72c7fa63eb52c0e
2020-06-08 15:57:25 +00:00
Xin Li
cacd78fef9 Merge changes from topic "QQ3A.200605.002_merge"
* changes:
  Convert Android.mk to Android.bp for CVE-2018-9536
  Merge QQ3A.200605.002 into master
2020-06-06 01:41:30 +00:00
Lucas Lin
5bf0181b36 Merge "Enlarge the onAvailable callback timeout to 30 seconds" am: fbf126a6f8
Original change: https://android-review.googlesource.com/c/platform/cts/+/1324092

Change-Id: I334534979e0da49fd303c40e4d84cc5fdf498dc0
2020-06-05 09:08:06 +00:00
Lucas Lin
fbf126a6f8 Merge "Enlarge the onAvailable callback timeout to 30 seconds" 2020-06-05 08:53:49 +00:00
Treehugger Robot
a639a7b010 Merge "Add CtsNetTestCasesLatestSdk to postsubmit" am: 10944b6376
Original change: https://android-review.googlesource.com/c/platform/cts/+/1322430

Change-Id: Id0b4cd8b3959f9600aaa31ad2e3b2500f7f9c29a
2020-06-05 04:48:13 +00:00
Treehugger Robot
10944b6376 Merge "Add CtsNetTestCasesLatestSdk to postsubmit" 2020-06-05 04:38:40 +00:00