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
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
This change adds assertions to ensure that the owner UIDs of IKEv2 VPNs
are correctly set.
Bug: 150135470
Test: This
Change-Id: Iabf2859c289aa86ec38aea1edcc1fb248b9d0d26
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
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
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
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
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
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
The Ikev2 VPN feature was introduced in R.
Bug: 150904735
Test: atest CtsNetTestCasesLatestSdk:Ikev2VpnTest
Change-Id: I51ded6e967291c110ff0bbd18a3631ab9a742e74
* 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
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
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
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
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