Commit Graph

4193 Commits

Author SHA1 Message Date
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
3475b733b5 Merge "Fix MultinetworkApiTest fail problem in instant mode" 2020-06-11 00:22:51 +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
5469352727 Merge "Reset vpn provision status" 2020-06-09 04:06:06 +00: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
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
fbf126a6f8 Merge "Enlarge the onAvailable callback timeout to 30 seconds" 2020-06-05 08:53:49 +00:00
Treehugger Robot
10944b6376 Merge "Add CtsNetTestCasesLatestSdk to postsubmit" 2020-06-05 04:38:40 +00:00
lucaslin
072e96ebdf Enlarge the onAvailable callback timeout to 30 seconds
Sometimes the device may take a long time to connect to the wifi,
try to enlarge the timeout to lower the fail rate of test.

Bug: 157391946
Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideNetworkCallbackTests
Change-Id: Ie89936ecc2d70ee22dd312067ccedd2523e81855
2020-06-05 02:55:22 +00:00
Remi NGUYEN VAN
f33b6ea261 Add CtsNetTestCasesLatestSdk to postsubmit
Also exclude some tests that cannot run on cuttlefish.
This is a first step to add the suite to presubmit. Having the test in
presubmit is essential to avoid regressions and keep it passing.

Bug: 158153057
Test: m CtsNetTestCases; this patch will provide postsubmit results
Change-Id: I48b2b5490d3fd5eb6f9456825c11f3fee0ec5b67
2020-06-05 09:57:11 +09:00
Chiachang Wang
abf0c1d1e6 Reset vpn provision status
The vpn status of cts app is updated to be consented in this
tests which will impact the following test related to vpn.
Thus, reset the status after finishing the test.

Bug: 153760253
Test: atest CtsNetTestCasesLatestSdk
Change-Id: I4856cfc7ddfd70125c513a4201132256704d1a66
2020-06-04 12:52:31 +08:00
Treehugger Robot
fce5f45653 Merge "Fix CtsNetUtils connectTo/disconnectFromWifi" am: d99c455167
Original change: https://android-review.googlesource.com/c/platform/cts/+/1322428

Change-Id: I0483ab9f30828c328be8d8edb2a12234a156f5f9
2020-06-03 07:42:11 +00:00
Treehugger Robot
d99c455167 Merge "Fix CtsNetUtils connectTo/disconnectFromWifi" 2020-06-03 07:21:49 +00:00
Remi NGUYEN VAN
7deca3e618 Fix CtsNetUtils connectTo/disconnectFromWifi
connectToWifi needs to clear the wifi networks blacklist before calling
reconnect(), otherwise wifi may not reconnect if the previous network
was blacklisted.

disconnectFromWifi should not wait for a onLost callback if wifi was
already disconnected.

Test: atest CtsNetTestCasesLatestSdk:ConnectivityManagerTest
Test: atest CtsNetApi23TestCases
Bug: 150949391
Change-Id: I244b91bdd8708694fce9f10d92b8b6646d28188f
2020-06-03 15:05:25 +09:00
Treehugger Robot
ba1290b755 Merge "Remove dependency on kotlin-reflect" am: 9bbb79f173
Original change: https://android-review.googlesource.com/c/platform/cts/+/1322415

Change-Id: I7d0d10a0fbd59dea4f9dfa70081a7ce1b514a251
2020-06-03 00:25:55 +00:00
Remi NGUYEN VAN
247548cc30 Merge "Skip Ikev2VpnTest on Q" am: bdfc18bc1e
Original change: https://android-review.googlesource.com/c/platform/cts/+/1322414

Change-Id: I3cff2faf1e67d98ad8b5406fbbd7a69ea86d46c6
2020-06-03 00:25:42 +00:00
Treehugger Robot
9bbb79f173 Merge "Remove dependency on kotlin-reflect" 2020-06-03 00:19:37 +00:00
Remi NGUYEN VAN
bdfc18bc1e Merge "Skip Ikev2VpnTest on Q" 2020-06-03 00:13:16 +00:00
Treehugger Robot
fbd2113de5 Merge "Fix TetheringManagerTest failure when using entitlement required SIM" am: 1691078821
Original change: undetermined

Change-Id: I4c58b3803a13271dfd45103fbd32a3a8e3238aff
2020-06-02 02:51:01 +00:00
Treehugger Robot
1691078821 Merge "Fix TetheringManagerTest failure when using entitlement required SIM" 2020-06-02 02:35:43 +00:00
Remi NGUYEN VAN
eef04c75ce Remove dependency on kotlin-reflect
While local runs pass, kotlin-reflect.jar is not found on the test
infrastructure. Depending on that library does not make the test much
more simple.

Bug: 156062304
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalApiTest
Change-Id: I6691a07ef8d6c63e68cb78813a5e3e499ef897df
2020-06-02 11:01:58 +09:00
Remi NGUYEN VAN
539bfc16ee Skip Ikev2VpnTest on Q
The Ikev2 VPN feature was introduced in R.

Bug: 150904735
Test: atest CtsNetTestCasesLatestSdk:Ikev2VpnTest
Change-Id: I51ded6e967291c110ff0bbd18a3631ab9a742e74
2020-06-02 10:51:55 +09:00
Cody Kesting
2a898a5d7a Merge "Test Data Stall with unknown detection type." am: 43fbab7444
Change-Id: If62bf0f152893d904b79320354267db1ce3cc320
2020-05-29 21:30:41 +00:00
Cody Kesting
0b07d517bc Merge "Add CTS testing for ConnectivityDiagnostics Data Stall callback." am: f665174aaa
Change-Id: Ie6259540b61f8bc4dc53da9fe2fb899a154c171e
2020-05-29 21:29:59 +00:00
Cody Kesting
43fbab7444 Merge "Test Data Stall with unknown detection type." 2020-05-29 20:46:59 +00:00
Cody Kesting
f665174aaa Merge "Add CTS testing for ConnectivityDiagnostics Data Stall callback." 2020-05-29 20:44:42 +00:00
Cody Kesting
55a841b153 Merge "Add CTS tests for ConnectivityDiagnostics callbacks." am: 21763671f4
Change-Id: I71342f839fe9f8e6ebc9b130c5246ca22ff336d3
2020-05-29 19:56:23 +00:00
Benedict Wong
e2fda73ecb Merge changes from topic "vpn-cts" am: c75e8886ed
Change-Id: Ie1e0bd4029ebc2d2c8843d451f74785e21fc050c
2020-05-29 19:56:11 +00:00
Cody Kesting
21763671f4 Merge "Add CTS tests for ConnectivityDiagnostics callbacks." 2020-05-29 19:49:06 +00:00
Benedict Wong
c75e8886ed Merge changes from topic "vpn-cts"
* changes:
  Add IPv6 testing for IKEv2 VPN tests
  Add Ikev2VpnTests including IKE negotiation.
  Add basic tests for IKEv2/IPsec VPNs
  Extract IPsec and test network utility methods
2020-05-29 18:51:26 +00:00
Benedict Wong
3d95958d01 Add IPv6 testing for IKEv2 VPN tests
This change adds tests for IPv6 IKEv2 VPN profiles.

Bug: 148582947
Test: IPv6 tests passing
Change-Id: Ic0f71df739bd9162653b5f2878e7ddc446ddde0e
2020-05-29 02:28:07 -07:00
Remi NGUYEN VAN
8116784031 Merge "Add CTS test for the capport API" am: b0d3cd455c
Change-Id: Ieec3bd1d21daddcbac98114857d44cf9eb93fa10
2020-05-29 07:56:58 +00:00
markchien
f74fce0d0c Fix TetheringManagerTest failure when using entitlement required SIM
If run tethering cts with entitlement required SIM, the test would
failure due to no tethering upstream. Tethering would default start
with UI base entitlement check which would have interfactive UI pop
up. Tethering's upstream is blocked because entitlement UI is keep
waiting for action till timeout.
To avoid UI interaction, start tethering with silent entitlement
check.

Bug: 156714671
Test: atest CtsTetheringTest
Change-Id: I85299841d60afba97ffcc4ae908a85e51139319b
2020-05-29 11:53:34 +08:00
Remi NGUYEN VAN
b0d3cd455c Merge "Add CTS test for the capport API" 2020-05-29 00:35:24 +00:00
Benedict Wong
e777f4076e Add Ikev2VpnTests including IKE negotiation.
This commit expands IKEv2 VPN CTS testing to ensure that given a
successful IKEv2 negotiation, the VPN network will be correctly set up.
Additionally, it verifies that the stopProvisionedVpnProfile will
teardown the VPN network.

Bug: 148582947
Test: atest CtsNetTestCases:Ikev2VpnTest
Change-Id: Ib6635f0068200ac0172515989fbdee5c3d49e231
2020-05-28 14:14:16 -07:00
Benedict Wong
670639c13c Add basic tests for IKEv2/IPsec VPNs
This change adds basic tests for all IKEv2/IPsec VPN public APIs.
Additional testing for ensuring IKEv2 setup completes will be done in a
subsequent CL.

Bug: 148582947
Test: Ikev2VpnTest added
Change-Id: Ia5d35c32525b32be4a0dc0584630f5bb9e7f1bcb
2020-05-28 10:45:57 -07:00
Benedict Wong
9986109df8 Extract IPsec and test network utility methods
This patch moves some test setup functions to util classes in
preparation for IKEv2 VPN tests which will use those same utilities.

Bug: 148582947
Test: atest IpSecManagerTunnelTest; passing
Change-Id: I9aeafa45ab515ce72a72c3de6f70fb26e32e7fd4
2020-05-28 10:43:16 -07:00
Yan Yan
96240e80c5 Merge "Test IKE Session setup in IPv6 network" am: 4a7fcbcb54
Change-Id: I33d14a74445dd3ff249cab4a3f14178042e9a5f3
2020-05-28 17:18:31 +00:00
Yan Yan
4a7fcbcb54 Merge "Test IKE Session setup in IPv6 network" 2020-05-28 17:03:51 +00:00
Remi NGUYEN VAN
be87265e09 Add CTS test for the capport API
The test relies on EthernetManager#setIncludeTestInterfaces to run
validation on an "ethernet" network based on a tap interface, and
simulates DHCP and HTTP servers so the device sees the capport DHCP
option, and fetches the API contents.

Bug: 156062304
Test: atest CaptivePortalApiTest
Change-Id: I734dbd05c0f50b8dc4553102ab286f0d8807a7ac
2020-05-28 16:30:31 +09:00
Yan Yan
6932bd3aa9 Merge "Test handling authentication failure" am: 77a425820a
Change-Id: I51e336cb1ca6f5b774bd1d8ee8fbb586044f2747
2020-05-28 04:36:13 +00:00
Yan Yan
77a425820a Merge "Test handling authentication failure" 2020-05-28 04:22:35 +00:00
Treehugger Robot
9b7abf01f0 Merge "Fix testTetheringUpstream flaky" am: 555ca8801b
Change-Id: I8be0aac2b8231f0988a82a437ca0947e8eebd76e
2020-05-28 01:48:32 +00:00
Treehugger Robot
555ca8801b Merge "Fix testTetheringUpstream flaky" 2020-05-28 01:36:55 +00:00
Yan Yan
130a0ed3dc Merge "Test remotely initiated rekey" am: 06c7ebc8e4
Change-Id: I66fb5bef06774faf333fbfa6e6ed86cd1e662155
2020-05-28 01:23:49 +00:00
Yan Yan
b9cbd78bac Merge "Test IKE Session setup with EAP-MSCHAPv2" am: aecb7c05e2
Change-Id: Ibe306685fe6642e7eb106eec46d2a642d06327a2
2020-05-28 01:23:39 +00:00
Yan Yan
06c7ebc8e4 Merge "Test remotely initiated rekey" 2020-05-28 01:10:38 +00:00
Yan Yan
aecb7c05e2 Merge "Test IKE Session setup with EAP-MSCHAPv2" 2020-05-28 01:09:11 +00:00