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
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
It is too late to fix the duplicate events, and they may have existed
in JB-MR2 as well. So fixing CTS to ignore them for now.
Bug: 11049532
Change-Id: I0785a32dbac04eacb6994b428b12ce1ec27945d2
Couple of lines were just wrong (typo?) - and I have reduced our dependence
on multiple static IPs (used to test reverse mapping). It can still get
broken when external servers change their IP addresses though.
Bug: 8658901
Change-Id: I745c958df2f61130798552f0f5f736c73fb5de30
Flushing TCP traffic isn't reliable enough to force a packet on the socket,
even with Nagle disabled.
The kernel's socket sendto() is being invoked with 1024 bytes each time,
but something deeper in the stack is merging packets.
So now we wait 5ms between each of the 1024 packets after flushing.
This allows running the test overnight in a loop without failure
instead of only ~5 times.
The error messages are now more detailed.
Bug: 10668088
Change-Id: Ic47bec81c6dba2fad8b96eb4a41f183115c371de
IPv6 ping socket support is needed for apps to successfully run
ping6, but the kernel support was only merged recently. This
test ensures that the required kernel support is available.
Bug: 9701153
Change-Id: Ieac32ca9dbcaf3890fa3e57c1326fa83787ac6d1
Even if you disable wifi the supplicant will still be pingable
if we're set in always scanning mode. Make the test aware.
bug:9545987
Change-Id: I7f1bd0166b877a706de51f8ef169355c98ae25a3
- Use getMobileBlabla() instead of getTotalBlabla()
- Have getTotalBlabla() reflect the fact that it includes loopback.
- Adjust checks to take headers, acks, and packet counts into account.
Change-Id: I9e1dfbbbdb9a6f932a14a2e3baee7a34469b9008
Checks java and native calls.
Adds some performance tests, but need to look at how that should be used.
Change-Id: I158164829da13302d9532275cef3482c4736168e
WifiManagerTest was waiting for SUPPLICANT_STATE_CHANGED_ACTION
after enabling or disabling WiFi. Fix the code to check if the
WiFi state is already the desired state, and if not, to wait for
the WIFI_STATE_CHANGED_ACTION broadcast intent.
Bug: 7082455
Change-Id: Id1c2242c32311084f5587ea5403f6b227d1b8b04