Commit Graph

2762 Commits

Author SHA1 Message Date
Treehugger Robot
9be27ff697 Merge "Do not expect broadcasts in CaptivePortalTest" am: b54ca7b0c3 am: 6d893b3eb3 am: 41de3755e9 am: 20460d80ee
Original change: https://android-review.googlesource.com/c/platform/cts/+/1459764

Change-Id: If85ca0e46d5b6214ebd4255079536a6892e43097
2020-10-14 13:34:39 +00:00
Treehugger Robot
b54ca7b0c3 Merge "Do not expect broadcasts in CaptivePortalTest" 2020-10-14 11:57:25 +00:00
Sudheer Shanka
5b6350a52b Merge "Verify network state of apps hosting fg-service and in idle state." am: 468293beef am: 7cb66673cc am: 7be6f4f41f am: 1914b5d538
Original change: https://android-review.googlesource.com/c/platform/cts/+/1455860

Change-Id: I7ce8dae71f73a83507605178f49454350f523937
2020-10-13 01:24:40 +00:00
Sudheer Shanka
468293beef Merge "Verify network state of apps hosting fg-service and in idle state." 2020-10-12 23:31:17 +00:00
xiamengsen
05c8a1ddd0 Verify network state of apps hosting fg-service and in idle state.
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java

Signed-off-by: xiamengsen <xiamengsen@xiaomi.com>
Change-Id: I0e6e40b714483e51cfee45c155d8ac8b2b356494
2020-10-12 18:42:00 +00:00
Treehugger Robot
5420841729 Merge "Update the QUIC packet format." am: 1dd1530647 am: 7240385821 am: fac58c092c am: a58debbb5d
Original change: https://android-review.googlesource.com/c/platform/cts/+/1454515

Change-Id: I42f394b86af1d599e57d711600730fad15f6c249
2020-10-12 13:04:20 +00:00
Treehugger Robot
1dd1530647 Merge "Update the QUIC packet format." 2020-10-12 11:40:54 +00:00
Remi NGUYEN VAN
48ea3b6816 Do not expect broadcasts in CaptivePortalTest
The legacy broadcast may not be sent if wifi does not become the default
network within timeout. CaptivePortalTest does not need wifi to be the
default network at the start of the test, as it will be
disconnected/reconnected immediately after anyway.

Bug: 169106352
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalTest
Change-Id: Ie4ee6b3c3ed7c0d414fd3cc162d4183248120895
2020-10-12 17:36:19 +09:00
Remi NGUYEN VAN
ee8647a8bb Merge "Use new test utilities from frameworks/libs/net" am: 1bc58efade am: c7fa8ea404 am: a1f356e172 am: 583f9937fc
Original change: https://android-review.googlesource.com/c/platform/cts/+/1455935

Change-Id: I121ca1e0e39d350f70c38b0e87193f5bbb379774
2020-10-12 03:24:10 +00:00
Chalard Jean
f93361980a Merge "Fix a way for this test to flake." am: 43370c622d am: ff47147c3a am: 15da51da4c am: 37fd8a7ef1
Original change: https://android-review.googlesource.com/c/platform/cts/+/1436794

Change-Id: I025c332425a41f9508f8728929fe7147cbbf3723
2020-10-12 03:23:03 +00:00
Remi NGUYEN VAN
f0b400ba69 Merge "Revert "Use new test utilities from frameworks/libs/net"" am: dcc8bf6706 am: 45906d55cc am: 154183ce0d am: 9996fa5ad6
Original change: https://android-review.googlesource.com/c/platform/cts/+/1455875

Change-Id: I6b33918fd9f161cea5b73c90cdf253db64a3a700
2020-10-12 03:15:35 +00:00
Remi NGUYEN VAN
aaeda2dd62 Merge "Use new test utilities from frameworks/libs/net" am: 2087f3eeb1 am: e532ab3e37 am: a2c6709c10 am: 81f64ba280
Original change: https://android-review.googlesource.com/c/platform/cts/+/1433985

Change-Id: Ia258d3b6fffd54f499843dfaf3489cbad382d741
2020-10-12 03:14:58 +00:00
Remi NGUYEN VAN
1bc58efade Merge "Use new test utilities from frameworks/libs/net" 2020-10-12 02:00:55 +00:00
Dan Shi
9ed43322dc Merge "Merge "Remove vts10 suite setting" am: c2339c4fb7 am: 351b6dad03 am: e46e2638db" into rvc-qpr-dev-plus-aosp am: 137d554330
Original change: https://googleplex-android-review.googlesource.com/c/platform/cts/+/12794829

Exempt-From-Owner-Approval: This CL remove vts10 from test_suites setting.

Change-Id: I5ada763278e336d39392ae27b566cd52eaf3e285
2020-10-09 04:40:10 +00:00
Chalard Jean
43370c622d Merge "Fix a way for this test to flake." 2020-10-09 04:29:17 +00:00
Remi NGUYEN VAN
ae04a86b0b Use new test utilities from frameworks/libs/net
Use runAsShell from the new TestPermissionUtils, and rename popPacket to
poll.

This rolls forward the previous change as-is. See change
I34bad7ec79ef0fd03e5e40b643f0d85d686c53ec for details on why the
previous change was reverted.

Bug: 168868607
Test: atest CtsNetTestCasesLatestSdk
Change-Id: I7b5176e84ffe08cc5ea1251f66cdcb9b7066ec0a
2020-10-09 02:54:33 +00:00
Remi NGUYEN VAN
dcc8bf6706 Merge "Revert "Use new test utilities from frameworks/libs/net"" 2020-10-09 01:48:20 +00:00
Remi NGUYEN VAN
0d4dee1c1a Revert "Use new test utilities from frameworks/libs/net"
Revert submission 1440811-iputils_constants_move

Reason for revert: Likely broke build in b/170438226
Reverted Changes:
Ic382d24e7:Move NetworkStackConstants to frameworks/libs/net
I0d938e296:Use new test utilities from frameworks/libs/net

Change-Id: Iec4709778ba1b30687df265a2a5c694c536b5456
2020-10-09 01:38:44 +00:00
Remi NGUYEN VAN
2087f3eeb1 Merge "Use new test utilities from frameworks/libs/net" 2020-10-09 00:14:15 +00:00
Treehugger Robot
c2339c4fb7 Merge "Remove vts10 suite setting" 2020-10-08 17:46:42 +00:00
Lorenzo Colitti
06aad059fb 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@.

Test: atest --rerun-until-failure 100 CtsNetTestCasesLatestSdk:MultinetworkApiTest#testNativeDatagramTransmission
Change-Id: I8625ac9a58c55fc19dfb9fdb5f34a89cee40caaf
2020-10-08 16:28:33 +09:00
Sudheer Shanka
5a355fc3ec Merge "Mark testAppIdle(Non)Metered_whitelisted as flaky." 2020-10-07 20:18:25 +00:00
Remi NGUYEN VAN
9762005b3f Merge "Add a test for getCaptivePortalServerUrl" am: ddb629663b am: 68cf03184a am: 853764c208 am: 1db2e33248
Original change: https://android-review.googlesource.com/c/platform/cts/+/1431431

Change-Id: Iea32091dc37df1f9669e8035f5a20fb64cb70795
2020-10-07 08:13:38 +00:00
Chiachang Wang
2a2d0094b5 Merge "Don't wait for unnecessary disconnect broadcast" am: d074c9ea58 am: 150078860f am: c54186c01b am: 836d99821c
Original change: https://android-review.googlesource.com/c/platform/cts/+/1448359

Change-Id: I7f8a12938c3859dcc6fdc75e79ce1761c33516c8
2020-10-07 08:12:53 +00:00
Dan Shi
d65405de4b Remove vts10 suite setting
Bug: 169583551
Test: build
Change-Id: I42d38bd2f9e8b1e932571a38c2ebe72861d18fca

Exempt-From-Owner-Approval: This CL remove vts10 from test_suites setting.
Change-Id: I42d38bd2f9e8b1e932571a38c2ebe72861d18fca
2020-10-07 02:31:26 +00:00
Sudheer Shanka
62e162b284 Mark testAppIdle(Non)Metered_whitelisted as flaky.
Bug: 170180675
Test: atest hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I82c1cebc7ad8f8aac4468f8412216c59ea7a0f71
2020-10-06 19:11:36 -07:00
Remi NGUYEN VAN
ddb629663b Merge "Add a test for getCaptivePortalServerUrl" 2020-10-07 00:53:06 +00:00
Chiachang Wang
d074c9ea58 Merge "Don't wait for unnecessary disconnect broadcast" 2020-10-07 00:50:36 +00:00
Treehugger Robot
7ba787cc83 Merge "Move CtsNetTestCasesLatestSdk to presubmit" 2020-10-06 14:12:49 +00:00
Chiachang Wang
b40f760f8d Don't wait for unnecessary disconnect broadcast
testTetheringUpstream does not require WIFI to be default
network since the test disconnects WIFI and verifies that
tethering use cellular network to be its upstream. Test only
needs to ensure WIFI is disconnected so the broadcast is not
necessary. Change to alternative method that does not wait for
disconnect broadcast to prevent flaky caused by unvalidated
wifi network.

Bug: 168217651
Test: atest TetheringManagerTest
Change-Id: If74fcad192cb4d4947ac2c99cd9ea2d3971d2cac
2020-10-05 14:11:43 +08:00
Remi NGUYEN VAN
8b8e27df06 Use new test utilities from frameworks/libs/net
Use runAsShell from the new TestPermissionUtils, and rename popPacket to
poll.

Bug: 168868607
Test: atest CtsNetTestCasesLatestSdk
Change-Id: I0d938e2967f3adc324dd2bc81138b4b2910af5f8
2020-10-05 14:32:57 +09:00
Remi NGUYEN VAN
a1b195ee3f Add a test for getCaptivePortalServerUrl
The API returns a URL that can be used to test the presence of a captive
portal.
The only requirements are that the URL is valid, and HTTP (as per
javadoc).

Bug: 168755498
Test: atest CtsNetTestCasesLatestSdk
Change-Id: I9a92b422a7df2379fadab79ed49b77e7c2fcc393
2020-10-05 13:02:21 +09:00
Remi NGUYEN VAN
a773ccbe97 Move CtsNetTestCasesLatestSdk to presubmit
The last 19 runs have been green. This is already in presubmit in other
branches.

Note that mainline-presubmit is still not supported in some branches.

Bug: 158153057
Test: m
Merged-In: I9d7954503990902ae807d74de14f4a2874328072

Change-Id: I9d7954503990902ae807d74de14f4a2874328072
2020-10-05 10:34:35 +09:00
Treehugger Robot
0db2a5338b Merge "Skip unsupported hardware for testB141603906" am: accaf62b80 am: f54f10985d am: 3e4bcd4eb5 am: 43e74d6a06 am: 8b0e5c6ea8
Original change: https://android-review.googlesource.com/c/platform/cts/+/1428811

Change-Id: Ic3aad062201c644ff055ab81d466bfaed3e87717
2020-10-02 04:55:10 +00:00
Treehugger Robot
accaf62b80 Merge "Skip unsupported hardware for testB141603906" 2020-10-02 02:53:35 +00:00
Chalard Jean
4613c7e02a Fix a way for this test to flake.
While tests are hopefully cleaning up after themselves,
there is no guarantee that there is a currently available
default network milliseconds after any given test. Some
tests need to disconnect to check something, or to change
a property of the wifi network that they have to revert at
the end for example. Or, a test may fail leaving the device
without a default network.

To make sure the state is correctly cleaned up, have
tearDown make sure the device is connected to a working
Internet connection before the test ends, so that the next
test can be sure to find established connectivity
immediately. It's possible the device needs a few hundred
milliseconds to re-establish connectivity, so this patch
gives a grace of up to 30 seconds (the default waiting
timer for TestCallback) for connectivity to be restored at
the end of any test.

Bug: 161767594 and others
Test: ConnectivityManagerTest
Change-Id: I8cf3e6e6c116cabd5b04bf2562da84f7e635ca2a
2020-09-29 10:03:01 +00:00
Chiachang Wang
0649da0638 Merge "Don't check broadcast intent on connection status check" am: 4ffaa483a7 am: 6dc88cb46d am: 8b75af5a27 am: 0600e8e788 am: bacf02d85b
Original change: https://android-review.googlesource.com/c/platform/cts/+/1435534

Change-Id: Ie59e9488e235da03d24cec69fb647c73c3130df9
2020-09-24 12:02:13 +00:00
Chiachang Wang
4ffaa483a7 Merge "Don't check broadcast intent on connection status check" 2020-09-24 10:07:56 +00:00
Paul Hu
cce6c72329 Merge "Add CTS to verify DownloadManager permission" am: 5301d5448d am: 0608ca0f3a am: 61b81baf33 am: d9b5d7e15e am: 78dc5c33af
Original change: https://android-review.googlesource.com/c/platform/cts/+/1429632

Change-Id: I32e29df7c1d9f43949b06d0382940ea38fb36497
2020-09-24 09:52:55 +00:00
Chiachang Wang
8ff9c262ca Don't check broadcast intent on connection status check
testRequestNetworkCallback_onUnavailable is flaky because
the test expects a connectivity broadcast to be sent for the
lost network. But after testSetAirplaneMode, the wifi network
is not yet default network so a broadcast is never sent but
only onUnavailable is triggered. Replace disconnectFromWifi
with ensureWifiDisconnected to skip checking the broadcast.

Bug: 162323152
Test: atest CtsNetTestCasesLatestSdk:ConnectivityManagerTest\
      --rerun-until-failure 20
Change-Id: I88f434798ec83539df9cc6a81446ca37a0081e3b
2020-09-24 09:38:53 +00:00
paulhu
01f9b00e88 Add CTS to verify DownloadManager permission
If DownloadManager doesn't have
CONNECTIVITY_USE_RESTRICTED_NETWORKS permission, it can't bind
socket to VPN when it is in VPN disallowed list but requested
downloading app is in VPN allowed list. Add a new CTS test to
verify that DownloadManager can do the download successfully via
VPN network.

Bug: 165774987
Test: atest HostsideVpnTests
Change-Id: Iba9e2f26ad325d0fdb34ab9a06faaaf9cb623166
2020-09-24 10:47:19 +08:00
Chiachang Wang
55eb57f749 Merge "Deflake test to ensure airplane mode switches work as expected" am: d67e07c14c am: f0a82c3288 am: cc3132bc74 am: 0bb0a93e79 am: e8b798e41a
Original change: https://android-review.googlesource.com/c/platform/cts/+/1404540

Change-Id: I376c4ac48a8e27dd75f247cd0d91cbcf5afa8223
2020-09-18 11:56:57 +00:00
Chiachang Wang
17ee20dc59 Deflake test to ensure airplane mode switches work as expected
testSetAirplaneMode verifies the result by checking if intent is
broadcasted or not. The working internet may sometimes remain
connected if the commands processed fast but sometimes don't.
It will leave uncertain network status to the follow-up tests
and cause flaky. This behavior specifically breaks
testRequestNetworkCallback_onUnavailable. As WiFi is not
enabled and still disconnecting, the behavior will confuse
test to not to disconnect WiFi. However, test may still get an
active WiFi network since the WiFi is not disconneted yet. Thus,
verify that working internet should disconnect and reconnect
expectedly if airplane mode is updated.

Bug: 162323152
Test: atest CtsNetTestCasesLatestSdk:ConnectivityManagerTest\
      --rerun-until-failure 20
Change-Id: Id126c43b1f009e7bbce18d75020f25347448b7fb
2020-09-18 10:51:11 +08:00
Josh Yang
ae3412405d Skip unsupported hardware for testB141603906
Bug: 168748249
Fix: 168748249
Test: local cts passed.
Change-Id: I8af0d5f9716a510322b2bfb0cdf6f05f94b12604
2020-09-17 00:27:59 +00:00
Kweku Adams
71f417f3eb Update tests to use Doze DeviceConfig flags.
Update tests to set DeviceConfig flags for DeviceIdleController
settings.

Bug: 124466289
Test: atest CtsHostsideNetworkTests
Test: atest FrameworksMockingServicesTests:DeviceIdleControllerTest
Test: atest SettingsProviderTest:SettingsBackupTest
Change-Id: Ie6d8d30897e192ef7a26656242034a3e820caa12
2020-09-01 14:23:52 -07:00
Xin Li
77065af37d Merge "Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)" into stage-aosp-master 2020-09-01 20:03:43 +00:00
Treehugger Robot
8d127f96c8 Merge "Don't require WiFi in CtsHostsideNetworkTests." am: b974f51473 am: 056ecd792f am: ebc6cbc693 am: edab8c8a50 am: 4cd324ddba
Original change: https://android-review.googlesource.com/c/platform/cts/+/1373016

Change-Id: Ia1a190c342d18285c2251a85ea288512ac35d2f5
2020-09-01 10:58:47 +00:00
Treehugger Robot
ebc6cbc693 Merge "Don't require WiFi in CtsHostsideNetworkTests." am: b974f51473 am: 056ecd792f
Original change: https://android-review.googlesource.com/c/platform/cts/+/1373016

Change-Id: I97ee9377f08c9bae1f9a052d718e945666ed226e
2020-09-01 10:09:22 +00:00
Treehugger Robot
b974f51473 Merge "Don't require WiFi in CtsHostsideNetworkTests." 2020-09-01 09:15:35 +00:00
Treehugger Robot
b56b55b2b3 Merge "Specify CAPABILITY_INTERNET for ConnDiags CTS test." am: 74bfd2d74c am: 831119c176 am: f9d0f0d9c1 am: 6b63484f76 am: ae544287e4
Original change: https://android-review.googlesource.com/c/platform/cts/+/1416372

Change-Id: If596f382cbbc2d95fcec54ea077bb4da96f7827a
2020-09-01 08:02:33 +00:00