Commit Graph

1072 Commits

Author SHA1 Message Date
David Su
5dd45ebc2b DO NOT MERGE CTS: Ensure CONFIGURED_NETWORKS_CHANGED_ACTION broadcast is received
Android Pie CtsNetTestCases AndroidManifest.xml has both
ACCESS_WIFI_STATE & ACCESS_FINE_LOCATION permission.
Thus, it should receive the CONFIGURED_NETWORKS_CHANGED_ACTION
broadcast when a network is removed.

Bug: 159373687
Bug: 171022033
Test: atest CtsNetTestCases
Change-Id: I9d194424469d204c4f95e98b937d67ba728f2122
Merged-In: I4669a6ff79b3d2e99795015e42bfa611cffb9070
2020-10-28 17:06:54 +00:00
Automerger Merge Worker
f62f154faf Merge "Merge "Merge "Merge "Update the QUIC packet format." into nougat-cts-dev am: f6a0cdcba6" into nougat-mr1-cts-dev am: 657d75b4bf" into oreo-cts-dev am: 56c21dd47b" into oreo-mr1-cts-dev am: 087370b5e1
Original change: https://android-review.googlesource.com/c/platform/cts/+/1457991

Change-Id: I0c40c9f027efed8c29439e8ff50dde0d064410a8
2020-10-14 01:30:09 +00:00
Automerger Merge Worker
b66af87ddf Merge "Merge "Merge "Update the QUIC packet format." into nougat-cts-dev am: f6a0cdcba6" into nougat-mr1-cts-dev am: 657d75b4bf" into oreo-cts-dev am: 56c21dd47b
Original change: https://android-review.googlesource.com/c/platform/cts/+/1457991

Change-Id: I55d39f866717823fa0ddb4cc6eaef5bafe6b5a44
2020-10-14 01:18:51 +00:00
Automerger Merge Worker
2f113052fa Merge "Merge "Update the QUIC packet format." into nougat-cts-dev am: f6a0cdcba6" into nougat-mr1-cts-dev am: 657d75b4bf
Original change: https://android-review.googlesource.com/c/platform/cts/+/1457991

Change-Id: I0d8debd9688681170abe0d08249d42b2c3badf1f
2020-10-14 01:09:27 +00:00
Treehugger Robot
a37ee1c4df Merge "Update the QUIC packet format." into nougat-cts-dev am: f6a0cdcba6
Original change: https://android-review.googlesource.com/c/platform/cts/+/1457991

Change-Id: Ie36145fb92e6efb20e6b15ca4b0dc57dafc63a92
2020-10-14 01:02:23 +00:00
Automerger Merge Worker
7fa7aa033b Merge "Merge "Ensure CONFIGURED_NETWORKS_CHANGED not received without permissions" into oreo-cts-dev am: f23d174804" into oreo-mr1-cts-dev am: 09eb86e9af
Original change: https://android-review.googlesource.com/c/platform/cts/+/1452057

Change-Id: I73e88886644d87ad67e16af1713f0339d83eec45
2020-10-13 15:07:59 +00:00
Treehugger Robot
a3e0d990be Merge "Ensure CONFIGURED_NETWORKS_CHANGED not received without permissions" into oreo-cts-dev am: f23d174804
Original change: https://android-review.googlesource.com/c/platform/cts/+/1452057

Change-Id: Icf1c069f515ba31dff6d2ca501ee43042ea9ab9f
2020-10-13 14:53:02 +00:00
Lorenzo Colitti
25da49b7ff Update the QUIC packet format.
The QUIC packet format has changed again. Update the test to
ensure that the GFE can drop support for the old packet format
without causing all devices to fail CTS.

Packet format changes suggested by dschinazi@.

Bug: 170724836
Test: atest --rerun-until-failure 100 CtsNetTestCasesLatestSdk:MultinetworkApiTest#testNativeDatagramTransmission
Change-Id: I8625ac9a58c55fc19dfb9fdb5f34a89cee40caaf
Merged-In: I8625ac9a58c55fc19dfb9fdb5f34a89cee40caaf
(cherry picked from commit c2b9b83bf353a1fe0669e327fa03ddb024e4f21d)
2020-10-13 23:45:00 +09:00
David Su
956f4dc231 Ensure CONFIGURED_NETWORKS_CHANGED not received without permissions
Ensure that the CONFIGURED_NETWORKS_CHANGED_ACTION broadcast is not
received without the required permissions.

Bug: 159373687
Test: cts-tradefed run cts -m CtsNetTestCases --test android.net.wifi.cts.WifiManagerTest#testWifiManagerNetWork
Change-Id: I2e3f38b05d63571e838b148fbbb2ce6f68c19c01
Merged-In: I4669a6ff79b3d2e99795015e42bfa611cffb9070
2020-10-07 01:30:11 +00:00
jgkim
b38f0df3f9 CtsNetTestCases: Fix issues in android.net.wifi.cts.WifiEnterpriseConfigTest
1.android.net.wifi.cts.WifiEnterpriseConfigTest#testAddEapNetwork
2.android.net.wifi.cts.WifiEnterpriseConfigTest#testEnterpriseConfigDoesNotPrintPassword
3.android.net.wifi.cts.WifiEnterpriseConfigTest#testSettersAndGetters

Bug:143000258
Test: run cts-on-gsi -m CtsNetTestCases-t android.net.wifi.cts.WifiEnterpriseConfigTest#testAddEapNetwork
Test: run cts-on-gsi -m CtsNetTestCases-t android.net.wifi.cts.WifiEnterpriseConfigTest#testEnterpriseConfigDoesNotPrintPassword
Test: run cts-on-gsi -m CtsNetTestCases-t android.net.wifi.cts.WifiEnterpriseConfigTest#testSettersAndGetters
Change-Id: Iaed949693c8ac8ce67dbde6acb622f90f0e638da
Merged-In: Iaed949693c8ac8ce67dbde6acb622f90f0e638da
2020-01-30 01:24:41 +00:00
Chalard Jean
cc2444de25 Merge "Merge "Merge "Merge "Attempt "fix" the broken QUIC packet to be slightly less broken" into nougat-cts-dev am: af4499cf45" into nougat-mr1-cts-dev am: 28dbc1ff07" into oreo-cts-dev am: 6bc025004b" into oreo-mr1-cts-dev
am: acfa8b7bb7

Change-Id: I522eb865c0fad10c40a2152d1189a8f6c454de80
2019-08-26 14:18:20 -07:00
Chalard Jean
d5c8e158bc Merge "Merge "Merge "Attempt "fix" the broken QUIC packet to be slightly less broken" into nougat-cts-dev am: af4499cf45" into nougat-mr1-cts-dev am: 28dbc1ff07" into oreo-cts-dev
am: 6bc025004b

Change-Id: I2b3537970fd494794b441340b84ed7ef4c564c06
2019-08-26 12:08:22 -07:00
Chalard Jean
b50dd23f95 Merge "Merge "Attempt "fix" the broken QUIC packet to be slightly less broken" into nougat-cts-dev am: af4499cf45" into nougat-mr1-cts-dev
am: 28dbc1ff07

Change-Id: Ia10e54a5e4afe88df0a4f0f18136ad67021f48cb
2019-08-26 11:56:05 -07:00
Chalard Jean
dbafd34852 Merge "Attempt "fix" the broken QUIC packet to be slightly less broken" into nougat-cts-dev
am: af4499cf45

Change-Id: Id99d972fa4d54a1f73ca11d9d1a8482fc35c9ea7
2019-08-26 11:38:25 -07:00
markchien
0d6a32a571 Merge "Exempt adb socket for hostside VpnTest" into nougat-cts-dev
am: 873f2d8aa3

Change-Id: Ib9749b290a9cc943f441457b22f660cbe2b85b3b
2019-08-26 11:37:49 -07:00
Chalard Jean
2bf54f7c79 Attempt "fix" the broken QUIC packet to be slightly less broken
Bug: 139403355
Signed-off-by: Erik Kline <ek@google.com>
Merged-In: I9c938998b5e30f7d3994b410878b2af6a75f9b5a
Test: in I9c938998b5e30f7d3994b410878b2af6a75f9b5a
(cherry picked from commit 8ce68f1310)

Change-Id: If544089eb79801cad7660f3f419fa304387fc402
2019-08-23 09:49:42 +00:00
markchien
52b82e3312 Exempt adb socket for hostside VpnTest
Vpn test would destroy socket. If adb run over network, adb
socket would be killed during Vpn test. Then, test stop due to
adb disconnect.

Bug: 119382723
Bug: 117194347
Test: - I solemnly swear I tested this conflict resolution
Change-Id: I91b4ab018a9e7fc73dcb7969e4a6520d6b27d629
Merged-In: I91b4ab018a9e7fc73dcb7969e4a6520d6b27d629
(cherry picked from commit de0f268f78)
2019-08-09 12:45:45 +00:00
markchien
dd32bb52f7 Exempt adb socket for hostside VpnTest
Vpn test would destroy socket. If adb run over network, adb
socket would be killed during Vpn test. Then, test stop due to
adb disconnect.

Bug: 119382723
Bug: 135225500
Bug: 126645908
Test: Just cherry-pick with conflict fix

Change-Id: I91b4ab018a9e7fc73dcb7969e4a6520d6b27d629
Merged-In: I91b4ab018a9e7fc73dcb7969e4a6520d6b27d629
Merged-In: Id6f986aacc3cadf713ebbc8305ca535b861390fc
(cherry picked from commit de0f268f78)
2019-07-18 12:43:04 +00:00
markchien
d51ae5760d Exempt adb socket for hostside VpnTest
Vpn test would destroy socket. If adb run over network, adb
socket would be killed during Vpn test. Then, test stop due to
adb disconnect.

Bug: 119382723
Bug: 135225500
Test: - build pass

Change-Id: I91b4ab018a9e7fc73dcb7969e4a6520d6b27d629
Merged-In: I91b4ab018a9e7fc73dcb7969e4a6520d6b27d629
Merged-In: Id6f986aacc3cadf713ebbc8305ca535b861390fc
(cherry picked from commit de0f268f78)
2019-06-19 08:21:00 +00:00
Sudheer Shanka
8371c77499 Skip battery saver related tests on unsupported devices.
Bug: 133761301
Test: atest com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: Ifec84425febf38d732367fae6b43fa80c427c79f
Merged-In: Ifec84425febf38d732367fae6b43fa80c427c79f
2019-06-07 10:16:07 -07:00
jovanak
db6336c0b8 Fixing NetworkWatchlistTest#testGetWatchlistConfigHash for secondary users.
Avoids relying on external storage and using the hardcoded /sdcard/ path.
Unrooted adb does not have access to non-user 0 sdcard paths, and so the "cp"
command fails when the test runs in user 10.

Fixes: 121400865
Test: cts-tradefed run cts-dev -m CtsNetTestCases -t android.net.cts.NetworkWatchlistTest#testGetWatchlistConfigHash in user 10.
Change-Id: Idc667072bcfbbe159416fa7c7b6b19045b52041d
2019-05-24 12:21:50 -07:00
Lorenzo Colitti
aaac541459 Merge "Merge "Merge "Merge "Fix expected reverse lookup of Google DNS IP addresses" into nougat-cts-dev am: 3b416dd354" into nougat-mr1-cts-dev am: 50491fb1cc" into oreo-cts-dev am: b6d3940f89" into oreo-mr1-cts-dev
am: d93f6d545c

Change-Id: Ie4a894d0d07dd2f26ef63efbb83a4531110f84aa
2019-04-08 19:38:21 -07:00
Lorenzo Colitti
926ebf2d47 Merge "Merge "Merge "Fix expected reverse lookup of Google DNS IP addresses" into nougat-cts-dev am: 3b416dd354" into nougat-mr1-cts-dev am: 50491fb1cc" into oreo-cts-dev
am: b6d3940f89

Change-Id: Iacbf91536898e4b0d8942581593ab87eae0af323
2019-04-08 17:52:15 -07:00
Lorenzo Colitti
454f3193a3 Merge "Merge "Fix expected reverse lookup of Google DNS IP addresses" into nougat-cts-dev am: 3b416dd354" into nougat-mr1-cts-dev
am: 50491fb1cc

Change-Id: Ie5459302cb2aa040ed44747f189434091e1c4786
2019-04-08 17:06:38 -07:00
Lorenzo Colitti
fe13c7233d Merge "Fix expected reverse lookup of Google DNS IP addresses" into nougat-cts-dev
am: 3b416dd354

Change-Id: I03a2f6f3631c25868d504892c5b885477dcfeb01
2019-04-08 16:31:57 -07:00
Treehugger Robot
9709b60914 Merge "DO NOT MERGE:CDD Annotation for 7.4.7/C-2-1" into pie-cts-dev 2019-04-08 19:40:27 +00: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
saurav subedi
d11be5bbeb DO NOT MERGE:CDD Annotation for 7.4.7/C-2-1
Devices that don't provide data saver mode must return
RESTRICT_BACKGROUND_STATUS_DISABLED for the
ConnectivityManager#getRestrictBackgroundStatus()

Bug:130032710
Test: make cts
Change-Id: I81b52c9d26afcf51a7e416d20589c9c7cfb878f6
2019-04-05 20:23:53 +00:00
Brio Automation
b84038696c RESTRICT AUTOMERGE: Port "Exempt adb socket for hostside VpnTest" to Cts 8.1
https://android-review.googlesource.com/c/platform/cts/+/833600

Change-Id: Id6f986aacc3cadf713ebbc8305ca535b861390fc
Bug: 119382723
2019-03-26 00:31:14 +00:00
Brett Chabot
c45065bdea DO NOT MERGE - Migrate remaining cts to androidx.test.
See go/jetpack-test-android-migration

Test: m cts
Exempt-From-Owner-Approval: automated refactoring, has already been reviewed by owners downstream
Bug: 127482512
Change-Id: If72aed95ef9e436bcc6e063abc0478eca365cc9b
2019-03-11 23:26:10 +00: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
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
Treehugger Robot
4173c4fce5 Merge "DO NOT MERGE:CDD Annotation for 7.4.7/C-2-1" into oreo-mr1-cts-dev 2018-10-02 19:04:22 +00:00
saurav subedi
cd79fb2af6 DO NOT MERGE:CDD Annotation for 7.4.7/C-2-1
Devices that don't provide data saver mode must return
RESTRICT_BACKGROUND_STATUS_DISABLED for the
ConnectivityManager#getRestrictBackgroundStatus()

Bug: 116495679

Test: make cts
Change-Id: I81b52c9d26afcf51a7e416d20589c9c7cfb878f6
2018-09-27 21:54:01 +00: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