http://ag/736511 made the deprecated ConnectivityManager routing
APIs {start,stop}UsingNetworkFeature and requestRouteToHost throw
exceptions for apps whose target SDK version is 23 or above. Move
the tests for these APIs to a new APK that targets SDK version 22
and update the current test APK to ensure that they throw an
exception.
Bug: 22977863
Bug: 23003441
Bug: 23003635
Change-Id: Icf58e928fdc0018d977ce8aa315866659d32debb
Added ACCESS_COARSE_LOCATION permission - it is now required to receive Wi-Fi
scan results(b/21852542).
Bug: 22790182
Change-Id: Idb72c200b08f7e4e95571504ab42c9e706f5c921
As what is done in ConnectivityService to fix
bug: 8562845. Otherwise some related tests like 'testGetAllNetworkInfo'
would fail with runtime detection on WiFi only device.
Change-Id: I94922729c11826b3711abf42f594dcdd994324b6
Signed-off-by: Liangcai Li <liangcail@nvidia.com>
Revert "Merge "resolve merge conflicts of a97c792 to kitkat-cts-dev" into kitkat-cts-dev"
This reverts commit 9feaaaf446, reversing
changes made to 65fbe1fcd153c5647f8d1e1a7443b3f04b7b25fd.
(cherry-picked from master: 0d4434d998
conflict + added Log)
For testTrafficStatsForLocalhost's UID testing, it will also calcuate the wlan0 interface.
There are some TCP re-tranmission in SSLCertificateSocketFactoryTest and it is the same UID as this test case. Need to consider those extra pacetks.
For example,
Before testTrafficStatsForLocalhost test casae:
01-08 15:49:11.316 7826 7839 D TrafficStats: parseUidStats, buffer: 14 wlan0 0x0 10067 0 31857 67 4582 55 31857 67 0 0 0 0 4582 55 0 0 0 0
01-08 15:49:11.335 7826 7839 D TrafficStats: parseUidStats, buffer: 24 lo 0x0 10067 0 40 1 60 1 40 1 0 0 0 0 60 1 0 0 0 0
After testTrafficStatsForLocalhost test casae:
01-08 15:49:19.210 7826 7839 D TrafficStats: parseUidStats, buffer: 14 wlan0 0x0 10067 0 31857 67 4738 58 31857 67 0 0 0 0 4738 58 0 0 0 0
01-08 15:49:19.212 7826 7839 D TrafficStats: parseUidStats, buffer: 24 lo 0x0 10067 0 1155336 2053 1155408 2054 1155336 2053 0 0 0 0 1155408 2054 0 0 0 0
=> There are three extra IP packets after testing due to TCP FIN retreamsisions in previous test case
Suggest to add some extra IP packets for consider the extra traffic in wlan0 interface.
Signed-off-by: Junjie Hu <junjie.hu@mediatek.com>
Change-Id: I981f98fc8647469fb105361516b6a59c53530c70
This fixes the following cases for us:
android.net.cts.ConnectivityManagerTest#testGetAllNetworkInfo
android.net.cts.ConnectivityManagerTest#testGetNetworkInfo
android.net.cts.ConnectivityManagerTest#testIsNetworkSupported
android.net.cts.ConnectivityManagerTest#testRequestRouteToHost
android.net.cts.ConnectivityManagerTest#testSetNetworkPreference
We need to use the prebuilt binary but that has dependency to
private resource identities that differs in our environment. With
this change the resources are looked up in run-time to avoid the
build time dependency.
Change-Id: I6579338b591ca7a0da3f03f796136269c7789780
(cherry picked from commit b29370db34)
The testcase was manipulating the Wifi / Cell networks,
presumably in an effort to make data pass over each type of
network.
The test was sending / receiving data using the loopback
interface so it doesn't make much sense.
testExecute_withMobile would fail if the device did not
have a SIM / mobile data connection *and* if the wifi
network was up when the test ran; it would fail waiting
for the mobile data network to enter the CONNECTED state.
If the wifi connection was down at the start it would
assume the mobile data connection was up already and
proceed with the test (which passed, because it
didn't actually use the network).
This change chops out parts of this test to leave just
HttpClient-related code.
Bug: 21874093
Change-Id: I8248b840f58f939661eff2345f70a9e786e593f3
It is a issue caused by bad test case.
Please ensure the previous vpn connection is disconnected before running next
vpn test case, this will affect the test result.And the CTS test case also
tries to connect socket before the vpn rule is set in netd.
It is the same issue as http://b/18436087 .
The delay 300ms is too short, and recommend extend to 1000 or 3000 ms.
Since L MR1 is known as supporting some low memory device, we suggest fixing
the new CTS test case for some low-end devices.
Change-Id: I6051c95c663e867fc66c580ce8bd8d25fce0b8fc
Signed-off-by: Junjie Hu <junjie.hu@mediatek.com>