Commit Graph

1050 Commits

Author SHA1 Message Date
Lorenzo Colitti
ea06420fed [automerger] Merge "Fix expected reverse lookup of Google DNS IP addresses" into nougat-cts-dev am: 3b416dd354 am: d4831efbe0 am: 88a48fcbfe am: 9c3250f49c am: 761b3e5e7b am: e7ee057428 am: bc9edb5254 am: 296cfbb29c
am: 27bbe03b65

Change-Id: Iead4e85a2b5c6f3c54695f21ab1e952fdc7c99c9
2019-04-08 20:01:58 -07:00
Lorenzo Colitti
27bbe03b65 [automerger] Merge "Fix expected reverse lookup of Google DNS IP addresses" into nougat-cts-dev am: 3b416dd354 am: d4831efbe0 am: 88a48fcbfe am: 9c3250f49c am: 761b3e5e7b am: e7ee057428 am: bc9edb5254
am: 296cfbb29c

Change-Id: I254dbd2d33f340c150ea897823c6c0a257da958d
2019-04-08 18:26:32 -07:00
Lorenzo Colitti
296cfbb29c [automerger] Merge "Fix expected reverse lookup of Google DNS IP addresses" into nougat-cts-dev am: 3b416dd354 am: d4831efbe0 am: 88a48fcbfe am: 9c3250f49c am: 761b3e5e7b am: e7ee057428
am: bc9edb5254

Change-Id: Ia747dca9285940109dc2aebbfde4d1f184c020cd
2019-04-08 17:10:16 -07:00
Android Build Merger (Role)
bc9edb5254 [automerger] Merge "Fix expected reverse lookup of Google DNS IP addresses" into nougat-cts-dev am: 3b416dd354 am: d4831efbe0 am: 88a48fcbfe am: 9c3250f49c am: 761b3e5e7b am: e7ee057428
Change-Id: I9fcc6c2dd3bc35112f0959a77ec48c19e741f6a4
2019-04-08 23:26:34 +00:00
Android Build Merger (Role)
9c3250f49c [automerger] Merge "Fix expected reverse lookup of Google DNS IP addresses" into nougat-cts-dev am: 3b416dd354 am: d4831efbe0 am: 88a48fcbfe
Change-Id: I100af07ea8c391545d48b6b8888696a3622b54ec
2019-04-08 23:26:23 +00:00
Android Build Merger (Role)
88a48fcbfe [automerger] Merge "Fix expected reverse lookup of Google DNS IP addresses" into nougat-cts-dev am: 3b416dd354 am: d4831efbe0
Change-Id: Ie85fee065ec9aef98036b75bf1b2497d760b8070
2019-04-08 23:26:20 +00:00
Lorenzo Colitti
d4831efbe0 Merge "Fix expected reverse lookup of Google DNS IP addresses" into nougat-cts-dev
am: 3b416dd354

Change-Id: I0228552c2231e0d2241e3c417e1ac5fe2495e619
2019-04-08 16:26:02 -07:00
Lorenzo Colitti
3a984ca812 Fix expected reverse lookup of Google DNS IP addresses
DnsTest.testDnsWorks expects that reverse lookup for the Google
public DNS servers will return something with google.com in the
name. This no longer works because the reverse DNS entries have
changed to dns.google.

Bug: 129452237
Test: atest android.net.cts.DnsTest.testDnsWorks
Change-Id: Iee8bfe418bf6003e5c78df77d75f6f9745249267
Merged-In: Iee8bfe418bf6003e5c78df77d75f6f9745249267
(cherry picked from commit 3852fd92f5)
2019-04-08 00:21:48 +00:00
Brett Chabot
2a0aa64145 DO NOT MERGE - Migrate remaining cts to androidx.test.
See go/jetpack-test-android-migration

Test: m cts
Change-Id: I148ac492524a07edf6142d884d991c3a3487ce06
Exempt-From-Owner-Approval: automated refactoring, has already been reviewed by owners downstream
Bug: 127482512
2019-03-25 11:51:41 -07:00
jungyee.yoo
17ef99be74 Add sleep to avoid calling stopLocalOnlyHotspot before TetherController initialization.
Bug: 123205589
Test: run cts-on-gsi -m  -m CtsNetTestCases -t android.net.wifi.cts.WifiManagerTest#testStartLocalOnlyHotspotSingleRequestByApps
Bug: 123379970
Test: run cts-on-gsi -m  -m CtsNetTestCases -t ndroid.net.wifi.cts.WifiManagerTest#testStartLocalOnlyHotspotSuccess
Change-Id: I7506c3037dc5368d69330acc47c97c765185870f
2019-02-14 00:18:23 +00:00
Juju Sung
62eb00af49 Fix lowMemoryKill with app2.MyService
MyForegroundService.java will change to background service during
testing,It’s ADJ will be 900. When run on a 512M project, it will
easily killed due to low memory.

Only set BIND_NOT_FOREGROUND and remove BIND_ALLOW_OOM_MANAGEMENT.
So MyForegroundService can still change process state between foreground
and background by startFround()/stopFround(). But it's ADJ will not too
high in background.

Bug: 120038371
Test: VTS, ran the test 5 times and it passed 5 times
Change-Id: I555366db7dd9904bc119bea94efbbe6422764f69
2018-12-25 08:07:26 +00:00
Roshan Pius
8619176b0c resolve merge conflicts of 8c61445473bc2842c8c9490225e97321b65d267c to oc-dev
am: 934ff00f93

Change-Id: Ifac1fe67bda37bbbe5fa1d5be19f75ab51f34c8e
2018-12-04 20:40:44 -08:00
Roshan Pius
934ff00f93 resolve merge conflicts of 8c61445473bc2842c8c9490225e97321b65d267c to oc-dev
Bug: 120508352
Change-Id: I43ebc07102d0b765321a4b83c04ff899f2b8ed0c
Merged-In: Id3aaacb3651568c18850a0fdf3832c0f52218cf2
2018-12-05 03:15:07 +00:00
Rebecca Silberstein
af95fad957 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
Bug: 115567184
Test: atest android.net.wifi.cts
Change-Id: Id3aaacb3651568c18850a0fdf3832c0f52218cf2
Merged-In: Id3aaacb3651568c18850a0fdf3832c0f52218cf2
2018-11-29 15:24:49 +08:00
Rebecca Silberstein
8c71ef4f2e Merge "WifiManagerTest: allow for multiple modes" into oreo-mr1-cts-dev
am: 354de98f9a

Change-Id: I4b8dd8fbb8e4765cba4e95e521f528f6dd752df3
2018-10-01 15:11:57 -07:00
Rebecca Silberstein
340047b18c 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
Bug: 115567184
Test: atest android.net.wifi.cts
Change-Id: Id3aaacb3651568c18850a0fdf3832c0f52218cf2
Merged-In: Id3aaacb3651568c18850a0fdf3832c0f52218cf2
2018-09-18 14:38:54 -07:00
saurav subedi
6943e15b8c DO NOT MERGE: CDD Annotations for Section: 7.4.7
Bug: 112612833

Test: make cts

Change-Id: I7443794296f9364bc0e88e5ba3b717d6c01511a7
2018-09-06 00:42:25 +00:00
saurav subedi
54fb25689c DO NOT MERGE: CDD Annotations for Section: 7.4.2
C-1-1: MUST implement the WifiAwareManager APIs as described in the SDK documentation.
--> SingleDeviceTest

C-1-4:MUST randomize the Wi-Fi Aware management interface address at intervals no longer
then 30 minutes and whenever Wi-Fi Aware is enabled
-->SingleDeviceTest#testAttachDiscoveryAddressChanges()

CDD SECTION:7.4.1.1/C-1-1,C-1-3: Wifi Direct
 C-1-1: MUST implement the corresponding Android API as described in the SDK documentation.
 C-1-3: MUST support regular Wi-Fi operation.
--> ConcurrencyTest

7.4.2.4/C-1-1,C-2-1:
C-1-1: MUST implement the Passpoint related WifiManager APIs as described in the SDK documentation.
C-1-2: MUST support IEEE 802.11u standard, specifically related to Network Discovery and Selection,
such as Generic Advertisement Service (GAS) and Access Network Query Protocol (ANQP).
--> Passpoint configuration tests

Added C-0-3 to ConnectivityBackgroundTestActivity as well

CDD VERSION: 8.1: https://source.android.com/compatibility/8.1/android-8.1-cdd

Bug: 112612833

Test: make cts

Change-Id: Ief11b3ae7899bfdca12a7cce63daca600b1f0cdf
2018-08-28 01:45:08 +00:00
Sudheer Shanka
497a93647c Use a different key for signing networkpolicy test app.
One of the preparation steps for running cts involves loading up the sim
card with the key used to sign CtsCarrierApiTestCases.apk. It
means if the same key is used for signing networkpolicy test app too,
then the app is considered as carrier privileged by the system and can't
be forced into app standby state.

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

Change-Id: Iaa9f4fabe83430fa42b6f67c1025db41a5e1d938
Merged-In: Iaa9f4fabe83430fa42b6f67c1025db41a5e1d938
2018-08-09 19:03:23 +00:00
Sudheer Shanka
841d4711be Use a different key for signing networkpolicy test app.
One of the preparation steps for running cts involves loading up the sim
card with the key used to sign CtsCarrierApiTestCases.apk. It
means if the same key is used for signing networkpolicy test app too,
then the app is considered as carrier privileged by the system and can't
be forced into app standby state.

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

Change-Id: Iaa9f4fabe83430fa42b6f67c1025db41a5e1d938
2018-06-19 19:35:00 -07:00
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
Adam Vartanian
31786e4612 DO NOT MERGE Add CTS test for URI fix.
Bug: 71360761
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: I09a156040d4970b7b2f973e9bffcfc97a8ff2274
(cherry picked from commit 85156429a2)
2018-04-09 14:50:16 -07:00
Adam Vartanian
ed78bcf07e DO NOT MERGE Add CTS test for URI fix.
Bug: 71360761
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: I09a156040d4970b7b2f973e9bffcfc97a8ff2274
(cherry picked from commit 85156429a2)
2018-04-09 14:46:44 -07:00
Adam Vartanian
1c7d94f2f7 DO NOT MERGE Add CTS test for URI fix.
Bug: 71360761
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: I09a156040d4970b7b2f973e9bffcfc97a8ff2274
(cherry picked from commit 85156429a2)
2018-04-09 14:45:37 -07:00
Roshan Pius
021f8dde9b ScanResultTest: Retry scan attempts on failure
Scans can fail for multiple reasons (throttling, driver error, framework
aborting scans, etc). Add a retry mechanism for scans in this test
because these tests are dependendent on a successful scan being
completed.

Bug: 77601110
Test: atest ScanResultTest#testScanResultTimeStamp
Test: atest android.net.wifi.cts
Change-Id: Ic15e455394dde6fc01c01ea7f3eed2e27976d666
2018-04-06 15:43:37 -07:00
Lorenzo Colitti
356139091d Revert "Add cts to test unwanted capabilities api"
This reverts commit bf6a2ad00c.

Bug: 77601789
Test: atest android.net.cts.NetworkRequestTest
Change-Id: Ib3db82e889ed4ca050a837b1169a9da8e17bb424
2018-04-06 22:44:19 +09:00
TreeHugger Robot
4997cbc5ae Merge "Add cts to test unwanted capabilities api" into pi-dev 2018-04-04 16:55:14 +00:00
Ricky Wai
934dd7cacc Merge "Set empty watchlist test config before CTS" into pi-dev 2018-04-03 17:28:13 +00:00
Pavel Maltsev
bf6a2ad00c Add cts to test unwanted capabilities api
Test: atest android.net.cts.NetworkRequestTest
Bug: 74945408
Bug: 72828388
Change-Id: I19099a3d7a555f610c96eb1859493903152e10a3
2018-04-03 09:55:54 -07:00
TreeHugger Robot
3233266e8d Merge "Allow net and media CTS tests to use hidden APIs" into pi-dev 2018-04-03 06:18:49 +00:00
TreeHugger Robot
38c80d304a Merge "Add CTS tests for getMultipathPreference" into pi-dev 2018-04-02 11:56:24 +00:00