Commit Graph

1522 Commits

Author SHA1 Message Date
Chenbo Feng
a4039ad8df 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 --module CtsNativeNetTestCases

Change-Id: Ie9ed8aa604be7c6ae364baa69922b89c006dea72
2017-07-18 10:49:57 -07:00
Chenbo Feng
f048e836c0 Rename the native test file
Since more test is added to the qtaguid native test file, the previous
name is not suitable for representing the purpose of this test file.
Rename it to NativeQtaguidTest.cpp.

Bug: 62489688
Test: in cts-tf: run cts --module CtsNativeNetTestCases
Change-Id: Id64591db060c7d0178602517fd703dab586bfb5f
2017-07-18 10:49:11 -07:00
Huihong Luo
5383b735d5 Merge "cts: skip wifi related tests if wifi is unsupported" into oc-dev
am: 73a81b18cd

Change-Id: Iabc2d520201900ffa4930b90fb0a534053f357d9
2017-06-21 00:41:06 +00: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
db2fae593c Merge "WifiManagerTest: check softap mode supported" into oc-dev
am: a2283cd312

Change-Id: I4c928c2fc4a639b94bb7d6f0bbf8762a2d8fe1ba
2017-06-20 17:24:57 +00:00
Rebecca Silberstein
a2283cd312 Merge "WifiManagerTest: check softap mode supported" into oc-dev 2017-06-20 17:18:25 +00:00
Roshan Pius
54ddf823b9 Merge "WifiManagerTest: Set key mgmt field in testWifiManagerNetWork" into oc-dev
am: 2cbd46c060

Change-Id: I9d0364acef9b989ae461e8241a3cd4d2e256c600
2017-06-20 04:07:32 +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
699a587e1c Merge "Catch Throwable instead of Exception." into oc-dev
am: fff08f9ad3

Change-Id: I399e9224f3c0db1b2c30218d04f21789cc53fad9
2017-06-16 00:20:04 +00: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
TreeHugger Robot
fdb0a13a76 Merge "WifiManagerTest: Set key mgmt field in testWifiManagerNetWork" into oc-dr1-dev 2017-06-13 21:34:07 +00:00
Sudheer Shanka
3253a61143 Merge "Try to fix HostsideRestrictBackgroundNetworkTests flakyness again." into oc-dev
am: 1f29891f4b

Change-Id: If5610c7effe42388bae9e48dc5e081e96346dca4
2017-06-12 19:18:37 +00: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
Roshan Pius
eb0e095e16 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
2017-06-08 20:35:01 +00:00
Guang Zhu
09004e2a44 Merge "add component metadata to all CTS module configs" into oc-dev am: 43596249b5
am: 55d3388eb4  -s ours

Change-Id: I08c7a1739acb7427391cff630b2fdbdec071cf1d
2017-06-06 19:40:18 +00:00
Guang Zhu
55d3388eb4 Merge "add component metadata to all CTS module configs" into oc-dev
am: 43596249b5

Change-Id: Idaada8414d62bf7d84d40b532ec7464e7230bd37
2017-06-06 19:29:09 +00: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
Guang Zhu
dd8918c80b 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: Id856f93c0d2a018be65bff33459b4b703d23257d
2017-06-05 16:15:37 -07:00
Guang Zhu
020b01857f Merge "Update configurations to avoid using ApkInstaller" into oc-dev am: aeace3fce9
am: f8307035e0  -s ours

Change-Id: Icb3e0820ebbaad36f3a16bf2353fb581ba5ecf50
2017-06-02 17:00:27 +00:00
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
6cf111906e Merge "Try to fix HostsideRestrictBackgroundNetworkTests flakyness." into oc-dev am: 771cf7a71d
am: 5003ee82fc

Change-Id: I3816346cb5c2a3495a769ea97eefdd8223e84cfe
2017-06-01 07:00:38 +00: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
9be01aa5e7 Merge "Try to fix HostsideRestrictBackgroundNetworkTests flakyness." into oc-dev am: c7e8f9091f
am: 5826bd464d

Change-Id: Ieb774613ded8bd6763cee03aeaba2ce79df72113
2017-05-26 19:18:34 +00: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
6ae2354903 Merge "WifiManagerTest: add LOHS tests" into oc-dev am: fbad021a0e
am: f5bd5f56e1

Change-Id: I97743bb80cceff4b30df97b1bac3a5d0f3448d3b
2017-05-25 20:28:23 +00: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
Hugo Benichi
3571a6f6f2 Merge "Update CTS tests to reflect ConnectivityManager API changes." am: 54a417d822 am: 1fd5b6b9a3 am: c0411a3a52
am: 10deb8e493

Change-Id: I4c6a51c979b6db7d7921be73a95f8171d3f7d0af
2017-05-19 23:45:23 +00:00
Hugo Benichi
10deb8e493 Merge "Update CTS tests to reflect ConnectivityManager API changes." am: 54a417d822 am: 1fd5b6b9a3
am: c0411a3a52

Change-Id: I8d3f5479bb4a4a8fabe45974898ff2dac0e76332
2017-05-19 23:34:51 +00:00
Hugo Benichi
c0411a3a52 Merge "Update CTS tests to reflect ConnectivityManager API changes." am: 54a417d822
am: 1fd5b6b9a3

Change-Id: I39e3208298ce90cf014074e1f82a4cc5957ff68e
2017-05-19 23:23:41 +00:00
Hugo Benichi
54a417d822 Merge "Update CTS tests to reflect ConnectivityManager API changes." 2017-05-19 23:05:57 +00: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
Roshan Pius
01fdb38e78 Merge "cts(wifi): Fix WifiManager.testWifiManagerActions" into oc-dev am: b061da6df9
am: 537b65a753

Change-Id: I11bcbc7ff5e1f81b5ea83339f0d267f6090675bd
2017-05-18 19:24:45 +00: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
6f8ed75068 Merge "wifi: hotspot2: remove usage of hidden Passpoint APIs" into oc-dev am: 8a16ce5a11
am: 546b8af6c8

Change-Id: I85ec7eeb5431584f8a52c7cfd156d96dcb6861cc
2017-05-18 19:05:50 +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
28ef60358e Merge "Native test for qtaguid module" am: 77a4431748 am: 9fee7c90d6 am: 70043d4530
am: 4b90507fea

Change-Id: I3bde13afbafa43849bc7f1d41232c33b6234cb1c
2017-05-16 18:22:58 +00: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
70043d4530 Merge "Native test for qtaguid module" am: 77a4431748
am: 9fee7c90d6

Change-Id: Ibfad1b51f541a28e7c01e185c4886b34a6889036
2017-05-16 17:52:47 +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
8f9a2d7396 Merge "Add cts to test power-save-except-idle whitelist is correctly used." into oc-dev am: e60355110f
am: e62bec2dde

Change-Id: Ifbbf1eae790c98171435ec09e79838cfdbb9e8ba
2017-05-15 18:28:14 +00:00