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>
(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)
In current implementation it's been assumed that there will be only one
interface registered for service discovery in mdnsresponder. In reality
there's possibility that some real but currently unused interfaces will
have link-local address assigned prior to registration, which will cause
mdnsresponder to register these interfaces for service discovery. This
will result in SERVICE_LOST and SERVICE_FOUND events to be received more
than one time. Current test implementation is not 100% prone for this
situation - depending upon time gap between both events it can PASS or
FAIL.
Fix by removing an assert on number of received events.
Change-Id: I147dc4d600f41f6d63d2b9e4bcb10efe90d5b3ec
(cherry picked from commit 970cbe09b5)
If one sets a *SendBufferSize* value which is less than
(2048 + SKB_DATA_ALIGN(sizeof(struct sk_buff))) then the value
retrieved will be (2 * (2048 + SKB_DATA_ALIGN(sizeof(struct sk_buff)))).
Otherwise, the value will be doubled.
Modify the test to consider both cases.
Change-Id: I2d89393b1ad441783c8a082b072a806b8901830c
Signed-off-by: Constantin Musca <constantin.musca@intel.com>
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