Commit Graph

808 Commits

Author SHA1 Message Date
Jonathan Basseri
382ea38fc0 Use random available port in CTS tests.
Let the OS pick a random unused port so that the test never gets
EADDRINUSE.

Bug: 68657805
Test: Run tests in android.net.cts.IpSecManagerTest
Change-Id: I7f6c68f3c92f5cbed856eda52adcdffb8adc4734
2017-10-31 09:43:26 -07: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
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
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
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
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
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
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
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
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
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
Chenbo Feng
a4039ad8df Add test to check sock addr in qtaguid ctrl file
This test verifies the socket address information is not leaked by
xt_qtaguid module inside the kernel. The sock_addr parsed from
proc/net/xt_qtaguid/ctrl file should always be 0

Bug: 62489688
Test: in cts-tf: run cts --module CtsNativeNetTestCases

Change-Id: Ie9ed8aa604be7c6ae364baa69922b89c006dea72
2017-07-18 10:49:57 -07:00
Chenbo Feng
f048e836c0 Rename the native test file
Since more test is added to the qtaguid native test file, the previous
name is not suitable for representing the purpose of this test file.
Rename it to NativeQtaguidTest.cpp.

Bug: 62489688
Test: in cts-tf: run cts --module CtsNativeNetTestCases
Change-Id: Id64591db060c7d0178602517fd703dab586bfb5f
2017-07-18 10:49:11 -07:00
Chenbo Feng
700539bef5 Merge "resolve merge conflicts of 921e4b7e1c to oc-dev" into oc-dev
am: f33518ff9d

Change-Id: I055c066bcaaa004800db28d401fda54174ac5756
2017-07-18 08:33:10 +00:00
Chenbo Feng
b67b237853 resolve merge conflicts of 921e4b7e1c to oc-dev
Test: I solemnly swear I tested this conflict resolution.
      run cts --module CtsNativeTestCases

Change-Id: I4c8764a00d30ab7ff94eff07870ec79c7d7bc67d
2017-07-17 21:54:20 -07:00
Chenbo Feng
e2753dbabb Merge "Merge "Resolve merge conflicts of 8482d8c85c to nougat-cts-dev" into nougat-cts-dev am: e37efbd57e" into nougat-mr1-cts-dev
am: 26339f2d77

Change-Id: I7ba2bb548300d511ce0b7205e1055554406582f8
2017-07-17 21:11:59 +00:00
Chenbo Feng
3cd4cc6251 Merge "Resolve merge conflicts of 8482d8c85c to nougat-cts-dev" into nougat-cts-dev
am: e37efbd57e

Change-Id: Ic7c13aa9c7abee40a812f6d7879a2d474f096d03
2017-07-17 21:02:46 +00:00
Chenbo Feng
997814263d Resolve merge conflicts of 8482d8c85c to nougat-cts-dev
Test: I solemnly swear I tested this conflict resolution.
      in cts-tf: run cts --module CtsNativeNetTestCases

Change-Id: I15253841993a79320dafa8669f0289c28f4ff4ea
2017-07-17 20:44:39 +00:00
Chenbo Feng
ba65ffc462 Add test to check sock addr in qtaguid ctrl file
This test verifies the socket address information is not leaked by
xt_qtaguid module inside the kernel. The sock_addr parsed from
proc/net/xt_qtaguid/ctrl file should always be 0

Bug: 62489688
Test: in cts-tf: run cts --package android.net.native
2017-06-28 13:47:30 -07:00
Huihong Luo
af9c8fa600 Merge "cts: skip wifi related tests if wifi is unsupported" into oc-dev am: 73a81b18cd
am: 7e31eb7564

Change-Id: I6a6bd235a41b6d1474a7ded91a44cd1213ed4dd3
2017-06-21 00:49:34 +00:00
Huihong Luo
5383b735d5 Merge "cts: skip wifi related tests if wifi is unsupported" into oc-dev
am: 73a81b18cd

Change-Id: Iabc2d520201900ffa4930b90fb0a534053f357d9
2017-06-21 00:41:06 +00:00
Huihong Luo
7e31eb7564 Merge "cts: skip wifi related tests if wifi is unsupported" into oc-dev
am: 73a81b18cd

Change-Id: I95d0e84a5e0ff9f3966e3184ee7e80c555f46e99
2017-06-21 00:41:01 +00:00
TreeHugger Robot
73a81b18cd Merge "cts: skip wifi related tests if wifi is unsupported" into oc-dev 2017-06-21 00:31:47 +00:00
Rebecca Silberstein
9e49728771 Merge "WifiManagerTest: check softap mode supported" into oc-dev am: a2283cd312
am: db2fae593c

Change-Id: Iea257dc1f00c396e20f852a0d0ddd90272bb4e9e
2017-06-20 17:30:25 +00:00
Rebecca Silberstein
db2fae593c Merge "WifiManagerTest: check softap mode supported" into oc-dev
am: a2283cd312

Change-Id: I4c928c2fc4a639b94bb7d6f0bbf8762a2d8fe1ba
2017-06-20 17:24:57 +00:00
Rebecca Silberstein
88d9f08c93 Merge "WifiManagerTest: check softap mode supported" into oc-dev
am: a2283cd312

Change-Id: Ide833d2f2402ece0e8ba7adc3dc5ac1db81795a0
2017-06-20 17:24:57 +00:00
Rebecca Silberstein
a2283cd312 Merge "WifiManagerTest: check softap mode supported" into oc-dev 2017-06-20 17:18:25 +00:00
Roshan Pius
f1253618dd Merge "WifiManagerTest: Set key mgmt field in testWifiManagerNetWork" into oc-dev
am: 2cbd46c060

Change-Id: I1736f8f269ba2f4d53af9cd0a7c493d5adc99902
2017-06-20 04:07:32 +00:00
Roshan Pius
929683c04f WifiManagerTest: Set key mgmt field in testWifiManagerNetWork
By default |allowedKeyMgmt| is set to WPA_PSK, however the
|preSharedKey| is not set for this WifiConfiguration. So, the new
|validate| method added in ag/2339612, will reject the network update
(rightly so, because it's an invalid configuration). So, set the key
mgmt to |NONE| to indicate that this is an open network and hence does
not need the |preSharedKey| field.

Bug: 62418044
Test: Failing test passes now.
Change-Id: If979b909f2fb7d7b4e2626b57eff407ba6a019ab
(cherry picked from commit c7f4afa63708d898b7c0d0562b8b3ee3608114fe)
2017-06-19 21:13:11 +00:00
Chenbo Feng
b2b907c114 Merge "Add test to check sock addr in qtaguid ctrl file" am: 7f67f4521d am: 338fcfc742
am: 2738390adb

Change-Id: I6bdae98d42f3f04f06b59136897d097d74c7cfcd
2017-06-19 07:35:41 +00:00
Chenbo Feng
2738390adb Merge "Add test to check sock addr in qtaguid ctrl file" am: 7f67f4521d
am: 338fcfc742

Change-Id: Ie674dcb111e94c2cc52004cc6a4e83bcbadcc4ca
2017-06-19 07:30:13 +00:00
Chenbo Feng
da811bd336 Merge "Rename the native test file" am: 8867b298c4 am: 1f4f36b2af
am: b9591b1a27

Change-Id: I026e6e406d4b731e910035de2b75830b75d2d520
2017-06-19 06:17:06 +00:00