Commit Graph

683 Commits

Author SHA1 Message Date
TreeHugger Robot
8a16ce5a11 Merge "wifi: hotspot2: remove usage of hidden Passpoint APIs" into oc-dev 2017-05-18 18:49:06 +00:00
Sudheer Shanka
e60355110f Merge "Add cts to test power-save-except-idle whitelist is correctly used." into oc-dev 2017-05-15 18:15:32 +00:00
Peter Qiu
af75a22435 wifi: fix testWifiManagerActions test failure
WifiManager#pingSupplicant is deprecated and its semantics had changed.
So remove it in testWifiManagerActions to fix the test.

Bug: 37991667
Test: cts-tradefed run cts-dev --module CtsNetTestCases --test
      android.net.wifi.cts.WifiManagerTest#testWifiManagerActions

Change-Id: I9b64cb6d03c253f143a78caca72b75678973034b
2017-05-04 11:31:04 -07:00
Peter Qiu
d11e41a322 wifi: hotspot2: remove usage of hidden Passpoint APIs
The APIs for Release 2 configuration are now hidden,
so remove the usage of those APIs.

Also use a trusted public certificate instead of a fake
one for testing Release 1 configuration,  since it will
be verified by WifiService when adding a Release 1 configuration.

Bug: 37907977
Test: cts-tradefed run cts-dev --module CtsNetTestCases --test android.net.wifi.cts

Change-Id: Ie1056b97da1597ff1cdc979e9c2a57f19f58e0a3
2017-05-04 10:24:37 -07:00
Sudheer Shanka
569fdfd845 Merge "Fix CtsHostsideNetworkTests." into oc-dev 2017-05-02 05:12:53 +00:00
Sudheer Shanka
679887f66a Add cts to test power-save-except-idle whitelist is correctly used.
Bug: 37670935
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: I03619bec15e14707ab103c77feab08d3520a2914
2017-05-01 14:29:56 -07:00
Sudheer Shanka
7655b694ec Fix CtsHostsideNetworkTests.
The changes made to ensuring network connectivity on app start
only applies to activities. There is no change in how the services
are handled.

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

Change-Id: Ib82b07195e395c89701dd525b850c0935d94dfe7
2017-05-01 11:55:53 -07:00
Peter Qiu
7359ffec6e wifi: update method name for timestamp related APIs
Bug: 37514629
Test: build
Change-Id: I090bc8049e534ef8811104f732fa4183ba87603f
2017-05-01 09:37:36 -07:00
Lorenzo Colitti
6a25ed09f9 Merge "Update CTS tests to reflect ConnectivityManager API changes." into oc-dev 2017-04-28 03:58:10 +00:00
Lorenzo Colitti
b58d8aa66a Update CTS tests to reflect ConnectivityManager API changes.
Bug: 36370941
Test: marlin-eng builds
Change-Id: Icb127e468698711669ecc2c2002ff8add56700e0
2017-04-28 09:34:06 +09:00
Nathan Harold
c75b01f03e Remove IpSecManagerTest
IpSecManager and its associated classes are removed from OC.
They are planned for a future release.

Bug: 37681043
Test: make cts
Change-Id: I2ff911d5c62dbbf9be699330742d041706d9cbc2
Merged-In: I2ff911d5c62dbbf9be699330742d041706d9cbc2
(cherry picked from commit 3a51173a3a762b576dd3c0d29c883e8763a9f95b)
2017-04-25 16:53:33 -07:00
Etan Cohen
6ae63d613c Merge "[AWARE] Rename destroy() method to close()" into oc-dev 2017-04-25 03:26:04 +00:00
Etan Cohen
2fa28c39ae [AWARE] Rename destroy() method to close()
Aware classes with destroy() methods (containing resources)
converted to be AutoCloseable. As such the destroy method
was renamed.

Bug: 37514387
Test: unit tests and integration (sl4a) tests passing.
Merged-In: I433d7cf6f4c60bab4230702075ea22b9c56f31af
Change-Id: I433d7cf6f4c60bab4230702075ea22b9c56f31af
2017-04-21 14:05:45 -07:00
Sudheer Shanka
99ec4c0d91 Revert "Relax the check of network availability in CtsHostsideNetworkTests."
This reverts commit 863ec4b9cb.

Bug: 27803922
Change-Id: I3ccf33779df580ed615f44d0410676cba972ea6c
2017-04-19 17:36:32 +00:00
Nathan Harold
d017754253 Merge "Remove DatagramSocket calls from IpSecManagerTest" into oc-dev 2017-04-19 00:36:18 +00:00
Nathan Harold
372975ecb2 Remove DatagramSocket calls from IpSecManagerTest
Because the DatagramSocket version of the API is being
hidden, this test is being converted to use the
FileDescriptor version of applyTransportModeTransform()
and removeTransportModeTransform()

Bug: 37446006
Test: compilation
Merged-In: Ida4977a6e7496ce6b4de38bfd48bd6a162cab874
Change-Id: Ida4977a6e7496ce6b4de38bfd48bd6a162cab874
(cherry picked from commit 8e0db4ceaa9b2940942132e452d44cd59ff971e2)
2017-04-17 22:04:36 -07:00
Sudheer Shanka
a61bc6a566 Merge "Skip data saver related tests if the device doesn't support it." into oc-dev 2017-04-18 04:23:20 +00:00
Tina Zhou
ecb7895518 Merge "[CTS]It should be more reasonable to use setBatterySaverMode API to leave power-save mode instead of plugging in charger for "CtsHostsideNetworkTests" test case." into nougat-mr1-cts-dev am: 6ee31c8e8f am: af849f9dc0 am: ba9c18e7af
am: 9d66f94f38

Change-Id: I5e4b1272325ab0f16eb4cfc981b10a05c776a2da
2017-04-17 17:58:56 +00:00
Tina Zhou
af849f9dc0 Merge "[CTS]It should be more reasonable to use setBatterySaverMode API to leave power-save mode instead of plugging in charger for "CtsHostsideNetworkTests" test case." into nougat-mr1-cts-dev
am: 6ee31c8e8f

Change-Id: Ie16ec6e4e3d139da6bb66d18bba18c97b1ed7a4c
2017-04-17 17:43:44 +00:00
Tina Zhou
6ee31c8e8f Merge "[CTS]It should be more reasonable to use setBatterySaverMode API to leave power-save mode instead of plugging in charger for "CtsHostsideNetworkTests" test case." into nougat-mr1-cts-dev 2017-04-17 17:37:29 +00:00
Nathan Harold
a1ba8122b6 Update IpSecAlgorithm CTS for API compliance changes
Bug: 36073210, b/34811227
Test: verified on Bullhead
Change-Id: I8f37016cc9aadafd3e58f6af535bd7bc1d0f4a96
2017-04-13 15:04:10 -07:00
Jocelyn Dang
f9a022629f Merge "Change test to use set-mode cmd." into oc-dev 2017-04-13 18:38:14 +00:00
Joel Scherpelz
c805581fc0 Add CTS test to verify router solicitation backoff
Add two new test cases to ConnectivityManagerTest:
testRouterSolicitations()
testRouterSolicitationMaxInterval()

Bug: 33620395
Test: ConnectivityManagerTest CTS test passes with WIFI on/off
Change-Id: Iac8979dfab29ae75343a355d02acfb0f39b491f9
2017-04-13 15:33:28 +09:00
Joel Scherpelz
eb290f96b3 Add CTS to verify RIO min/max prefix length
Add two new test cases to ConnectivityManagerTest:
testAcceptRaRtInfoMinPlen()
testAcceptRaRtInfoMaxPlen()

Bug: 33333670
Test: ConnectivityManagerTest CTS test passes with WIFI on/off
Change-Id: I3c0a6823b6fa75f55f9bb99b59557abeb5b9ac62
2017-04-13 14:42:26 +09:00
Joel Scherpelz
61b18d0d8e Refactor repeated WIFI bringup code in ConnectivityManagerTest
This is a minor code health change motivated by upcoming additions to
ConnectivityManagerTest. Common code to drive WIFI to a connected state
is now shared along with automatic cleanup code to restore wifi to its
original state in tearDown().

Bug: 33333670
Test: CtsNetTestCases test passes
Change-Id: I62a2748f113650f7a235af3074e33cc0cefe4a3b
(cherry picked from commit 49eaabd72c1a5346750342ffc956c4b903ca532c)
2017-04-13 05:27:51 +00:00
Jocelyn Dang
e7d7cd1369 Change test to use set-mode cmd.
Change-Id: I23c0888ba105067f19ebe516ce3fbc6868ed2b17
2017-04-12 15:31:51 -07:00
Etan Cohen
697f449f89 Merge "[AWARE] Add CTS tests for publish/subscribe TTL" into oc-dev 2017-04-06 04:11:06 +00:00
Nathan Harold
3f2eeb569a Merge "Initial CTS Tests for IpSec Classes" into oc-dev 2017-04-06 01:34:34 +00:00
Peter Qiu
b45c3dc6f1 wifi: catch UnsupportedOperationException for devices with Passpoint disabled
For devices with build config |config_wifi_hotspot2_enabled| set to false
(Passpoint disabled), an UnsupportedOperationException will be thrown
when Passpoint related WifiManager APIs are invoked.  For these devices,
the testing of Passpoint APIs are not relevant. So just catch and ignore
this type of exceptions to avoid any test failures.

While there, set the UpdateIdentifier for Passpoint configurations, to avoid
the CA certificate verification when adding the config, since we're using
a fake CA certificate for testing.

Bug: 36863137
Test: cts-tradefed run cts-dev -m CtsNetTestCases -t android.net.wifi.cts.WifiManagerTest
Change-Id: I8ebdc58349c33f13b510c3d9e2a5fc8ce4ef09c4
2017-04-03 17:27:18 -07:00
Nathan Harold
ea6bd5400a Initial CTS Tests for IpSec Classes
-Test SPI creation, duplication and deletion
-Test IpSecTransform creation, apply to socket, and delete

Bug: 30984788, 34811227
Test: Verified on Bullhead with UDP on IPv6 (default)
Change-Id: I1ffc84e549c7666996472ed323eb44810c3b9843
(cherry picked from commit 4eddc41200c1912b40218d0ee7b0f0cc05c1a960)
2017-04-04 00:16:04 +00:00
Sudheer Shanka
41914d36f3 DO NOT MERGE: Skip data saver related tests if the device doesn't support it.
Bug: 36007771
Test: manual
Change-Id: I817d2cc23e5c8d460367ede749ff35e799f48ee0
2017-03-31 15:50:01 -07:00
Sudheer Shanka
894c917c9b Skip data saver related tests if the device doesn't support it.
Bug: 36007771
Test: manual
Change-Id: I817d2cc23e5c8d460367ede749ff35e799f48ee0
2017-03-31 15:49:03 -07:00
Etan Cohen
c9819a49a5 [AWARE] Add CTS tests for publish/subscribe TTL
Add time-to-live (TTL) testing on publish/subscribe. Can
be verified with single device testing.

Bug: 30556108
Test: CTS tests pass
Change-Id: Ic0fc6b7bd2bc12a5e615b3334a5373da73ccfbf6
2017-03-28 13:31:54 -07:00
Lorenzo Colitti
d3e27e4bf0 Require that the VPN tests pass on TVs.
The tests were skipped for historical reasons that are no longer
valid, and creates a hole in testing because there are now
several VPN apps that work on TVs.

Test: HostsideVpnTests passes on fugu with UID routing kernel bug fixed
Bug: 36465489
Change-Id: Ib0d6a5cec085e1fc09cf0609b08ca897629afe0c
2017-03-24 17:44:59 +00:00
Peter Qiu
7a94754ea8 Merge "wifi: hotspot2: verify getter methods" am: b296f84ce8 am: c5d2212da7
am: c2207fd342

Change-Id: I54b6969ccc2f0b8d50825c0eb4bd2cddc3f04829
2017-03-22 00:13:35 +00:00
Treehugger Robot
b296f84ce8 Merge "wifi: hotspot2: verify getter methods" 2017-03-21 23:55:16 +00:00
peter_li
e5ad8b0bb1 [CTS]It should be more reasonable to use setBatterySaverMode API to leave power-save mode instead of plugging in charger for "CtsHostsideNetworkTests" test case.
Symptom: It should be more reasonable to use setBatterySaverMode API to leave power-save mode instead of plugging in charger for "CtsHostsideNetworkTests" test case.
Root Cause: It uses setBatterySaverMode API to enter power-save mode and uses plugging in charger to leave power save mode.It should be more reasonable to use setBatterySaverMode API to leave power-save mode instead of plugging in charger.
Solution: To use setBatterySaverMode API to leave power-save mode instead of plugging in charger.
Project: N70
Note: NA
Test done by RD:
Futher testing need Q team's support:

Change-Id: I491c5d0675f340e1c9911b84e41f034663b1454d
2017-03-21 20:03:18 +08:00
Lorenzo Colitti
c39ca5d21b Merge "Dup fds to stop finalizers from invalidating them." am: d7a02820ac am: 3232d55bdf
am: 6607f6d59b

Change-Id: I5054509fcc60b1eaae11723f6aaf0d1bdc770335
2017-03-16 03:44:41 +00:00
Lorenzo Colitti
d7a02820ac Merge "Dup fds to stop finalizers from invalidating them." 2017-03-16 03:27:14 +00:00
Lorenzo Colitti
a7ec8300d9 Dup fds to stop finalizers from invalidating them.
The hostside VPN tests were failing because finalizers were
closing the ParcelFileDescriptors that we use to get socekt fds.
The close operations were causing the fds to be marked as invalid
(i.e., -1), causing the tests' system calls on them to fail with
EBADF.

Fix this by dup(2)ing the fds and closing the original objects.

Also, add some asserts to debug this sort of failure.

Fix: 35927643
Test: HostsideVpnTests passed 20/20 times on bullhead
Change-Id: If88530b5bd32622bd4726cd6f0907f731209bb43
2017-03-16 08:25:55 +09:00
Peter Qiu
154dea6b60 wifi: update callsite for Passpoint configuration management APIs
The APIs are updated to not return a boolean status based on
the API Councils comment.  So update the callsite accordingly.

Bug: 35858311
Test: make -j32
Change-Id: Ie9106ecddb2b15178ad37ec6f014d5cc7ce77c43
Merged-In: Ie9106ecddb2b15178ad37ec6f014d5cc7ce77c43
2017-03-13 10:35:44 -07:00
TreeHugger Robot
83abdbdc04 Merge "wifi: update callsite for Passpoint configuration management APIs" 2017-03-13 17:30:30 +00:00
Peter Qiu
d5fc89275d wifi: hotspot2: verify getter methods
Bug: 35756298
Test: run PpsMoParserTest
Change-Id: Ib70bf59f76815e89ba0fc5d67a26502788e19c86
2017-03-10 12:35:59 -08:00
Etan Cohen
8b245e8d19 Merge "[AWARE] Update network creation tests open/encrypted API" am: 148f767737 am: fc1043e9ba
am: 31893a78ba

Change-Id: I2c62de95be9fcc662f9c8857252c09a2e37c8d15
2017-03-10 17:27:03 +00:00
Peter Qiu
6bf853a9e1 wifi: update callsite for Passpoint configuration management APIs
The APIs are updated to not return a boolean status based on
the API Councils comment.  So update the callsite accordingly.

Bug: 35858311
Test: make -j32
Change-Id: Ie9106ecddb2b15178ad37ec6f014d5cc7ce77c43
2017-03-09 13:18:32 -08:00
Etan Cohen
9602110a36 [AWARE] Update network creation tests open/encrypted API
Updated/add CTS tests to validate createNetworkSpecifierXxx
API for open and passphrase modules. As these are (still)
single-ended CTS tests - they validate failure.

Bug: 26564544
Test: CTS passing
Change-Id: I07b76bee5a9b73780d341ac8511a2738ded751ca
2017-03-08 09:08:00 -08:00
Etan Cohen
a231f5ed09 Merge "[AWARE] CTS for Aware data-path creation" am: 8ee5d70b27 am: 5191f48899
am: a268f3e3b0

Change-Id: I9b38ca00c55b19ce172c6904b0b0fa33800ac5f9
2017-03-07 23:53:53 +00:00
Etan Cohen
e455ae097a Merge "[AWARE] CTS for failure mode of send message API" am: f138c95d1f am: 3ceb23d6ca
am: 8171b2c1b5

Change-Id: Idf851d3e217ed2207a3a5c9c8192e94838b9c185
2017-03-07 23:53:17 +00:00
Etan Cohen
e7ab9fa5ed Merge "[AWARE] CTS tests for publish/subscribe discovery" am: 32e2012c2a am: 0d96fc6fd5
am: c96112a907

Change-Id: I8aee5fabfaca19359850405d670b5852c891b827
2017-03-07 23:52:40 +00:00
Etan Cohen
12be803cce [AWARE] CTS for Aware data-path creation
Test Aware data-path creation API flow - failure.

Note: testing limited to failure since single device
testing doesn't have a peer

Bug: 30556108
Test: CTS tests pass
Change-Id: Ie15ad57d7331b21fbb6706091691bd5f87e1264e
2017-03-07 09:41:04 -08:00