Commit Graph

2493 Commits

Author SHA1 Message Date
Etan Cohen
eeea3d5510 [RTT][CTS] Add information to assert to help debug failures
Modify the assert message to print out the # of failures and the total
number of iterations. Will help diagnose scope of test failures.

Bug: 109836816
Test: atest WifiRttTest
Change-Id: Ic4d5b6844225edbd9704694c539e31754b7a340c
2018-06-14 08:51:43 -07:00
Lorenzo Colitti
78f8585339 Wait a few seconds for IPv6 connectivity to appear.
Currently, DnsTest immediately executes a DNS lookup as soon as
it starts. If the device has just connected to a network - as it
might if the test framework has just enabled wifi - and IPv6
connectivity is not yet available, the test will fail with little
proof that the network doesn't have IPv6.

Fix this by waiting for IPv6 connectivity and by adding the
active LinkProperties to the failure message.

Bug: 109670546
Test: DnsTest passes on dual-stack network
Test: DnsTest fails on IPv4-only network
Change-Id: I88b8d001f08fe41af666bccf8094c67729dda9c2
2018-06-05 16:12:41 +09:00
Sudheer Shanka
cd670e7957 Update charge level too when turning battery off.
BATTERY_CHARGING which triggers the parole state
will only be sent if the level is > 90.

Change-Id: I1073e473c27eb5d29744f4a967771392729b4e1a
Fixes:80534062
Test: Verified that updating the level activates the parole mode.
2018-05-31 11:43:40 -07:00
Sudheer Shanka
4ca791b07b Merge "Update turnBatteryOff to include changing charging status too." into pi-dev 2018-05-23 01:42:05 +00:00
Sudheer Shanka
b3c2dad1eb Merge "CtsHostsideNetworkTests: Skip unsupported tests." into pi-dev 2018-05-23 01:33:08 +00:00
Sudheer Shanka
1b3cc387bf Update turnBatteryOff to include changing charging status too.
AppStandbyController is now listening to BatteryManager.ACTION_CHARGING
for starting parole state and this broadcast won't be sent immediately
after plugging in the device. So, update the charging status too which is
going to trigger this broadcast and parole state can be started
immediately.

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

Change-Id: I6f19f7a509ec48e96eaea4b188262d5a9735edf1
2018-05-22 14:18:10 -07:00
Sudheer Shanka
926a3cb026 CtsHostsideNetworkTests: Skip unsupported tests.
If appStandby is not enabled, then
testAppIdleAndBatterySaver_tempPowerSaveWhitelists is not supported.

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

Change-Id: I2f4012ff2cf42481e089d7fc33930258e501ddbf
2018-05-22 13:10:50 -07:00
Etan Cohen
13c598050a [RTT] Add sanity checks for RTT ranging results
Add checks to validate that the reported number of measurements and
of successes is reasonable: non-zero for successful results.

Bug: 79879905
Test: 'atest WifiRttTest' passes
Change-Id: Ie79b10edacb660dd8c5d116539a4ee5cc32a779d
2018-05-16 15:44:42 -07:00
Etan Cohen
346856ab46 Revert "[RTT] Disable RTT CTS"
This reverts commit 14c32a88c15f2e00647a226c1e670967a683dcf7.

Enable Wi-Fi RTT CTS in production.

Bug: b/74457054
Test: atest CtsNetTestCases:WifiRttTest
Change-Id: Ia60776dbf60406d3665b01c7fecb3c9cd1a6c8ee
2018-05-16 15:31:57 -07:00
Etan Cohen
01d63b603e [RTT] Update CTS to auto-select test AP
Update CTS to select a test AP:
- Scan for APs
- Select the APs supporting IEEE 802.11mc
- Pick the AP with the highest RSSI

Bug: 74518964
Test: atest WifiRttTest (and pick the CTS test)
Change-Id: I6467c75eedcc8260703d2a99214154c9e888cce9
2018-05-16 15:31:57 -07:00
Etan Cohen
b58779a4e1 Revert "[RTT] Modify CTS tests to use associated AP information"
This reverts commit 47d58e2a69.

The revert restores the older method of test AP selction: hard
code the name of the test AP. Subsequent CLs will update to
preferred test AP selection method.

Bug: 74518964
Test: atest WifiRttTest (with rest of CL stack)
Change-Id: Iab71978607aeaf37babdb1afdaeca5c114ccdbf7
2018-05-16 15:31:57 -07:00
Sudheer Shanka
6dea1b7567 Set stable_charging_threshold app idle constant to 0 during tests.
Tests need the parole state to get started immediately after device
starts charging, so update stable_charging_threshold constant to 0.

Also simplify the logic to update the global setting as the tests only rely
on a couple of constants.

Fixes: 79319040
Test: Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideNetworkTests -t \
      com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: Ie9ef67bb1544dd0179980d537365d13e6b6020c1
2018-05-08 15:02:37 -07:00
Benedict Wong
9d623ccbba Merge "Add CTS support for eBPF" into pi-dev 2018-05-08 17:13:45 +00:00
Rebecca Silberstein
d8752ba525 WifiManagerTest: allow for multiple modes
Now that WifiService can/will support dual simultaneous mode operation, make
sure the tests allow for it as well.

Bug: 31346104
Test: atest android.net.wifi.cts
Change-Id: Id3aaacb3651568c18850a0fdf3832c0f52218cf2
2018-05-02 10:41:18 -07:00
Chenbo Feng
012d53ba16 Directly test xt_qtaguid module without libcutls
The libcutls library is no longer directly writing to the xt_qtaguid
module proc file. Instead, all the qtaguid related helper function is
moved to libqtaguid in P release. So the cts should directly call into
libqtaguid instead of using libcutils to do that, otherwise it will
faill on devices that using new traffic stats tools.

Bug: 78788976
Test: atest CtsNativeNetTestCases
Change-Id: I1169f598b6e558acf1d7724416b2b70abe2f5878
Merged-In: I1169f598b6e558acf1d7724416b2b70abe2f5878
(cherry picked from aosp commit 7d9870466bc5d57769fccf43ec3d1b2716f54b81)
2018-05-01 11:46:07 -07:00
Benedict Wong
27d1957bee Add CTS support for eBPF
Addition of eBPF requires tweaks regarding packet counting of
UDP-encapsulated-ESP packet bytes. This patch conditions the expected
number of bytes received based on eBPF being enabled

Bug: 74113670
Test: Ran CTS tests, passing on 3.18, 4.4, 4.9 kernels
Merged-In: If02a4bb6ebfdf949fdb58b5816aa9d252d9eef52
Change-Id: If02a4bb6ebfdf949fdb58b5816aa9d252d9eef52
(cherry picked from commit e061f54d7215729309e9e977743f5b28813878b0)
2018-04-25 13:58:14 -07:00
Roshan Pius
7457ee7eb8 WifiManagerTest: Fetch scan results only on scan success
When wifi location scans are off, the scan is expected to fail. But,
WifiManager.getScanResults() could still return results from the last
scan. This was causing the test to fail because it was relying on
|mScanResults| being null to detect scan failure.

Also, changed the scan done internal state name in the test to more accurately
reflect that scan has been completed (could be success or failure).

Bug: 77601152
Test: Ran `atest android.net.wifi.cts.WifiManagerTest#
testWifiManagerScanWhenWifiOffLocationTurnedOn` with location turned on,
but wifi scans turned off.

Change-Id: I6d5203a836d86d03fbb8e9af0035fe951a6b9db8
2018-04-24 13:56:43 -07:00
Roshan Pius
e549804b9d WifiManagerTest: Don't assert for isScanAlwaysAvailable
This may not be true on all platforms (Android wear for example don't
want to support this functionality)

Bug: 78242827
Test: atest android.net.wifi.cts
Change-Id: I73ab8cd31a9b4a29bd47f8e47957c921a0b16fa3
2018-04-18 15:48:33 -07:00
Etan Cohen
7530899eb8 [RTT] Increase CTS coverage
Increase CTS coverage by utilizing additional methods.

Bug: 77915947
Test: atest WifiRttTest
Change-Id: Ibc560aafb317fb27fd969b8899cc49c5cd7a979f
2018-04-13 15:17:15 -07:00
TreeHugger Robot
1026eaee92 Merge "ScanResultTest: Retry scan attempts on failure" into pi-dev 2018-04-12 23:58:51 +00:00
Ray Essick
1104b83fea Merge "Merge changes from topic "am-ce014dceeecf45abb673c6f026ccf980" into oreo-cts-dev am: dbfdb95147" into oc-dev am: be259ff997 am: b8f58fb9b6
am: 5a9c21fc33

Change-Id: I298c568c1a9f438cc75f1854ac311c5b457af9aa
2018-04-09 19:32:17 -07:00
Ray Essick
b611d433e3 Merge "[automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: 2215338715 -s ours am: afb3e84599 -s ours am: bafd18446f -s ours am: 72b96b0354 -s ours" into oc-dev am: 68dc050239 am: 6edfe17ca2
am: c8b558b08f  -s ours

Change-Id: I65ed882d6d08fc63c7679daa0433fc7975d329aa
2018-04-09 19:28:30 -07:00
Ray Essick
50ec655aaa [automerger] Merge changes from topic "am-c4615261ef624ee49e66b0c52ff3f69c" into nougat-mr1-cts-dev am: 8ef12d94da am: 1ce0bfba89 am: afef57cad5 am: 1e1b2a7606 am: 9289660d76 am: d89cacb7bf
am: 3977adb530

Change-Id: I85084738c6ac9155425bf5c723dd5956163c619b
2018-04-09 19:25:19 -07:00
Ray Essick
3e37bc925d [automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: 2215338715 -s ours am: afb3e84599 -s ours am: bafd18446f -s ours skipped: d033198a42 skipped: c550755e79 skipped: 27bbc3628e am: ce176b9ffc am: 56927e7cae
am: 6e3df95a86  -s ours

Change-Id: I8de961181b0fcc9ac2038a833a6f3b7ad39f23a8
2018-04-09 19:21:56 -07:00
Ray Essick
e18b64e07f [automerger] Merge changes from topic "am-157f76c7fc0b4412b75bfe4f38cb6b0f" into nougat-cts-dev am: 1fd90c968d am: e451b4062e am: c2f39f64b5 am: 02cf01f51c am: 010e44479d am: 790a6f6d52 am: df21617fed am: 14e18f9179
am: 213fa5b1db

Change-Id: Ica7fb8d109c22c4f5ff9be80d0bea41e6d8b552e
2018-04-09 19:17:52 -07:00
Ray Essick
33586ec7c3 [automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: 2215338715 -s ours am: afb3e84599 -s ours skipped: 868997117d skipped: a4cf60e6ea skipped: 8b6d971588 skipped: 63eae3a9e1 skipped: 1a158af55d am: 096c85e4cf am: 591f6ccb9c
am: bff76d3a93  -s ours

Change-Id: Ie689f7ee5fe7459eb21d742617a219391060fad5
2018-04-09 19:14:36 -07:00
Ray Essick
6cc16da2a9 [automerger] Merge changes from topic "asb-2018-04-m" into marshmallow-cts-dev am: 7f0c5e7da8 am: 6d52324524 am: 87ad8f6dcb am: 70171fe46e am: 6035791a0f am: c0ca2003bc am: c4691f5ad5 am: d27bde6edf am: c5c83b10ac am: 41c0a7b438 am: a11caf34cc am: 10bed1ef52
am: 255cbbc39c

Change-Id: I44d015880ab51ca2f3a8d56ab9fcfffa752583e4
2018-04-09 19:11:42 -07:00
Ray Essick
e6af30cb2c [automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: 2215338715 -s ours skipped: 151750d842 skipped: d1811f0384 skipped: bbfa5d23a9 skipped: c407f8968b skipped: 6fc9eb97c5 skipped: 973a5cd865 skipped: cd9a559fd2 skipped: 853c5 skipped: c26ea26d31 am: 4d4f3950b6 am: 06c461a30b
am: 205a892ff5  -s ours

Change-Id: I26b527b1e40d2a29917421c4544908a5ef60f19d
2018-04-09 19:08:45 -07:00
Ray Essick
a2c9539bfc [automerger] Merge changes from topic "am-c7faa8cb80994bb993d5bdac6eca009c" into nougat-mr1-cts-dev am: 36b9badd7a am: 27b937e5fc am: 8c0df95444 am: 0c19a15081 am: fbc9d49796 am: 72405a1736
am: 8101a1ba85

Change-Id: Idc7e17f08c59629680f30be28c056b14fa00228f
2018-04-09 19:06:17 -07:00
Ray Essick
6c3717661f [automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: b32ca8fa74 -s ours am: 81f274ebb2 -s ours skipped: 1cdd92daaa skipped: 7a92b9afdb skipped: 849e67fad2 am: d2e50eb968 am: 66ef84dac4
am: 089012397b  -s ours

Change-Id: I8115640bfa76cd2f245880afb901f354f98569fb
2018-04-09 19:03:03 -07:00
Ray Essick
2715d84585 Merge changes from topic "am-4267ce935a9849bdbcbcc7e45cbacd34" into oreo-cts-dev am: 1c90ff8dcf am: 5b5f73c2e8 am: 37ca5b50e8
am: 0fae69ebd7

Change-Id: Iae8c06a591d43e850ee5deacf9efaffc4bd2048e
2018-04-09 19:02:07 -07:00
Ray Essick
99a753312a [automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: b32ca8fa74 -s ours am: 81f274ebb2 -s ours am: 308f60a04c -s ours am: c1a7ce019c am: 7a3920dfa4
am: 6ae132c625  -s ours

Change-Id: Ic3853238342398a8ddc409c7a45c866eb1e58714
2018-04-09 18:58:24 -07:00
Ray Essick
a2c6841c02 Merge "Merge changes from topic "am-1040f2fedf9f49a9a38f5d0878c0a1d0" into oreo-mr1-cts-dev am: 16af42313d" into oc-mr1-dev
am: 6e146b4699

Change-Id: Ief4132902a45fe9d344105233e8119163afa4160
2018-04-09 18:57:24 -07:00
Ray Essick
5a9c21fc33 Merge "Merge changes from topic "am-ce014dceeecf45abb673c6f026ccf980" into oreo-cts-dev am: dbfdb95147" into oc-dev am: be259ff997
am: b8f58fb9b6

Change-Id: Id856b845af55179f7d96ed55f0c5b7118c797a56
2018-04-09 18:51:42 -07:00
Ray Essick
7f390e3f77 Merge "[automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: 2215338715 -s ours am: afb3e84599 -s ours am: bafd18446f -s ours am: 72b96b0354 -s ours am: b591008bc2 -s ours" into oc-mr1-dev
am: 9d36da58e7  -s ours

Change-Id: I15ddd6c39cfe9b95c1a677685a0aa93c01856d16
2018-04-09 18:50:47 -07:00
Ray Essick
9ca1b80cd2 Merge changes from topic "am-0ac6ccf47239465e9891c4d8b9d8f076" into oc-dev am: 7fc94d02ca am: 52d573a044
am: 91014e8da2

Change-Id: Ib327df02fff8bf808663e0b960efa0ebf9445d51
2018-04-09 18:49:49 -07:00
Ray Essick
186dbad0df Merge changes from topic "asb-2018-04-o" into oreo-cts-dev am: 6977a333a5 am: 51fa4a4cc9 am: ee4732c77c
am: 03a6e259da

Change-Id: I0abec8285d7b28a3bd9190015cd42416a571f4ce
2018-04-09 18:46:06 -07:00
Ray Essick
c8b558b08f Merge "[automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: 2215338715 -s ours am: afb3e84599 -s ours am: bafd18446f -s ours am: 72b96b0354 -s ours" into oc-dev am: 68dc050239
am: 6edfe17ca2

Change-Id: I19b5b17dbd213dd08432c20c1a54b2c1c70a7eb1
2018-04-09 18:46:00 -07:00
Ray Essick
62874f71ec [automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: ae91a6ad6f -s ours am: 81c482bdd4 am: a208a33079
am: c8781cfae4  -s ours

Change-Id: I33e6cd995c4dd44e5f2a2da606301b6a094c2c54
2018-04-09 18:43:17 -07:00
Ray Essick
991bdf22fe Merge "Merge changes from topic "am-a984919964a248a18190aca22d4db916" into oreo-cts-dev am: 0eeb6c53d1" into oc-dev am: f2aeff9120 am: e9a9daa81a
am: 0dc9743ac1

Change-Id: I918d6def4a54a838c8358881cf06f941ee6d00bf
2018-04-09 18:42:12 -07:00
Ray Essick
3977adb530 [automerger] Merge changes from topic "am-c4615261ef624ee49e66b0c52ff3f69c" into nougat-mr1-cts-dev am: 8ef12d94da am: 1ce0bfba89 am: afef57cad5 am: 1e1b2a7606 am: 9289660d76
am: d89cacb7bf

Change-Id: Iafd862995f1944bb56c5829a10dc8b997f941d2c
2018-04-09 18:41:41 -07:00
Ray Essick
b8f58fb9b6 Merge "Merge changes from topic "am-ce014dceeecf45abb673c6f026ccf980" into oreo-cts-dev am: dbfdb95147" into oc-dev
am: be259ff997

Change-Id: I4fab6e7b601a853787226c12a8573e1f57306306
2018-04-09 18:41:09 -07:00
Ray Essick
6e3df95a86 [automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: 2215338715 -s ours am: afb3e84599 -s ours am: bafd18446f -s ours skipped: d033198a42 skipped: c550755e79 skipped: 27bbc3628e am: ce176b9ffc
am: 56927e7cae

Change-Id: I183ec019764bc32754825b33b9ed29edd16e23ad
2018-04-09 18:38:48 -07:00
Ray Essick
67798ac557 Merge "[automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: 8a0f955e56 -s ours am: 8dd2d10a1b -s ours" into oc-dev am: 50988d78ff am: b4dde24b91
am: 9e863b8450  -s ours

Change-Id: I396fa8b81fc094b9b87d37835742bc9119e7a465
2018-04-09 18:37:42 -07:00
Ray Essick
888ba5ef93 Merge "Merge changes from topic "am-96d8ccc4e1e44c30aec62bb030c6529c" into oreo-mr1-cts-dev am: f0c2985ba8" into oc-mr1-dev
am: 01a2073429

Change-Id: I658bb749415a0d9fdf710d51c83d742abde2866d
2018-04-09 18:36:10 -07:00
Ray Essick
bff6860b2a Merge "[automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: b32ca8fa74 -s ours am: 81f274ebb2 -s ours am: 308f60a04c -s ours am: 3ace7af527 -s ours" into oc-mr1-dev
am: f893a5ace2  -s ours

Change-Id: Ic93c17bfb0ecfa4475c884fe951acf5750188952
2018-04-09 18:30:40 -07:00
Ray Essick
9c147bd5d7 Merge changes from topic "am-ef41260469b74ed484092f80fc943840" into oc-mr1-dev
am: 73a2c644b7

Change-Id: I2566fc1242d2b3c73e951e4fd30264a7439a8411
2018-04-09 18:29:13 -07:00
Ray Essick
2001900f59 [automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: 8a0f955e56 -s ours skipped: d4d28bcb12 skipped: 948813147b skipped: 1cd8984784 am: 0c883452f2 am: aa7ce42421
am: 749e2c39a0  -s ours

Change-Id: I647ba112083610f0c586473c6230f674fe1887e5
2018-04-09 18:22:54 -07:00
Ray Essick
213fa5b1db [automerger] Merge changes from topic "am-157f76c7fc0b4412b75bfe4f38cb6b0f" into nougat-cts-dev am: 1fd90c968d am: e451b4062e am: c2f39f64b5 am: 02cf01f51c am: 010e44479d am: 790a6f6d52 am: df21617fed
am: 14e18f9179

Change-Id: I7df6f22f99aba634b635c73d7221d242d46cf4a3
2018-04-09 18:15:47 -07:00
Ray Essick
bff76d3a93 [automerger skipped] DO NOT MERGE CTS for presence of avc fix for b/70897454 am: 2215338715 -s ours am: afb3e84599 -s ours skipped: 868997117d skipped: a4cf60e6ea skipped: 8b6d971588 skipped: 63eae3a9e1 skipped: 1a158af55d am: 096c85e4cf
am: 591f6ccb9c

Change-Id: I352ea2e10daeaece58dd03f8e129d1d838f49366
2018-04-09 18:13:15 -07:00