Commit Graph

1761 Commits

Author SHA1 Message Date
manojboopathi
f1c7d18cf2 Added CTS to test dual stack socket for TCP & UDP
This ensures the function IpSecManager.applyTransportModeTransform()
works as expected when used with Java sockets.

Bug: 70160694
Test: Ran CTS test (./run_cts.sh)
Change-Id: Ia4b636c0f48a0eeffb8813d271e59aeb86bd44bc
2018-01-02 13:54:04 -08:00
Benedict Wong
b04f7cea99 Fix IpSecManager CTS tests on 4.4 kernels
Investigation shows that 4.4 kernels take longer for loopback TCP
packets to be ack'd, and results in extra ack packets to be generated in
cases where both the server and client sockets send data packets at the
same time. This was verified via TCPdump, where an extra ack packet was
generated per run of the bidirectional transmissions in checkTcp().

This change verifies that the data + ack packets have been sent and
counted before initiating the reverse transmission. Further, changes
have been made to improve the reliability of this code via counting
expected packets (rather than sleeps).

Bug: 62994731
Test: CTS tests run (and passing) on walleye, marlin and angler
Change-Id: I7c707ec3b11235a5a9cba10275aee40e2eb37169
2017-12-21 15:02:04 -08:00
Benedict Wong
eca595be58 Merge "[ipsec-qtaguid] Update tests to check data usage" 2017-12-18 23:50:52 +00:00
Benedict Wong
0bff9ab1c4 [ipsec-qtaguid] Update tests to check data usage
This change ensures that all forms of transport-mode packets are
correctly accounted for, and not double-counted. This includes both
per-UID counters, as well as interface counters.

Bug: 62994731
Test: CTS tests updated, passing
Change-Id: I83be0724ac21d9db7d91ce72733d13fb6736e66e
2017-12-18 19:46:30 +00:00
Treehugger Robot
8d7d4479a5 Merge "Clear some random compile warnings." 2017-12-14 21:51:21 +00:00
nharold
123988e6e1 Merge "Update CTS to use renamed API method." 2017-12-14 21:10:16 +00:00
Jonathan Basseri
b58d3aa5b8 Update CTS to use renamed API method.
IPsec API is renaming reserveSecurityParameterIndex to
allocateSecurityParameterIndex. Update tests to reflect this.

Bug: 69128142
Test: TreeHugger should be enough
Change-Id: I0bfaa3584920096ffde7f9eeee9fccd0ec842821
2017-12-14 21:09:28 +00:00
David Benjamin
6208358a7c Clear some random compile warnings.
I saw a bunch fly by. Here are a few fixes.

ssize_t is %zd. Types from stdint.h use PRI* macros from inttypes.h.
Finally, use C99 initializers rather than the old GNU extension.

Test: make checkbuild
Change-Id: I343dfb99984ab826c7641e311e041e859eb61d93
2017-12-13 22:15:09 +00:00
Nathan Harold
78a4d4300b Fix IpSecAlgorithm Lengths in IpSecManagerTest
Update the key lengths for SHA1 and MD5 authentication
to pass the new tighter range checks.

Bug: 70324823
Test: this

Change-Id: I8f533f043d16b0571bac628d21878e31027fe853
2017-12-08 19:12:56 -08:00
Xin Li
94b8755057 Merge "DO NOT MERGE: Merge Oreo MR1 into master" 2017-12-06 23:18:30 +00:00
Manoj Boopathi Raj
129129a6ad Merge "Test more transforms and more socket types."
am: d292f764bd

Change-Id: Icdf454b74803f0bdf4f42caaccd34ec6bd72a224
2017-11-16 18:02:38 +00:00
Lorenzo Colitti
bca5ed9431 Test more transforms and more socket types.
Added CTS test to check the transform (for IPv4 & IPv6) with
various authentication & encryptions types

Bug: 34812052
Test: Ran CTS on angler using aosp/run_cts.sh
Change-Id: I51b4d13847ed0f8ad8d5f19132fdb35b1bd2950c
2017-11-15 14:12:31 -08:00
Xin Li
6e0e8f25d8 Merge commit 'ba1e9e7f7893a079138330d2962ff75c35d4cae2' from
oc-mr1-dev-plus-aosp into stage-aosp-master.

Change-Id: I1172a1501c65f67b9c2829b739cadeb9e9ff1983
2017-11-14 11:40:13 -08:00
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
Android Merger
eedaf74628 Merge "Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev am: d5c00ceee0" 2017-10-24 17:58:16 +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
Treehugger Robot
d5c00ceee0 Merge "[CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network" into oreo-cts-dev 2017-10-24 17:50:46 +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
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
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
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
9660be6828 Merge "Ensure that Ethernet is supported if the service is running." into oc-mr1-dev
am: 8c82e9fc98

Change-Id: I0f14fcb228e4433dc01559a28060c26377daa2a6
2017-09-27 11:19:43 +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
24aa40363f Merge "Ensure that Ethernet is supported if the service is running." am: 266fad4970
am: ace309a7ad

Change-Id: I6a1e8364c3e0801cf75e13920606ec04a1054e12
2017-09-27 08:39:18 +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
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
9239df04b3 Merge "Re-Add the IpSecService Tests" am: 7432695b11
am: 8a707e0272

Change-Id: Ib98a87b3a86cc74c15574a0af9fb3460273e834d
2017-09-26 22:21:42 +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
d2cc39174c Merge remote-tracking branch 'aosp/oreo-cts-dev' into HEAD - DO NOT MERGE am: cbc75fa643 -s ours am: 7f71a70fd9 -s ours
am: 81257a1750

Change-Id: Ieaa54811613264b57bf6d6b5c3e4df7a796e1a3d
2017-09-15 22:52:50 +00:00
Bill Yi
81257a1750 Merge remote-tracking branch 'aosp/oreo-cts-dev' into HEAD - DO NOT MERGE am: cbc75fa643 -s ours
am: 7f71a70fd9  -s ours

Change-Id: I9f05351ed2accaa83b18bb425a268fad4adab49a
2017-09-15 21:16:06 +00:00
Bill Yi
7f71a70fd9 Merge remote-tracking branch 'aosp/oreo-cts-dev' into HEAD - DO NOT MERGE
am: cbc75fa643  -s ours

Change-Id: I45e3591111d0459cd1ff2be079ad525568da76f3
2017-09-15 21:11:07 +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
1c97094149 Merge "Merge "[AWARE][CTS] Check for location setting for test needing to disable Wi-Fi" into oc-dev am: ba16d61c91" am: 98792d616b am: 507654d6ae
am: 310a56dcb0

Change-Id: I3065b70d37211fe1d4980348b8c4fdfa720eab3f
2017-09-15 03:16:47 +00:00
Etan Cohen
310a56dcb0 Merge "Merge "[AWARE][CTS] Check for location setting for test needing to disable Wi-Fi" into oc-dev am: ba16d61c91" am: 98792d616b
am: 507654d6ae

Change-Id: Ifb6c3b2f19597186785f063ec19fc36959f0284f
2017-09-15 02:57:02 +00:00
Etan Cohen
507654d6ae Merge "Merge "[AWARE][CTS] Check for location setting for test needing to disable Wi-Fi" into oc-dev am: ba16d61c91"
am: 98792d616b

Change-Id: I1882f7e73325c4b938f22b2f7e29d203117819b9
2017-09-15 02:43:55 +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