Commit Graph

703 Commits

Author SHA1 Message Date
Guang Zhu
f8307035e0 Merge "Update configurations to avoid using ApkInstaller" into oc-dev
am: aeace3fce9

Change-Id: Ie26c681cc30a16030ed27ae662d0fac8ede1cdbc
2017-06-02 16:53:38 +00:00
jdesprez
b8c1c24ad4 Update configurations to avoid using ApkInstaller
- use the new tradefed version of it.
- add a tests to check configs.

Test: build, run collect-tests-only dry-run
Bug: 37213493
Change-Id: I45e9950aa2731afe9403dd44dd18d0a8d40fdb6b
Merged-In: Ia212b707befe3ffc70ef43cbc292e97be3f364f1
2017-06-01 19:50:57 -07:00
Sudheer Shanka
5003ee82fc Merge "Try to fix HostsideRestrictBackgroundNetworkTests flakyness." into oc-dev
am: 771cf7a71d

Change-Id: I84f484f2e009f60a0582d60dd0c7f31b14e3a1c8
2017-06-01 06:55:42 +00:00
Sudheer Shanka
6eef88a6cd Try to fix HostsideRestrictBackgroundNetworkTests flakyness.
Bug: 38384021
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: I99668396abcf7421cd7ffb9118e309aaecb80f07
2017-05-31 15:53:31 -07:00
Sudheer Shanka
5826bd464d Merge "Try to fix HostsideRestrictBackgroundNetworkTests flakyness." into oc-dev
am: c7e8f9091f

Change-Id: Ie9e4b5835a0297fd2d7cdb71d230f7833cd6b265
2017-05-26 19:12:54 +00:00
Sudheer Shanka
c7e8f9091f Merge "Try to fix HostsideRestrictBackgroundNetworkTests flakyness." into oc-dev 2017-05-26 19:06:28 +00:00
Sudheer Shanka
43353038f0 Try to fix HostsideRestrictBackgroundNetworkTests flakyness.
- If the screen is not turned on when the activity is starting, then
  that process will be in TOP_SLEEPING state and won't have temp access
  to network connectivity in restricted modes. So, add a wait time after
  turning the screen on.
- Increase the timeout for app standby wait time.

Bug: 38384021
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: I54563a0c8b3e783ee9279d667faa5cab529ddc7e
2017-05-25 16:43:22 -07:00
Rebecca Silberstein
f5bd5f56e1 Merge "WifiManagerTest: add LOHS tests" into oc-dev
am: fbad021a0e

Change-Id: I327caa53dd3bb782c9f2f6dbe7cdef913187de43
2017-05-25 20:17:29 +00: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
Roshan Pius
537b65a753 Merge "cts(wifi): Fix WifiManager.testWifiManagerActions" into oc-dev
am: b061da6df9

Change-Id: I484922ca86154aa470f6231f344b7ea1986d6253
2017-05-18 19:19:11 +00:00
TreeHugger Robot
b061da6df9 Merge "cts(wifi): Fix WifiManager.testWifiManagerActions" into oc-dev 2017-05-18 19:13:12 +00:00
Peter Qiu
546b8af6c8 Merge "wifi: hotspot2: remove usage of hidden Passpoint APIs" into oc-dev
am: 8a16ce5a11

Change-Id: Iea86ccce2d9635ad5f388310754e688f8adc6345
2017-05-18 18:57:42 +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
Chenbo Feng
4b90507fea Merge "Native test for qtaguid module" am: 77a4431748 am: 9fee7c90d6
am: 70043d4530

Change-Id: I59f03fa2dc4068e3e70822570552927e383d78b5
2017-05-16 17:59:36 +00:00
Chenbo Feng
bc0e94a4a3 Native test for qtaguid module
Add a native test to check the qtaguid module nolonger hold the fd of a
closed socket. The test does not work in java because android framework
will force untag the socket before closing it.

Bug: 36374484
Test: run this test as CTS test and all devices should pass
Signed-off-by: Chenbo Feng <fengc@google.com>
Change-Id: I9e015d412d1aec10d843dfee4b480169d1f6ff8e
2017-05-15 23:16:35 -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
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
Nathan Harold
18b7c24177 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
2017-04-25 16:33:29 -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
Nathan Harold
f20fc80ba5 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
Change-Id: Ida4977a6e7496ce6b4de38bfd48bd6a162cab874
2017-04-17 22:01:26 -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
e5e55017fc 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: Id8398453ea4b85d04da963ab48876407b0237e41
2017-04-17 17:39:06 +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
Nathan Harold
3c0a040072 Update IpSecAlgorithm CTS for API compliance changes
Bug: 36073210, b/34811227
Test: verified on Bullhead
Change-Id: I8f37016cc9aadafd3e58f6af535bd7bc1d0f4a96
2017-04-11 10:14:09 -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
Nathan Harold
d44cfd7014 Initial CTS Tests for IpSec Classes
-Test SPI creation, duplication and deletion
-Test IpSecTransform creation, apply to socket, and delete

Bug: 34811227
Test: Verified on Bullhead with UDP on IPv6 (default)
Change-Id: I1ffc84e549c7666996472ed323eb44810c3b9843
2017-03-31 19:04:23 -07:00