Commit Graph

1382 Commits

Author SHA1 Message Date
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
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
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
ba9c18e7af 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

Change-Id: Idbe7d08b01d9138c5c2082f08a392090dd82c466
2017-04-17 17:48:16 +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
Sudheer Shanka
65f950fd9f Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-mr1-cts-dev am: 4b656d1d00 -s ours am: 4ecf9aadc5 am: 24df7fc52b
am: 5b87fbabc3  -s ours

Change-Id: Ib84441f7d5d47dd4b8f5a61ae1f679e93aab7438
2017-04-15 01:04:12 +00:00
Nathan Harold
9b807d83a4 Merge "Update IpSecAlgorithm CTS for API compliance changes" into oc-dev 2017-04-14 20:21:19 +00:00
Sudheer Shanka
dc3f163de2 Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-cts-dev am: 43a0aa48b0 -s ours am: 8b0491eb1f am: 8be8d0d6a9 -s ours am: 64c8f23d98 am: a12dbc91c5
am: 4952b4fce2  -s ours

Change-Id: Icdcf777e3873eda4fa552ab6f1791d1ff42ee74d
2017-04-14 18:39:00 +00:00
Sudheer Shanka
24df7fc52b Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-mr1-cts-dev am: 4b656d1d00 -s ours
am: 4ecf9aadc5

Change-Id: Ib0ba9f2c58976fab832ffc9535c1f49db49ecdca
2017-04-14 00:48:47 +00:00
Sudheer Shanka
4ecf9aadc5 Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-mr1-cts-dev
am: 4b656d1d00  -s ours

Change-Id: Ifcebf7ebf95f6cbb8a49163e1ac657d3d42320c5
2017-04-14 00:43:16 +00:00
Treehugger Robot
4b656d1d00 Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-mr1-cts-dev 2017-04-14 00:36:09 +00:00
Sudheer Shanka
a12dbc91c5 Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-cts-dev am: 43a0aa48b0 -s ours am: 8b0491eb1f am: 8be8d0d6a9 -s ours
am: 64c8f23d98

Change-Id: I1845edbd31e802fffaa6da3407b2a767c2cd7e40
2017-04-14 00:30:45 +00:00
Sudheer Shanka
64c8f23d98 Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-cts-dev am: 43a0aa48b0 -s ours am: 8b0491eb1f
am: 8be8d0d6a9  -s ours

Change-Id: Iac33c3abd87928b5969cf01066d9d770d9a1a10b
2017-04-14 00:24:47 +00:00
Sudheer Shanka
8903a0aa04 Merge "Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-cts-dev am: 43a0aa48b0 -s ours" into nougat-mr1-cts-dev am: 137a9169cf -s ours am: bb6a9be084 am: 89195184af
am: 0a0b1d2fe6  -s ours

Change-Id: I5d18b543effbf8f4af110bade420d6f67b3965d2
2017-04-13 23:49:15 +00:00
Sudheer Shanka
89195184af Merge "Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-cts-dev am: 43a0aa48b0 -s ours" into nougat-mr1-cts-dev am: 137a9169cf -s ours
am: bb6a9be084

Change-Id: I19a9896b209bd724b57b7a98098d44c90725089e
2017-04-13 23:37:44 +00:00
Sudheer Shanka
bb6a9be084 Merge "Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-cts-dev am: 43a0aa48b0 -s ours" into nougat-mr1-cts-dev
am: 137a9169cf  -s ours

Change-Id: Idf00e79de9ee11e39e6942f7b9d17ebfbf80fa3f
2017-04-13 23:32:26 +00:00
Sudheer Shanka
8be8d0d6a9 Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-cts-dev am: 43a0aa48b0 -s ours
am: 8b0491eb1f

Change-Id: I6df9cff2bdb441d7c7b45dbcef252b195212a929
2017-04-13 23:32:16 +00:00
Sudheer Shanka
8b0491eb1f Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-cts-dev
am: 43a0aa48b0  -s ours

Change-Id: I7c31558b0102a8464d15121c21402f0de77c8b12
2017-04-13 23:26:10 +00:00
Android Merger
137a9169cf Merge "Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-cts-dev am: 43a0aa48b0 -s ours" into nougat-mr1-cts-dev 2017-04-13 23:20:39 +00:00
Sudheer Shanka
12160bc460 Merge "DO NOT MERGE: Skip data saver related tests if the device doesn't support it." into nougat-cts-dev
am: 43a0aa48b0  -s ours

Change-Id: Ibc146b186e9f9de3e6057f6fef1f1e0bbb5e0347
2017-04-13 23:20:32 +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
d69455289f 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:54:35 -07: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