Commit Graph

709 Commits

Author SHA1 Message Date
Adam Vartanian
a02bbf31c4 DO NOT MERGE Add CTS test for URI fix.
Bug: 68341964
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: If532123542155ea3be281044a3ea4ca0b6cf2db5
(cherry picked from commit a01da8536c)
2018-01-08 13:33:23 -08:00
Etan Cohen
591518f378 [CTS][PASSPOINT] Update the check for passpoint network for preloaded passpoint network
Before calling the testAddPasspointConfigWithCertCredential
we need to check number of network already present in device

Bug: 67630919
Test: android.server.cts.CtsNetTestCases, WifiManagerTest
Change-Id: If643ab7bde760a65e9a5b1e9d47af53378a178fd
2017-10-23 23:07:59 +00:00
shreerag
f99d8d82b4 No longer using specific watch device idle settings
Bug: 28091250
Change-Id: Id57c5a638f5a10367d13f6353ea3212745a3f06e
2017-08-07 23:40:25 +00:00
Etan Cohen
ba1f56050f [AWARE][CTS] Check for location setting for test needing to disable Wi-Fi
Disabling Wi-Fi API which is available to CTS only disables the
infrastructure mode (association to an AP). This disables the Wi-Fi
chip (HAL/driver/firmware) only if location scanning is disabled,
otherwise the chip is still enabled.

The failing CTS Wi-Fi Aware test relied on disabling the Wi-Fi chip.
This cannot be done from CTS. Added a check for location scan setting
and skip the test if enabled.

Cannot fail and require the tester to disable location scans since other
CTS tests require it to be enabled.

Bug: 64125460
Test: run cts with and without location scans
Change-Id: I0582926dbf854c14b57dcdeb383db9b5f2a353a2
2017-07-28 22:30:33 +00:00
Chenbo Feng
b67b237853 resolve merge conflicts of 921e4b7e1c to oc-dev
Test: I solemnly swear I tested this conflict resolution.
      run cts --module CtsNativeTestCases

Change-Id: I4c8764a00d30ab7ff94eff07870ec79c7d7bc67d
2017-07-17 21:54:20 -07:00
Chenbo Feng
e2753dbabb Merge "Merge "Resolve merge conflicts of 8482d8c85c to nougat-cts-dev" into nougat-cts-dev am: e37efbd57e" into nougat-mr1-cts-dev
am: 26339f2d77

Change-Id: I7ba2bb548300d511ce0b7205e1055554406582f8
2017-07-17 21:11:59 +00:00
Chenbo Feng
3cd4cc6251 Merge "Resolve merge conflicts of 8482d8c85c to nougat-cts-dev" into nougat-cts-dev
am: e37efbd57e

Change-Id: Ic7c13aa9c7abee40a812f6d7879a2d474f096d03
2017-07-17 21:02:46 +00:00
Chenbo Feng
997814263d Resolve merge conflicts of 8482d8c85c to nougat-cts-dev
Test: I solemnly swear I tested this conflict resolution.
      in cts-tf: run cts --module CtsNativeNetTestCases

Change-Id: I15253841993a79320dafa8669f0289c28f4ff4ea
2017-07-17 20:44:39 +00:00
Chenbo Feng
ba65ffc462 Add test to check sock addr in qtaguid ctrl file
This test verifies the socket address information is not leaked by
xt_qtaguid module inside the kernel. The sock_addr parsed from
proc/net/xt_qtaguid/ctrl file should always be 0

Bug: 62489688
Test: in cts-tf: run cts --package android.net.native
2017-06-28 13:47:30 -07:00
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
Sudheer Shanka
e0ea4b74fb Catch Throwable instead of Exception.
AssertionFailedError is a Throwable and hence some logs which will
help debug the failures are not printed.

Bug: 38384021
Test: Verified that when the test throws AssertionFailedError, required
      logs are printed.

Change-Id: I6cc8e0172b8e30d268a50bdf9281d6828fc74810
2017-06-15 11:43:42 -07:00
Sudheer Shanka
1f29891f4b Merge "Try to fix HostsideRestrictBackgroundNetworkTests flakyness again." into oc-dev 2017-06-12 19:13:53 +00:00
Sudheer Shanka
2f54af49ae Try to fix HostsideRestrictBackgroundNetworkTests flakyness again.
- Add some logging to dump usage stats if setting an app as inactive
fails.

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

Change-Id: I96d7acabcf3dc18b4187775bbd2bce17a49dbb7b
2017-06-08 17:17:07 -07:00
Guang Zhu
1d0e04c472 add component metadata to all CTS module configs
Bug: 36140955
Bug: 35360169
Test: new unit test to ensure that all modules have this field
Change-Id: Ie76e4306049eb56e7f4360f63093ab03b3ca2611
Merged-In: Id856f93c0d2a018be65bff33459b4b703d23257d
2017-06-05 23:20:19 +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
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
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
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
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