Commit Graph

832 Commits

Author SHA1 Message Date
Ningyuan Wang
074beff3eb Merge "CTS: update wifi scan timeout to 9 seconds" into oc-mr1-dev am: 9d802bdf96
am: 34f5d032f4

Change-Id: I29284a6ead745182b80299f40c8a2794bb7b307a
2017-10-11 16:50:58 +00:00
Ningyuan Wang
34f5d032f4 Merge "CTS: update wifi scan timeout to 9 seconds" into oc-mr1-dev
am: 9d802bdf96

Change-Id: I63e93684c0ce201c445cd1dd2ebb8f41b1afa04d
2017-10-11 16:46:49 +00:00
Ningyuan Wang
8666bc8c23 CTS: update wifi scan timeout to 9 seconds
This creates a new timeout constant for scan duration, so
this test doesn't share timeout constant with other events.

This also increases the scan timeout time to 9 seconds per
our estimation.

Bug: 67462981
Test: cts-tradefed run cts -m CtsNetTestCases -t
android.net.wifi.cts.WifiManagerTest#testWifiScanTimestamp

Change-Id: I7e1dea64bc8df3e4b31adbf8b5f05c8564a739b1
2017-10-10 13:26:34 -07:00
Sudheer Shanka
ecf09e273d Merge "CtsHostsideNetworkTests: Add more logging when the test fails." into oc-mr1-dev am: e0c6f29d71
am: 3496ab978d

Change-Id: I942cad554e0f24406ba5c2d5d402a29ef400c817
2017-09-30 07:47:14 +00:00
Sudheer Shanka
3496ab978d Merge "CtsHostsideNetworkTests: Add more logging when the test fails." into oc-mr1-dev
am: e0c6f29d71

Change-Id: Id7704abf409f4338061c86f9cc5c67e356b0f2e9
2017-09-30 07:40:06 +00:00
Sudheer Shanka
21163bc32d CtsHostsideNetworkTests: Add more logging when the test fails.
Bug: 66015813
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I1dc0603011522f73c63dcb7f0f1422428f727fad
2017-09-29 17:13:32 -07:00
Sudheer Shanka
502f28067d Merge "CtsHostsideNetworkTests: Add more logging when the test fails." into oc-mr1-dev am: 26e6bf91be
am: 09bab7b5c3

Change-Id: Ia1f48086e6e32923458778f187c7f8c9dfaf34ca
2017-09-27 21:11:29 +00:00
Sudheer Shanka
09bab7b5c3 Merge "CtsHostsideNetworkTests: Add more logging when the test fails." into oc-mr1-dev
am: 26e6bf91be

Change-Id: Ibf3ea26a55abdb2a6f5340e74cc11dbef05e31f1
2017-09-27 21:07:19 +00:00
Sudheer Shanka
26e6bf91be Merge "CtsHostsideNetworkTests: Add more logging when the test fails." into oc-mr1-dev 2017-09-27 21:00:54 +00:00
Lorenzo Colitti
c40627af2b Merge "Ensure that Ethernet is supported if the service is running." am: 266fad4970 am: ace309a7ad am: 24aa40363f
am: 6506340c5c

Change-Id: If8183d6a77c76af1eeed39a46cc801676aae6475
2017-09-27 09:05:14 +00:00
Lorenzo Colitti
6506340c5c Merge "Ensure that Ethernet is supported if the service is running." am: 266fad4970 am: ace309a7ad
am: 24aa40363f

Change-Id: I85f9670815289a3c11adf159107f05619899d0da
2017-09-27 08:49:59 +00:00
Lorenzo Colitti
b47b977afa Ensure that Ethernet is supported if the service is running.
Currently, it's possible for isNetworkSupported() to return false
for TYPE_ETHERNET even if the device could otherwise support
Ethernet (e.g., via a USB host adapter). This can lead to APIs
APIs such as getActiveNetworkInfo and CONNECTIVITY_ACTION
behaving as if Ethernet was not present, even if it's connected.

Reduce the chance of this sort of misconfiguration by ensuring
that if the Ethernet service is running, isNetworkSupported
will return true for TYPE_ETHERNET. OEMs that would like the
function to return false should avoid starting the Ethernet
service.

(cherry picked from commit c4f38c2e5b)

Bug: 37359230
Test: ConnectivityManagerTest passes on aosp_bullhead
Change-Id: Iad8884bf7d12bbf661e5502b31f052a6e8457a6f
Merged-In: Iad8884bf7d12bbf661e5502b31f052a6e8457a6f
2017-09-27 17:32:15 +09:00
Lorenzo Colitti
ace309a7ad Merge "Ensure that Ethernet is supported if the service is running."
am: 266fad4970

Change-Id: I9faf940c6d36abb1b0e7b07cbb01974cdf1e9d25
2017-09-27 08:31:15 +00:00
Treehugger Robot
266fad4970 Merge "Ensure that Ethernet is supported if the service is running." 2017-09-27 08:23:34 +00:00
Lorenzo Colitti
c4f38c2e5b Ensure that Ethernet is supported if the service is running.
Currently, it's possible for isNetworkSupported() to return false
for TYPE_ETHERNET even if the device could otherwise support
Ethernet (e.g., via a USB host adapter). This can lead to APIs
APIs such as getActiveNetworkInfo and CONNECTIVITY_ACTION
behaving as if Ethernet was not present, even if it's connected.

Reduce the chance of this sort of misconfiguration by ensuring
that if the Ethernet service is running, isNetworkSupported
will return true for TYPE_ETHERNET. OEMs that would like the
function to return false should avoid starting the Ethernet
service.

Bug: 37359230
Test: ConnectivityManagerTest passes on aosp_bullhead
Change-Id: I395c689e47074910fb56bbd8fc5b2d698d3893ab
2017-09-27 14:01:48 +09:00
Sudheer Shanka
f23cf00410 CtsHostsideNetworkTests: Add more logging when the test fails.
Bug: 66015813
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I8e04e061b949a44e6c63bc56eba9612311065a4d
2017-09-26 18:19:43 -07:00
nharold
783f59fe25 Merge "Re-Add the IpSecService Tests" am: 7432695b11 am: 8a707e0272 am: 9239df04b3
am: c1810b9acc

Change-Id: I47ad3a9cb2e2bd2e212b84df7af8abe343a42947
2017-09-26 22:46:35 +00:00
nharold
c1810b9acc Merge "Re-Add the IpSecService Tests" am: 7432695b11 am: 8a707e0272
am: 9239df04b3

Change-Id: Ief88fda059556c0a1e94754766e3c800a390dd48
2017-09-26 22:36:47 +00:00
nharold
8a707e0272 Merge "Re-Add the IpSecService Tests"
am: 7432695b11

Change-Id: I5f4b69627fb54673ff4790342437c1917c9dad7a
2017-09-26 22:10:08 +00:00
nharold
7432695b11 Merge "Re-Add the IpSecService Tests" 2017-09-26 21:46:38 +00:00
Bill Yi
cbc75fa643 Merge remote-tracking branch 'aosp/oreo-cts-dev' into HEAD - DO NOT MERGE
Change-Id: I5a20ec8986f2bfc810cec42ca7b33310aba337a4
2017-09-15 13:55:36 -07:00
Jeff Sharkey
242935cb85 Merge "Fix flaky CtsHostsideNetworkTests." into oc-mr1-dev am: 91b52b4043
am: be3000bc35

Change-Id: I6c7005cd424b42367c8576f107b9c1e98ecac2e4
2017-09-15 04:17:16 +00:00
Etan Cohen
04038eb317 Merge "[AWARE][CTS] Check for location setting for test needing to disable Wi-Fi" into oc-dev
am: ba16d61c91

Change-Id: If02188d1840095be927a18b66296910c4ec7e387
2017-09-14 22:59:05 +00:00
Chenbo Feng
72ea1b2420 Merge "resolve merge conflicts of 921e4b7e1c to oc-dev" into oc-dev
am: f33518ff9d

Change-Id: I705950d7d620ac21cc74c2584c0e3256f17af15e
2017-09-14 03:55:19 +00:00
Sudheer Shanka
459e28159c Fix flaky CtsHostsideNetworkTests.
'set metered-network' adb command is not blocking, it doesn't
wait for the network to be marked as metered. Updated test
to sleep and poll for metered status.

Bug: 64274313
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests \
      -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: Ide3e1633167979bdca912c1c299ad17d988b537e
2017-09-13 18:17:01 -07:00
Nathan Harold
f304fce1fe Re-Add the IpSecService Tests
This reverts commit 18b7c24177.

Bug: 64800246
Test: compilation
Change-Id: Iee9561c7d41507a4eab4f901fef67a58ef5624f4
2017-09-12 18:47:38 -07:00
Sudheer Shanka
d74aab502f Merge "Add extra logging when the test fails." into oc-mr1-dev am: 27547e6446
am: c7779d69ab

Change-Id: I16667b3b7346e56449cafc2ad00bed71598d318f
2017-09-09 00:46:22 +00:00
Sudheer Shanka
518999df34 Add extra logging when the test fails.
When the test fails, dump network_management and netpolicy
services to help in debugging.

Bug: 64274313
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests \
      -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I76287de2c7cd6f394af9768a69e2c0fabba3be25
2017-09-07 15:36:08 -07:00
Sudheer Shanka
4418d66900 Merge "Add notification listener using the new shell command." into oc-mr1-dev am: a322dd9920
am: 0f3ddec924

Change-Id: Ibd07f1a78af3c705bdb10d79adcc1580deb8c5a6
2017-09-01 23:33:01 +00:00
Sudheer Shanka
46ec0e97b4 Add notification listener using the new shell command.
Adding notification listener by updating secure setting has
been deprecated.

Fixes: 65245599
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I98dbff45bffed592cba2cd964f1a148450a1197d
2017-08-31 17:42:41 -07:00
Bjoern Johansson
f4cc24488c Skip WifiManager tests if WiFi is not supported am: d4c2d2aca3
am: 68842e0e90

Change-Id: Ief127a3284c7ff8c3e1d32dce33c4a720e6f1e2b
2017-08-23 18:18:52 +00:00
Bjoern Johansson
68842e0e90 Skip WifiManager tests if WiFi is not supported
am: d4c2d2aca3

Change-Id: I87d6e927e5b739db343b013c212fc9fb1e076a98
2017-08-23 18:12:26 +00:00
Bjoern Johansson
d4c2d2aca3 Skip WifiManager tests if WiFi is not supported
Some of the WifiManager tests assumed that WiFi is always supported.
This is not true for all devices, for example the Android emulator, and
is not a requirement in the CDD.

BUG: 37633976
Test: Successfully ran 'run cts -m CtsNetTestCases'
Change-Id: Ia6d62e8d2b6e0b0c2ef2fafd50529e722e4419e4
(cherry picked from commit 9703adffd5e3bf85e482cdac45a1147caff4ac3d)
2017-08-23 15:52:48 +00:00
Bjoern Johansson
90d7ccec5f Merge "Skip WifiManager tests if WiFi is not supported" into oc-mr1-dev am: d6b3cb0682
am: 1450c12cc3

Change-Id: I6e344a21323d5fdb2205711fe1272e53ef8127c2
2017-08-23 03:07:47 +00:00
Tobias Thierer
d752d833ca Add ConnectivityManagerTest for Network.openConnection()
Associated CLs are refactoring code that this API relies on, and it's
not currently covered by any tests. This CL adds such a test to
ConnectivityManagerTest.

Test: Ensured that the following passes, and that it also passes when
      the early-exit (no WiFi/cellular connection) is removed:
      make cts && cts-tradefed run cts -m CtsNetTestCases \
      -t android.net.cts.ConnectivityManagerTest
Bug: 64021405
Change-Id: I84806533368fa592b9b8f4c78900542413af6aac
2017-08-21 13:12:42 +01:00
Bjoern Johansson
bd7f2904d9 Skip WifiManager tests if WiFi is not supported
Some of the WifiManager tests assumed that WiFi is always supported.
This is not true for all devices, for example the Android emulator, and
is not a requirement in the CDD.

BUG: 37633976
Test: Successfully ran 'run cts -m CtsNetTestCases'
Change-Id: Ia6d62e8d2b6e0b0c2ef2fafd50529e722e4419e4
2017-08-17 17:14:40 -07:00
Sudheer Shanka
4973a2119f Merge "Merge "Add location permission to netpolicy test app." into oc-mr1-dev am: 97cbea8559" into oc-mr1-dev-plus-aosp
am: 4e65b9608a

Change-Id: I999c157da7d004978e3ac51b917d5514eca011c7
2017-08-16 23:44:50 +00:00
Sudheer Shanka
a30a1edf9f Add location permission to netpolicy test app.
As part of the test, wifi ssid needs to be extracted which
is guarded by ACCESS_COARSE_LOCATION permission.

Bug: 64274313
Test: cts-tradefed run singleCommand cts-dev --module CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests

Change-Id: I5c23b11dc1bf26a672bc1454ff1e2594935d43d8
2017-08-16 10:17:59 -07:00
Sudheer Shanka
7fdfa5a9bd Merge "Add tests to check connectivity during temp-powersave-whitelist changes." 2017-08-11 01:36:20 +00:00
shreerag
7f06181c86 Merge "No longer using specific watch device idle settings" into oc-dev am: 8bde47ae82
am: eb2c021f93

Change-Id: Iff4af17accb81c3111c0a7517dfcb295858ad48f
2017-08-10 00:05:26 +00:00
shreerag
be05af9c47 Merge "No longer using specific watch device idle settings" into oc-dev am: 8bde47ae82
am: 940696d63a

Change-Id: Ic40011c3146b46249fe5da15d857e353aed55f40
2017-08-10 00:03:01 +00:00
shreerag
eb2c021f93 Merge "No longer using specific watch device idle settings" into oc-dev
am: 8bde47ae82

Change-Id: I46f8f4bdfea7ae4f75119226cbaa100365a260db
2017-08-09 23:58:26 +00:00
shreerag
940696d63a Merge "No longer using specific watch device idle settings" into oc-dev
am: 8bde47ae82

Change-Id: I04c8d9b4897cbd9ae4c2ae21439ae3d8ca0024a0
2017-08-09 23:58:26 +00:00
shreerag
f99d8d82b4 No longer using specific watch device idle settings
Bug: 28091250
Change-Id: Id57c5a638f5a10367d13f6353ea3212745a3f06e
2017-08-07 23:40:25 +00:00
Sudheer Shanka
6a001974c4 Add tests to check connectivity during temp-powersave-whitelist changes.
Bug: 30568426
Test: bit CtsHostsideNetworkTests:com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: Ic0ffd29c5e0d5f11bec229ecdf5fd8c55fef1478
2017-08-04 15:44:32 -07:00
Etan Cohen
c4043aebc6 Merge "[AWARE][CTS] Check for location setting for test needing to disable Wi-Fi" into oc-dev am: ba16d61c91
am: 9cf74ade23

Change-Id: I39b679393d97288ac80eb73ca22f63466bc85a9e
2017-07-29 20:16:46 +00:00
Etan Cohen
08cfd4e236 Merge "[AWARE][CTS] Check for location setting for test needing to disable Wi-Fi" into oc-dev am: ba16d61c91
am: daf01a0a1f

Change-Id: I460e11e330cf024b01e4b301c2f0761479d273b9
2017-07-29 20:16:46 +00:00
Etan Cohen
9cf74ade23 Merge "[AWARE][CTS] Check for location setting for test needing to disable Wi-Fi" into oc-dev
am: ba16d61c91

Change-Id: Iaee56d95f394116b731e8092ad2507eb113bb50c
2017-07-29 20:11:16 +00:00
Etan Cohen
daf01a0a1f Merge "[AWARE][CTS] Check for location setting for test needing to disable Wi-Fi" into oc-dev
am: ba16d61c91

Change-Id: I40dce2dfc27cb8cbbbbc61bf19f12d096a469d55
2017-07-29 20:11:16 +00:00
Etan Cohen
ba1f56050f [AWARE][CTS] Check for location setting for test needing to disable Wi-Fi
Disabling Wi-Fi API which is available to CTS only disables the
infrastructure mode (association to an AP). This disables the Wi-Fi
chip (HAL/driver/firmware) only if location scanning is disabled,
otherwise the chip is still enabled.

The failing CTS Wi-Fi Aware test relied on disabling the Wi-Fi chip.
This cannot be done from CTS. Added a check for location scan setting
and skip the test if enabled.

Cannot fail and require the tester to disable location scans since other
CTS tests require it to be enabled.

Bug: 64125460
Test: run cts with and without location scans
Change-Id: I0582926dbf854c14b57dcdeb383db9b5f2a353a2
2017-07-28 22:30:33 +00:00