Commit Graph

381 Commits

Author SHA1 Message Date
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
a2283cd312 Merge "WifiManagerTest: check softap mode supported" into oc-dev 2017-06-20 17:18:25 +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
Rebecca Silberstein
db77edac1c WifiManagerTest: check softap mode supported
When running the LocalOnlyHotspot tests, first check if
isPortableHotspotSupported is true.

Bug: 62343300
Test: cts-tradefed run cts-dev --module CtsNetTestCases -t
android.net.wifi.cts.WifiManagerTest

Change-Id: Ie36435c3eb5b41ada4b64a3e7452b006da41b00c
2017-06-16 17:21:59 -07:00
Rebecca Silberstein
a7bd5947b6 WifiManagerTest: add LOHS tests
Add new CTS tests for the LocalOnlyHotspot feature.  This CL also
creates a reusable method for confirming that wifi is enabled via the
setWifiEnabled call.  This should reduce flake in automated test runs by
setting local variables before wifi is enabled instead of after the
call.  This change removes a race condition on confirming if wifi is
enabled.

Bug: 31466854
Test: ran new CTS tests
Test: no new failures with 'run cts-dev --module CtsNetTestCases -t ran n
android.net.wifi.cts.WifiManagerTest'

Change-Id: Id119170fea742402dda10d83014d27b8dbc98e92
2017-05-24 15:57:47 -07:00
Huihong Luo
e4bbd10431 cts: skip wifi related tests if wifi is unsupported
Such as in the case of Android emulator.

BUG: 37633976

Test: ANDROID_BUILD_TOP= ./android-cts/tools/cts-tradefed run cts -m
CtsNetTestCases

Change-Id: Id4ee7b216ea12ad9599953b439c91db96d38b374
2017-05-19 14:31:29 -07:00
TreeHugger Robot
b061da6df9 Merge "cts(wifi): Fix WifiManager.testWifiManagerActions" into oc-dev 2017-05-18 19:13:12 +00:00
TreeHugger Robot
8a16ce5a11 Merge "wifi: hotspot2: remove usage of hidden Passpoint APIs" into oc-dev 2017-05-18 18:49:06 +00:00
Roshan Pius
4e474bccdb cts(wifi): Fix WifiManager.testWifiManagerActions
The current assertion in the test is incorrect. When we disable wifi,
we should expect scans to pass if location scans are turned on, else
scans should fail.

Also, reset mScanResults in startScan so that it doesn't contain stale
scan results.

Bug: 38224452
Test: Run the cts test with both location scan turned on & off.
`cts-tradefed run cts-dev --module CtsNetTestCases -t
android.net.wifi.cts.WifiManagerTest#testWifiManagerActions`

Change-Id: I27bc88ca4883d9233da9e911397192a1eef4422b
2017-05-18 09:57:50 -07: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
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
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
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
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
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
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
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
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 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
Etan Cohen
ab5186e4f6 [AWARE] CTS for failure mode of send message API
Test that sending a message with invalid peer handle (null)
fails as expected.

Note: limited testing
- Single device testing doesn't have a peer
- Cannot create an invalid peer handle since opaque object

Bug: 30556108
Test: CTS tests pass
Change-Id: I72f4b67ea3c3dfc00aa48f6601d064b406dabde7
2017-03-07 09:33:00 -08:00
Etan Cohen
a9f33d578d [AWARE] CTS tests for publish/subscribe discovery
Validate the SUCCESS case of publish and subscribe
discovery sessions.

Bug: 30556108
Test: CTS tests pass
Change-Id: Ib88606cdf662560258890e2f274c85c3a8818206
2017-03-07 09:32:56 -08:00
Etan Cohen
81a04f5dcf Merge "[CM] CTS tests for requestNetwork APIs" am: b9af841386 am: 766fa1f462
am: 53da30e8fe

Change-Id: I2d3f4ec6e465fe082b2c79d15ea3d4369f03b793
2017-03-07 17:00:52 +00:00
Etan Cohen
b9af841386 Merge "[CM] CTS tests for requestNetwork APIs" 2017-03-07 16:40:27 +00:00
Etan Cohen
87b18c3df1 [CM] CTS tests for requestNetwork APIs
Add CTS tests for:
- requestNetwork API: test onAvailable
- requestNetwork with timeout API: test onUnavailable (failure)

Bug: 31399536
Test: CTS tests passing
Change-Id: I3565ef375ec90f90b2c76aabee14bf993251eeef
2017-03-06 20:45:13 -08:00
Etan Cohen
db4ab73bec Merge changes I8c2d29be,Ibbc58c3e am: 831196440e am: a8824acb8c
am: 59239876dd

Change-Id: Iaacfd545cd534e9ac46f23c7139ee68dd11daa45
2017-03-07 04:45:04 +00:00
Etan Cohen
831196440e Merge changes I8c2d29be,Ibbc58c3e
* changes:
  [AWARE] CTS for attaching to session + MAC address
  [AWARE] Initial CTS: availability API + broadcast
2017-03-07 04:37:19 +00:00
Etan Cohen
08a2758524 [AWARE] CTS for attaching to session + MAC address
Add CTS to verify initial session attach:
- Basic attach
- Attach with identity callback: use to verify MAC
  address change on subsequent attach.

Bug: 30556108
Test: CTS tests pass/fail per expectations
Change-Id: I8c2d29be81bef600a2c9eac99868326473d72b6e
2017-03-06 13:45:49 -08:00
Etan Cohen
5dc4e9b091 [AWARE] Initial CTS: availability API + broadcast
Initial CTS tests for Wi-Fi Aware:
- Add CTS test class for Wi-Fi Aware
- Setup/initialize
- Test the availablity API + broadcast

Bug: 30556108
Test: builds, CTS runs (test fails as expected)
Change-Id: Ibbc58c3ed7a9ad7312864d038fd34c7202222e82
2017-03-06 13:44:50 -08:00
Peter Qiu
714a65f0c0 Merge "wifi: add CTS tests for Passpoint parsing APIs" am: 66d2bf1fe9 am: 8376afc701
am: b8a54f25bf

Change-Id: I1b2f3939414339a9b5a380dc6e22460d5cf5a85e
2017-03-06 00:18:55 +00:00
Peter Qiu
870c7f9007 Merge "WifiManagerTest: add tests for verifying Passpoint configuration management APIs" am: c0d0ca8fe0 am: bf9f0f98b6
am: 4175949b89

Change-Id: Ieb102b7ef5f2e66be15e2b0e22793bef217490e5
2017-03-03 17:31:42 +00:00
Peter Qiu
24a0a8e643 wifi: add CTS tests for Passpoint parsing APIs
Added a test for PPS MO (PerProviderSubscription Management Object)
tree parsing API and a test for Release 1 installation file
parsing API.

Bug: 35756298
Test: run the newly added PpsMoParserTest and ConfigParserTest

Change-Id: I6da40bef9609830afb80d8562e5bfb051920b541
2017-02-28 13:43:45 -08:00