Commit Graph

4270 Commits

Author SHA1 Message Date
Treehugger Robot
74bfd2d74c Merge "Specify CAPABILITY_INTERNET for ConnDiags CTS test." 2020-09-01 06:11:22 +00:00
Cody Kesting
cb00911ada Specify CAPABILITY_INTERNET for ConnDiags CTS test.
This CL updates the NetworkCapabilities used for getting a cellular
data network in ConnectivityDiagnosticsManagerTest to require
CAPABILITY_INTERNET.

Bug: 166732795
Test: atest CtsNetTestCases
Change-Id: Ia32ac00f949a2ee9319c80c25f294bfa834ad0f9
2020-08-31 11:00:26 -07:00
Treehugger Robot
d863e35484 Merge "Add working internet precondition check" 2020-08-27 11:12:35 +00:00
Chiachang Wang
48d952a502 Add working internet precondition check
ConnectivityManagerTest expects a working internet before testing
but is not verified before each test. Add a working internet
check in setup to clearly test it.

Bug: 161370134
Test: atest CtsNetTestCasesLatestSdk:ConnectivityManagerTest
Change-Id: I47073ebff19fcf59d5d2ac86b43f8d54e621a55a
2020-08-27 17:58:48 +08:00
Treehugger Robot
5e759307ff Merge "Run validation tests even with an eth interface" am: 856ad3bc23
Original change: https://android-review.googlesource.com/c/platform/cts/+/1400131

Change-Id: I9c072749777457d4930535cde79d994f6717f48f
2020-08-24 10:51:39 +00:00
Remi NGUYEN VAN
fe093f509b Merge "Add utilities for network validation testing" am: ff15197c34
Original change: https://android-review.googlesource.com/c/platform/cts/+/1364518

Change-Id: Ia6f360509892910706d5f92aa98a9243feb9fd98
2020-08-24 07:41:30 +00:00
Remi NGUYEN VAN
c47fa617f2 Run validation tests even with an eth interface
The test actually does not need the ethernet interface to be the
only ethernet interface, as ethernet test interfaces now have
TRANSPORT_TEST|TRANSPORT_ETHERNET, which can be used to differentiate
them in the network request.

Bug: 162469293
Test: atest CtsNetTestCasesLatestSdk:NetworkValidationTest
Change-Id: I84cc8b6b9aaa764705d91ed298655d869c4388a6
2020-08-21 19:17:09 +09:00
Remi NGUYEN VAN
0e9b130cbc Add utilities for network validation testing
Refactor out TestHttpServer to share it between CaptivePortalApiTest and
CaptivePortalTest, move it to frameworks/libs/net, and add a
NetworkValidationTestUtil class with utilities to set the test
validation URLs.

Test: atest CtsNetTestCasesLatestSdk:CaptivePortal[Api]Test
Bug: 160617623
Bug: 160656765
Change-Id: Icd7829e680b2dddd1ddaa3dc2d946c14c20b5a15
2020-08-21 19:17:03 +09:00
Treehugger Robot
2d1446b55a Merge "Add a dependency test for getFrequency" am: 7b965d116d
Original change: https://android-review.googlesource.com/c/platform/cts/+/1398411

Change-Id: Icf8f6f4c61fb435137649ccf3f4bd91224707ea7
2020-08-14 04:21:49 +00:00
Treehugger Robot
7b965d116d Merge "Add a dependency test for getFrequency" 2020-08-14 04:02:54 +00:00
Remi NGUYEN VAN
1cf2445443 Add a dependency test for getFrequency
WifiInfo#getFrequency is tested in CTS since R, but because it is used
on Q devices in the NetworkStack, it should be covered by MTS.
Because wifi should be connected to run this test, CTS is the best place
to add a test.

Bug: 160006669
Test: atest NetworkStackDependenciesTest
Change-Id: I0040c2a163ef5e1a3b725d5aedc67259d01ca173
2020-08-13 15:19:27 +09:00
Chalard Jean
f0adb99511 Merge "Rename Kotlin util files to not include the Kt suffix" am: a42b415dc9
Original change: https://android-review.googlesource.com/c/platform/cts/+/1353402

Change-Id: Ib895f34ce8580dbd8daf941243a1a3724bb10582
2020-08-13 04:09:27 +00:00
Chalard Jean
7356e73849 Rename Kotlin util files to not include the Kt suffix
Callers don't care what language the utilities are written in

Test: builds
Change-Id: I06bf9838432e429b3d03649654e1bcef04b89dd9
2020-07-31 17:22:49 +09:00
Chalard Jean
77fd539623 Merge "Move some utils to a more appropriate package/directory" am: 6bf9a90a55
Original change: https://android-review.googlesource.com/c/platform/cts/+/1351363

Change-Id: I36c4831a5b8befd37d0a2802ac76680e42e03eeb
2020-07-31 00:53:12 +00:00
Chalard Jean
6bf9a90a55 Merge "Move some utils to a more appropriate package/directory" 2020-07-31 00:44:46 +00:00
Sudheer Shanka
65a484cb31 Merge "Update language to comply with Android’s inclusive language guidance." am: d0f158204f
Original change: https://android-review.googlesource.com/c/platform/cts/+/1377699

Change-Id: Ib144461d9ec7a39d8cba1e321d5a14ef698d972e
2020-07-30 21:26:25 +00:00
Sudheer Shanka
d0f158204f Merge "Update language to comply with Android’s inclusive language guidance." 2020-07-30 21:19:38 +00:00
Sudheer Shanka
2d4d72bc31 Update language to comply with Android’s inclusive language guidance.
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: n/a
Change-Id: I466bcd05d1cb5a5ba271bd4a7513c0e7dfa5145c
2020-07-29 20:09:33 +00:00
Chalard Jean
71b829649f Move some utils to a more appropriate package/directory
Test: builds
Change-Id: Id0f0f89c34502deb6d0e50503e5534fcc51c3f9b
2020-07-29 21:15:43 +09:00
Chiachang Wang
156ea0167e Merge "Update language to comply with Android's inclusive language guidance" am: 577c469d6b
Original change: https://android-review.googlesource.com/c/platform/cts/+/1373261

Change-Id: I7eafc5c7a63052351ad1d1b437cdd9df327dce15
2020-07-29 06:04:57 +00:00
Chiachang Wang
577c469d6b Merge "Update language to comply with Android's inclusive language guidance" 2020-07-29 05:44:57 +00:00
Chiachang Wang
59201b8e94 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code
for reference.

Test: atest CtsNetTestCasesLatestSdk:ConnectivityManagerTest
Bug: 161896447
Change-Id: I0c4be6060c66c75518629239703755c3fc5d99be
2020-07-29 11:58:48 +08:00
Chalard Jean
542057b81d Merge "Add ConnectivityManagerTest#testSetAirplaneMode" am: 7efcd4be05
Original change: https://android-review.googlesource.com/c/platform/cts/+/1178309

Change-Id: I5efb53fbd682c183b615e32ef73b7a3bb194ef94
2020-07-16 11:50:43 +00:00
Edward Savage-Jones
241a767522 Add ConnectivityManagerTest#testSetAirplaneMode
Add a test to verify the NETWORK_AIRPLANE_MODE permission

Bug: 145164696
Test: atest android.net.cts.ConnectivityManagerTest#testSetAirplaneMode
Change-Id: I45c024f444988ec0c43d60778a1d9c9fd3acbdb5
2020-07-14 14:06:52 +00:00
Mark Chien
793308371d Merge "Don't run testRequestLatestEntitlementResult if not supported" am: 1129c316fd
Original change: https://android-review.googlesource.com/c/platform/cts/+/1352284

Change-Id: I2c0704ada44b23b511353cab8a52a396de52d692
2020-07-10 07:09:53 +00:00
Mark Chien
1129c316fd Merge "Don't run testRequestLatestEntitlementResult if not supported" 2020-07-10 07:06:56 +00:00
Treehugger Robot
8d12e31a62 Merge "Add CtsNetTestCasesLatestSdk to mainline-presubmit" am: ce5d7c09ab
Original change: https://android-review.googlesource.com/c/platform/cts/+/1331100

Change-Id: I6904cd64c4021bd3e5431ac0b66b481321b0470c
2020-07-10 00:49:01 +00:00
Treehugger Robot
ce5d7c09ab Merge "Add CtsNetTestCasesLatestSdk to mainline-presubmit" 2020-07-10 00:36:44 +00:00
Treehugger Robot
c2944b4510 Merge "Increase a timeout that's too short" am: 6cc5d32e6f
Original change: https://android-review.googlesource.com/c/platform/cts/+/1358064

Change-Id: Ib6f94b8cc637add1d1fd4f2876b19d4b1c03f3a6
2020-07-09 15:23:29 +00:00
Treehugger Robot
6cc5d32e6f Merge "Increase a timeout that's too short" 2020-07-09 15:11:02 +00:00
Chalard Jean
b7f471ae33 Increase a timeout that's too short
This should have been longer to start with. This oversight is due
to a poor API in TestNetworkCallback that was made that way for
backwards compatibility ; b/157405399 tracks improving this API.

Test: this
Bug: 160660082
Change-Id: If0587a2a91977427a2f679a502d838fbecdd82f2
2020-07-09 15:32:48 +09:00
Chalard Jean
b02ea3ecdd Merge "Ignore non-matching callbacks to fix flakiness" am: 2e2642f909
Original change: https://android-review.googlesource.com/c/platform/cts/+/1318219

Change-Id: Iedf444b13c9009d296869beb161ac1614095ae41
2020-07-09 06:25:29 +00:00
Chalard Jean
2e2642f909 Merge "Ignore non-matching callbacks to fix flakiness" 2020-07-09 06:12:45 +00:00
easoncylee
a1b13d6d39 Add CtsNetTestCasesLatestSdk to mainline-presubmit
This is the pilot run for mainline testing in Test Mapping Suite.

For supporting mainline testing in Test Mapping Suite, developers can
run tests by configuring the TEST_MAPPING file, the 3 simple steps are:
  - Add tests to be part of general-tests suite if the test does not
    depend on a device specific features.
  - Update test configureation for TradeFed to run mainline testing.
  - Update TEST_MAPPING file with test-group as "mainline-presubmit"

It's only for postsubmit now, and will be moved to actual presubmit
once the whole mechanism is stable.

For more details about the usage, please refer to go/test-mapping-mainline-user-guide

Bug: 160753366
Test: forrest.
Change-Id: I8704cc5626a3e049eb3c27adb86e9c1a4d828273
2020-07-08 15:13:27 +08:00
Treehugger Robot
35b8fb07a1 Merge "Create NetworkAgent CTS for NET_CAP_TEMP_NOT_METERED" am: 7dde88274a
Original change: https://android-review.googlesource.com/c/platform/cts/+/1316376

Change-Id: Ia81dbc1a8a1c16daf6b82ef93014d6a4f75a969a
2020-07-08 04:43:35 +00:00
Treehugger Robot
7dde88274a Merge "Create NetworkAgent CTS for NET_CAP_TEMP_NOT_METERED" 2020-07-08 04:30:22 +00:00
Chalard Jean
f70d762a55 Ignore non-matching callbacks to fix flakiness
This is a host-side tests that receives its network callbacks
through a custom AIDL that proxies them to this host-side
process. As this runs of the real callbacks from a real network,
this test receives unrelated callbacks – in particular calls to
onCapabilitiesUpdated to warn the process of updates of the
signal strength.
This skips these callbacks across the board by only matching
the expected callback. This will fix flakiness in the test.

Also, as a drive-by fix, this also checks the network in
the onBlockedStatusChanged callback. If the network object
is not the expected one, the test should not pass.

Bug: 160270536
Test: NetworkCallbackTests
Change-Id: I67c685ebfb2c5e2ee6f7615196eedea8292ca3ff
2020-07-08 13:07:24 +09:00
Chalard Jean
eb4d8b4fab Merge "Let testB141603906 run over ADB-over-network" am: 3cded8dc20
Original change: https://android-review.googlesource.com/c/platform/cts/+/1349862

Change-Id: Id15fb6f4ad19061ffe1564030e5108910a2cc99d
2020-07-01 13:47:14 +00:00
Chalard Jean
3cded8dc20 Merge "Let testB141603906 run over ADB-over-network" 2020-07-01 13:31:26 +00:00
Jiyong Park
8fd64757cb Merge "Drop .stubs from android.test.[base|runner|mock].stubs" am: 188ebc6a7f
Original change: https://android-review.googlesource.com/c/platform/cts/+/1353494

Change-Id: I63b970f7edbc554bea6e9a587a27b90ce88edbac
2020-07-01 12:09:23 +00:00
Jiyong Park
188ebc6a7f Merge "Drop .stubs from android.test.[base|runner|mock].stubs" 2020-07-01 11:58:41 +00:00
Jiyong Park
616e299222 Drop .stubs from android.test.[base|runner|mock].stubs
The .stubs library refer to the stub library of a java_sdk_library.
Since the name of the stub library is the implementation detail of the
build system, direct use of the name should be prohibited. Actually,
clients don't need to use the stub name directly because the build
system automatically redirects <name> to <name>.stubs.

Exempt-From-Owner-Approval: too many owners are involved. This is a
simple build script change.

Bug: 157007292
Test: m
Merged-In: I32502de3d87c5cfdbbcfe5545dd7db5e9bb551a7
(cherry picked from commit 89c4e06853f7ea4b5a62a3b02b4f5113617b2c60)
Change-Id: I32502de3d87c5cfdbbcfe5545dd7db5e9bb551a7
2020-07-01 17:17:28 +09:00
Remi NGUYEN VAN
a88f1bcf28 Merge "Move Inet[4]AddressUtils to libs/net" am: 4c602c3388
Original change: https://android-review.googlesource.com/c/platform/cts/+/1353486

Change-Id: I7d41b57d7c38f199696e6433e4d870bec6174f3a
2020-07-01 04:13:15 +00:00
Remi NGUYEN VAN
4c602c3388 Merge "Move Inet[4]AddressUtils to libs/net" 2020-07-01 04:08:25 +00:00
Remi NGUYEN VAN
ba6f3be791 Move Inet[4]AddressUtils to libs/net
The classes should not be picked up from frameworks/base, as they are
part of several mainline modules.

Bug: 151052811
Test: m; manual: flashed, wifi and telephony working
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalApiTest
(clean cherry-pick from internal branch)
Merged-In: Ic7534afe3a437f2089ed33cebdad391dc498d187

Change-Id: Ic7534afe3a437f2089ed33cebdad391dc498d187
2020-06-30 19:20:40 +09:00
markchien
b589520368 Don't run testRequestLatestEntitlementResult if not supported
If tethering is not supported, skip testRequestLatestEntitlementResult
which test TetheringManager#requestLatestTetheringEntitlementResult
API.

Bug: 159869957
Test: atest CtsTetheringTest
Change-Id: I65c32d5bc26f18f8c9d91593ab0c178e69e75c39
2020-06-30 17:04:58 +08:00
Chalard Jean
5ed6690e66 Let testB141603906 run over ADB-over-network
This test (added in R) failed to take the adb-over-network
case into account like most other tests in the same file. As
such it erroneously fails when tested over such a test setup.
This patch exempts the shell from being subject to the VPN,
like other similar tests do, to avoid the adb connections
being killed.

Test: VpnTest
Bug: 159761399
Change-Id: I0bc14d4d2cade7618c59b2cb88638bdf608d43d3
2020-06-29 02:02:35 +00:00
Lorenzo Colitti
bcd58ba008 Merge "Increase ConnDiagsTest timeout for end-to-end test." am: a86ff10ecf
Original change: https://android-review.googlesource.com/c/platform/cts/+/1349068

Change-Id: I0ff154d73be81e1d7810c07409c0f64ddacd30ab
2020-06-26 07:31:08 +00:00
Lorenzo Colitti
a86ff10ecf Merge "Increase ConnDiagsTest timeout for end-to-end test." 2020-06-26 07:13:56 +00:00
Cody Kesting
c8d9a5706e Increase ConnDiagsTest timeout for end-to-end test.
This change increases the delay allowed for administratorUid updates to
reach ConnectivityService in #testRegisterCallbackWithCarrierPrivileges.
Currently, there is no deterministic signal that can be used to wait for
this change, so Thread#sleep is required. This value is increased
because the previous delay did not give enough time for the
administratorUid change to reach CS, causing test flake.

Bug: 159718782
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Change-Id: I36347f6d52e3ce1bd30e3f74c35f4ecd15c8c65e
2020-06-26 07:13:45 +00:00