Commit Graph

2304 Commits

Author SHA1 Message Date
Chalard Jean
81e5cebe89 [automerger skipped] Merge "Add CTS tests for getMultipathPreference" am: 8d66f2dc82
am: f08cb4d828  -s ours

Change-Id: I090514ca4feac13b37cb8ac43ecc38dbc5d70d20
2018-04-03 02:59:05 -07:00
Chalard Jean
8d66f2dc82 Merge "Add CTS tests for getMultipathPreference" 2018-04-03 09:16:09 +00:00
Jiyong Park
9eb7a0feaa Merge "Allow net and media CTS tests to use hidden APIs" into pi-dev
am: 3233266e8d

Change-Id: Iab46c47114d535f26e8c044c4455cb7fd00c78fd
2018-04-02 23:31:18 -07:00
TreeHugger Robot
3233266e8d Merge "Allow net and media CTS tests to use hidden APIs" into pi-dev 2018-04-03 06:18:49 +00:00
Chalard Jean
8a0530bb9c Add CTS tests for getMultipathPreference
Test: Test passing with 1 or more connected wifis
      No wifi won't pass but it's already a requirement
Bug: 34630278

Change-Id: I43bf18943fbd00dc29417b18604e29f9111ec0b2
Merged-in: I43bf18943fbd00dc29417b18604e29f9111ec0b2
Merged-in: Ie90ca72ea3606dea4259984d42762dd742d59970
2018-04-03 05:27:38 +00:00
Chalard Jean
5ae4cd397d Merge "Add CTS tests for getMultipathPreference" into pi-dev
am: 38c80d304a

Change-Id: I8377ca86f047dc640a074828a5858fc419ec5489
2018-04-02 20:31:53 +00:00
TreeHugger Robot
38c80d304a Merge "Add CTS tests for getMultipathPreference" into pi-dev 2018-04-02 11:56:24 +00:00
Jiyong Park
b58fc866b4 Allow net and media CTS tests to use hidden APIs
MediaRecorderTest uses EncoderCapabilities.getVideoEncoders().
WifiManagerTest uses WifiManager.getTxPackageCount().

Pass the 'hidden-api-checks=false' flag to temporarily exempt the two
CTS packages from the hidden api check. We eventually should fix the
hidden API usage completely or exempt the violating tests only.

Bug: 77436928
Test: atest CtsMediaTestCases
Test: atest CtsNetTestCases
Change-Id: I85efbb08c24b87079c0360fc3f9a2267462592f0
2018-04-01 17:05:33 +09:00
Lorenzo Colitti
6b013119c7 [automerger skipped] Merge changes from topic "generic-sockets" into pi-dev
am: 0599bb578e  -s ours

Change-Id: I1a9af9f235d95594d6ed40f943a15ee5aaa51131
2018-03-31 07:49:40 +00:00
Lorenzo Colitti
0599bb578e Merge changes from topic "generic-sockets" into pi-dev
* changes:
  Prevent CTS from hanging if no UDP packet was received
  Switch checkTcp and checkUnconnectedUdp to use generic sockets
  Add generic socket interfaces and functions
  Add GCM to algorithms tested in CTS
2018-03-31 07:37:11 +00:00
Benedict Wong
bbd7e7c02d [automerger skipped] Merge "Update encapSocket API calls to getFileDescriptor" into pi-dev
am: cbe0a822b7  -s ours

Change-Id: Ifa01d1d2fcbfc671361dfe21d165dcbe51b03d86
2018-03-30 22:05:18 +00:00
Benedict Wong
cbe0a822b7 Merge "Update encapSocket API calls to getFileDescriptor" into pi-dev 2018-03-30 20:28:19 +00:00
Benedict Wong
be11beb63f Merge "Prevent CTS from hanging if no UDP packet was received" am: a48cb94938
am: 2a1b3d9320

Change-Id: Ia7bf725b3f30f3f288062ae170e8e234c2bc1c60
2018-03-30 19:06:11 +00:00
Benedict Wong
46ab91c260 Merge changes from topic "generic-socket" am: 77627ce58b
am: 7a78ef4349

Change-Id: I436d439af489dbe2f688094c6f7e983bda84d20d
2018-03-30 19:03:54 +00:00
Benedict Wong
b743691880 Merge "Add GCM to algorithms tested in CTS" am: 2a4463d257
am: ec017142ec

Change-Id: I539fc2fbe5f9b04450525f7d5f9938e46c111ab7
2018-03-30 19:00:20 +00:00
Benedict Wong
b9b074bc03 Prevent CTS from hanging if no UDP packet was received
Previously, CTS tests could block forever on attempting to read a packet
from a UDP socket.

This patch modifies the receive methods of the NativeUdpSocket wrapper,
allowing it to gracefully fail if UDP packets are not received.
This patch also updates the IKE over UDP encap socket test to use the
NativeUdpSocket wrapper, preventing the tests from hanging in the same
fashion.

Bug: 70938121
Test: Ran updated tests on walleye + marlin
Merged-In: I390e4585e85647eb8555e706d44b76f95dec931f
Change-Id: I390e4585e85647eb8555e706d44b76f95dec931f
(cherry picked from commit e2fcb9d64ba10f07a69a6b96a7f7e1465856172a)
2018-03-30 11:25:50 -07:00
Benedict Wong
60b87e1f6d Switch checkTcp and checkUnconnectedUdp to use generic sockets
This patch switches IpSecManager checkTransform() tests to use generic
sockets, allowing for exercising of Java sockets as well as native/OS
sockets.

Bug: 76152303
Test: This; ran on Walleye
Merged-In: I515227e7aa04c424aefbbe46209ddce81421b2f1
Change-Id: I515227e7aa04c424aefbbe46209ddce81421b2f1
(cherry picked from commit 796f61bb7be36f66302311f89caa74a3a3f13dad)
2018-03-30 11:25:42 -07:00
Benedict Wong
c33ed347f0 Add generic socket interfaces and functions
This patch adds functionality to unify java and native sockets. This is
part one of two of a change to allow functionality for testing full
coverage of all APIs.

Bug: 76152303
Test: Ran tests on Walleye
Merged-In: I9bd57d6267f82d8c1ac293a0147dc2c115dd4181
Change-Id: I9bd57d6267f82d8c1ac293a0147dc2c115dd4181
(cherry picked from commit d524e0785c7bbe5c7987f8ae01fdc5d57e13545d)
2018-03-30 11:25:31 -07:00
Jeff Sharkey
fcdf060c9f Merge "API council requested tweaks to NetworkRequest." into pi-dev
am: 12bd94f72e

Change-Id: Ib64bcc63a2c572b2b43a2ec2d8af5b5d977eae07
2018-03-30 18:25:25 +00:00
Benedict Wong
3c0ad1ddcc Add GCM to algorithms tested in CTS
This change adds all combinations of GCM algorithms, ensuring proper
support, config flags, and data accounting. Algorithm for calculating
size of packets has also been made more generic to allow for calculation
based on different encryption algorithms.

Bug: 73261868
Test: This
Merged-In: Ib77ac237fee75415223f0291cecc0b60ce76b77f
Change-Id: Ib77ac237fee75415223f0291cecc0b60ce76b77f
(cherry picked from commit f64579bceb6287f09503d940619d096aa8c1ac0d)
2018-03-30 11:25:14 -07:00
Benedict Wong
c8d2a142f0 Update encapSocket API calls to getFileDescriptor
This change updates the getSocket calls to getFileDescriptor, persuant
to new API.

Bug: 72473753
Test: CTS tests run on walleye
Merged-In: I65479cb35c88aee1f65c8597c3382cd30fa8d4a9
Change-Id: I65479cb35c88aee1f65c8597c3382cd30fa8d4a9
(cherry picked from commit 94d33818769cf60b9801b39875f5bc5dff2dc734)
2018-03-30 11:24:50 -07:00
Benedict Wong
a48cb94938 Merge "Prevent CTS from hanging if no UDP packet was received" 2018-03-30 18:17:56 +00:00
Benedict Wong
ef1a43e2c1 Prevent CTS from hanging if no UDP packet was received
Previously, CTS tests could block forever on attempting to read a packet
from a UDP socket.

This patch modifies the receive methods of the NativeUdpSocket wrapper,
allowing it to gracefully fail if UDP packets are not received.
This patch also updates the IKE over UDP encap socket test to use the
NativeUdpSocket wrapper, preventing the tests from hanging in the same
fashion.

Bug: 70938121
Test: Ran updated tests on walleye + marlin
Change-Id: I390e4585e85647eb8555e706d44b76f95dec931f
2018-03-30 18:17:21 +00:00
Benedict Wong
77627ce58b Merge changes from topic "generic-socket"
* changes:
  Switch checkTcp and checkUnconnectedUdp to use generic sockets
  Add generic socket interfaces and functions
2018-03-30 18:17:01 +00:00
Benedict Wong
376335421e Switch checkTcp and checkUnconnectedUdp to use generic sockets
This patch switches IpSecManager checkTransform() tests to use generic
sockets, allowing for exercising of Java sockets as well as native/OS
sockets.

Bug: 76152303
Test: This; ran on Walleye
Change-Id: I515227e7aa04c424aefbbe46209ddce81421b2f1
2018-03-30 18:15:36 +00:00
Benedict Wong
3f6d149f3d Add generic socket interfaces and functions
This patch adds functionality to unify java and native sockets. This is
part one of two of a change to allow functionality for testing full
coverage of all APIs.

Bug: 76152303
Test: Ran tests on Walleye
Change-Id: I9bd57d6267f82d8c1ac293a0147dc2c115dd4181
2018-03-30 18:14:46 +00:00
Benedict Wong
2a4463d257 Merge "Add GCM to algorithms tested in CTS" 2018-03-30 18:14:14 +00:00
Jeff Sharkey
12bd94f72e Merge "API council requested tweaks to NetworkRequest." into pi-dev 2018-03-30 16:30:23 +00:00
Lorenzo Colitti
b519fb253a Merge "Add CTS test for Network.fromNetworkHandle()" into pi-dev
am: 9269dc3d3f

Change-Id: I6cc1a78a3b402ce178a21a5dcd1f7ffdeac888b5
2018-03-30 14:33:14 +00:00
Chalard Jean
8d96a68560 Add CTS tests for getMultipathPreference
Test: Test passing with 1 or more connected wifis
      No wifi won't pass but it's already a requirement
Bug: 34630278

Change-Id: I43bf18943fbd00dc29417b18604e29f9111ec0b2
2018-03-30 23:07:21 +09:00
Lorenzo Colitti
3aac101bdb Merge "Update encapSocket API calls to getFileDescriptor" am: 8f507d4edd
am: 6c08a67073

Change-Id: If5bb95cb112f0f68e303421b2aa5895d2aba76a1
2018-03-30 06:42:19 +00:00
Lorenzo Colitti
8f507d4edd Merge "Update encapSocket API calls to getFileDescriptor" 2018-03-30 04:58:47 +00:00
Lorenzo Colitti
9269dc3d3f Merge "Add CTS test for Network.fromNetworkHandle()" into pi-dev 2018-03-30 01:36:10 +00:00
Sudheer Shanka
251053ce00 Merge "Don't reset battery status before disabling battery saver mode." into pi-dev
am: 217aee2c9c

Change-Id: I29e1fb2e6be9ee6a4c25bd025406eb740feec08c
2018-03-29 20:04:19 +00:00
Sudheer Shanka
217aee2c9c Merge "Don't reset battery status before disabling battery saver mode." into pi-dev 2018-03-29 19:32:56 +00:00
Sudheer Shanka
6d389c2bfc Don't reset battery status before disabling battery saver mode.
Resetting battery status makes the "disabling battery saver mode"
operation that follows it a no-op if the device is plugged-in to power.
In this case, sticky battery saver status won't get reset and might
affect the tests following it.

Also, change back turnBatteryOff -> "cmd battery reset" since issue "72502904"
is fixed now.

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

Change-Id: I93e11c714200e8de6864a3bd7627eb66842a39d1
2018-03-29 10:29:16 -07:00
Sudheer Shanka
3d3ee1768d Merge "Turn screen-on if needed, on every iteration network access is verified." into pi-dev
am: b4c9ba42b0

Change-Id: Ie7d3049f479a8f17f8b8bb1ee7e6e4d05a71ca77
2018-03-29 14:16:47 +00:00
Sudheer Shanka
b4c9ba42b0 Merge "Turn screen-on if needed, on every iteration network access is verified." into pi-dev 2018-03-29 14:03:06 +00:00
Paul Jensen
d3b6046c65 Add CTS test for Network.fromNetworkHandle()
Bug: 77210159
Bug: 64148938
Test: make CtsNetTestCases

Change-Id: I38d34cb4af681f1b1030d7f8d0404af210e43912
2018-03-29 07:29:33 -04:00
Sudheer Shanka
10864275fb Turn screen-on if needed, on every iteration network access is verified.
In some cases, we verify network connection is available to an app while
in foreground. If the app's foreground status is due to top activity, it
will lose the foreground status in case the screen goes off. So, turn
the screen-on while verifying for network connectivity.

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

Change-Id: Id1a49cedc2501859f73deead372afb7f6a41baac
2018-03-28 18:57:42 -07:00
Jeff Sharkey
ee374f3929 API council requested tweaks to NetworkRequest.
If you put values into the Builder, you should be able to observe
those values on the built object.

Test: atest android.net.cts.NetworkRequestTest
Bug: 74945408
Change-Id: I894a82c10eb13c46fb764384e6c5348dde8df154
2018-03-28 16:04:02 -06:00
Benedict Wong
8a10b8cd6c [automerger skipped] Merge "Add tests where only auth or crypt are enabled" into pi-dev
am: 357918421e  -s ours

Change-Id: Ief37092d24745f5dd8179d519b9ac8dbd8ae631e
2018-03-28 00:13:47 +00:00
Benedict Wong
675406b789 Update encapSocket API calls to getFileDescriptor
This change updates the getSocket calls to getFileDescriptor, persuant
to new API.

Bug: 72473753
Test: CTS tests run on walleye
Change-Id: I65479cb35c88aee1f65c8597c3382cd30fa8d4a9
2018-03-27 17:00:41 -07:00
Benedict Wong
f3e34ff699 Add GCM to algorithms tested in CTS
This change adds all combinations of GCM algorithms, ensuring proper
support, config flags, and data accounting. Algorithm for calculating
size of packets has also been made more generic to allow for calculation
based on different encryption algorithms.

Bug: 73261868
Test: This
Change-Id: Ib77ac237fee75415223f0291cecc0b60ce76b77f
2018-03-27 16:37:41 -07:00
Benedict Wong
7fc961f929 Add tests where only auth or crypt are enabled
This patch adds tests for cases where only auth or crypt are enabled.
These cases are supported, and this patch adds test coverage.

Bug: 75049573
Test: this, run on walleye
Merged-In: I656d9c4a86c13ce4928d6bd68a9e0d48cf805191
Change-Id: I656d9c4a86c13ce4928d6bd68a9e0d48cf805191
(cherry picked from commit 69517633288bac80d31f53720b2837b261926485)
2018-03-23 11:06:19 -07:00
Benedict Wong
993f593a6c Merge "Add tests where only auth or crypt are enabled" am: d4477edaf3
am: 5efa3cd9af

Change-Id: I9ce760cc06b040729d045e3c89d792d93bb4b439
2018-03-23 18:04:25 +00:00
Benedict Wong
d4477edaf3 Merge "Add tests where only auth or crypt are enabled" 2018-03-23 17:25:10 +00:00
Fyodor Kupolov
8aabf43066 Merge "Allow cleartext traffic for the test app" into pi-dev
am: c7cb020735

Change-Id: I8bd2191564ef32f458fffa087107993d950b162f
2018-03-23 02:47:31 +00:00
Fyodor Kupolov
9636bf48f8 Allow cleartext traffic for the test app
Test: HostsideRestrictBackgroundNetworkTests
Bug: 75978847
Change-Id: I8962a0e30120ffb4e98b1fb661df277236715656
2018-03-22 15:19:52 -07:00
Benedict Wong
f8ccb00aa6 Add tests where only auth or crypt are enabled
This patch adds tests for cases where only auth or crypt are enabled.
These cases are supported, and this patch adds test coverage.

Bug: 75049573
Test: this, run on walleye
Change-Id: I656d9c4a86c13ce4928d6bd68a9e0d48cf805191
2018-03-22 20:58:21 +00:00