Commit Graph

846 Commits

Author SHA1 Message Date
Etan Cohen
5b0b9f0690 Merge "Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0" am: eedaf74628 am: fb02e14772
am: 1b7972c3ad

Change-Id: I42f297ae31332ef5e430f928758a2d94d3b2c5e8
2017-10-24 18:23:23 +00:00
Etan Cohen
1b7972c3ad Merge "Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0" am: eedaf74628
am: fb02e14772

Change-Id: I7c58480a13841513cfeec082daafc2bc4764fc83
2017-10-24 18:15:39 +00:00
Etan Cohen
fb02e14772 Merge "Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0"
am: eedaf74628

Change-Id: Id1dd3f957f911db94c291484a0f313a7239634e8
2017-10-24 18:09:00 +00:00
Etan Cohen
1b5d253694 Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev
am: d5c00ceee0

Change-Id: I0d937d53fd3c151b67d8dd263d2c5d5f7f89dd50
2017-10-24 17:57:49 +00:00
Benedict Wong
0c9badeec9 Merge "Add UDP encap socket test to CTS tests" am: 9b85584096 am: 59c10d21d4
am: 6b2dcb1981

Change-Id: I46a496a4732e6a558d5ab068d8fadb990b041ec2
2017-10-24 16:58:17 +00:00
Benedict Wong
6b2dcb1981 Merge "Add UDP encap socket test to CTS tests" am: 9b85584096
am: 59c10d21d4

Change-Id: I4bb69fe63bdcba3c92f27f0542c282b505f64dcf
2017-10-24 16:43:44 +00:00
Benedict Wong
59c10d21d4 Merge "Add UDP encap socket test to CTS tests"
am: 9b85584096

Change-Id: Ic819770bb02cfc08018068ad43b05dc39aa0e170
2017-10-24 16:38:42 +00:00
Benedict Wong
9b85584096 Merge "Add UDP encap socket test to CTS tests" 2017-10-24 16:31:12 +00:00
Etan Cohen
591518f378 [CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network
Before calling the testAddPasspointConfigWithCertCredential
we need to check number of network already present in device

Bug: 67630919
Test: android.server.cts.CtsNetTestCases, WifiManagerTest
Change-Id: If643ab7bde760a65e9a5b1e9d47af53378a178fd
2017-10-23 23:07:59 +00:00
Benedict Wong
d777ed231c Add UDP encap socket test to CTS tests
Tests basic functionality of UDP encap sockets:
> Creates SPIs
> Creates & applies transforms
> Creates UDP encap socket
> Ensures UDP encap socket port is non-zero
> Validates that ESP, IKE packets can be sent correctly

Test: Ran on aosp_angler-eng
Bug: 67662580
Change-Id: Ia7eca384cd779e663d53cbede97ec70da33d28ec
2017-10-23 15:59:09 -07:00
Chih-hung Hsieh
93b6fc1201 Merge "Use -Werror in cts/.../Anroid.mk" am: 3012fb2ba0 am: c4e5ef0549 am: 07c17c56d6
am: 9905ef8518

Change-Id: Ibbc77d28e3d3d42963f10f223155a7a5e2b2dcbb
2017-10-20 23:16:15 +00:00
Chih-hung Hsieh
9905ef8518 Merge "Use -Werror in cts/.../Anroid.mk" am: 3012fb2ba0 am: c4e5ef0549
am: 07c17c56d6

Change-Id: Ie8ccfeb1c924aaa16c6c63cabea7609ec0946082
2017-10-20 22:54:33 +00:00
Chih-hung Hsieh
c4e5ef0549 Merge "Use -Werror in cts/.../Anroid.mk"
am: 3012fb2ba0

Change-Id: I9745c0cbef7ad12f950a5a68a45bf691776fb5ed
2017-10-20 22:42:31 +00:00
Chih-Hung Hsieh
78061072b6 Use -Werror in cts/.../Anroid.mk
* Suppress existing warnings.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ic599c9e11ea4f991b7e60930c891a6d736623b39
2017-10-18 16:55:15 -07:00
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