(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)
We have seen quite a few of these; and it doesn't seem to be pointing to
any device implementation problem. Hence relaxing the test.
Bug: 18005417
Change-Id: Iee983527ddff4f5336ccb48c04ce851102f13349
Removed most of getNetworkPreference() and setNetworkPreference() tests as
these functions are now fully deprecated and do nothing. Just test that
they are still callable.
Adjust startUsingNetworkFeature() and stopUsingNetworkFeature() failure
codes to match new behavior.
Tested on devices with Wifi and Cellular radios, and Wifi-only.
bug:17417896
bug:17354855
Change-Id: Iea8b25e399f4e5b6ec3d2101ebf520f89697c4da
For now, just checks that the kernel sysctls are present and
have the right permissions and expected values.
Bug: 15605143
Change-Id: I5feb6cb5f25b97e88cd0d9e8071213d13d4cc6e8
The return value of mWifiManager.isWifiEnabled()
&& mWifiManager.getConnectionInfo().getSSID() != null can not
correctly identify if WiFi is connected or not.
The fix is to modify the code logic used to judge if WiFi is connected.
Bug 15578218 and 15578219
Change-Id: I8ae40980c9cd1ea91dafe0ca7c893c84b35709bf
Signed-off-by: Benson Huang <benson.huang@mediatek.com>
The return value of mWifiManager.isWifiEnabled()
&& mWifiManager.getConnectionInfo().getSSID() != null can not
correctly identify if WiFi is connected or not.
The fix is to modify the code logic used to judge if WiFi is connected.
Bug 15578218 and 15578219
Change-Id: I8ae40980c9cd1ea91dafe0ca7c893c84b35709bf
Signed-off-by: Benson Huang <benson.huang@mediatek.com>
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
Also do the following related cleanup
- Remove references to deprecated BrokenTest and KnownFailure
- Switch CTS tests to build against SDK and not private
android.test.runner where possible
Bug: 12924356
Change-Id: If6151b836456eec4838f8d7d6e11c9834c007fca