Commit Graph

5025 Commits

Author SHA1 Message Date
Jiyong Park
3001fbde9e [automerger skipped] Merge "Drop .stubs from android.test.[base|runner|mock].stubs" am: 188ebc6a7f am: 8fd64757cb -s ours
am skip reason: Change-Id I32502de3d87c5cfdbbcfe5545dd7db5e9bb551a7 with SHA-1 82bb526062 is in history

Original change: https://android-review.googlesource.com/c/platform/cts/+/1353494

Change-Id: I2e428f7780eec0401e9aae981a01bb440c620e7b
2020-07-01 12:21:52 +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
Jiyong Park
2e220ff9a1 Merge "Drop .stubs from android.test.[base|runner|mock].stubs" into rvc-dev-plus-aosp 2020-07-01 08:07:47 +00:00
Remi NGUYEN VAN
0ccd0a124b [automerger skipped] Merge "Move Inet[4]AddressUtils to libs/net" am: 4c602c3388 am: a88f1bcf28 -s ours
am skip reason: Change-Id Ic7534afe3a437f2089ed33cebdad391dc498d187 with SHA-1 484f0d4901 is in history

Original change: https://android-review.googlesource.com/c/platform/cts/+/1353486

Change-Id: I410edca2b6157bfe92def92b02eab8d8d05642c6
2020-07-01 04:29:13 +00: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
Jiyong Park
82bb526062 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 4072d4d5d4)
Change-Id: I32502de3d87c5cfdbbcfe5545dd7db5e9bb551a7
2020-06-29 22:56:28 +09:00
Lorenzo Colitti
86b65ff3b3 [automerger skipped] Merge "Increase ConnDiagsTest timeout for end-to-end test." into rvc-dev am: 2658b1f70a -s ours
am skip reason: Change-Id I36347f6d52e3ce1bd30e3f74c35f4ecd15c8c65e with SHA-1 c8d9a5706e is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/cts/+/12007227

Change-Id: I9e1271df23ae4dd8302fb2bdb69f821c48acfad5
2020-06-26 15:21:24 +00:00
Lorenzo Colitti
af7ca2d11f 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
Original-Change: https://android-review.googlesource.com/1349068
Merged-In: I36347f6d52e3ce1bd30e3f74c35f4ecd15c8c65e
Change-Id: I36347f6d52e3ce1bd30e3f74c35f4ecd15c8c65e
2020-06-26 08:18:39 +00:00
Lorenzo Colitti
6fcf2ec7f1 Merge "Increase ConnDiagsTest timeout for end-to-end test." am: a86ff10ecf am: bcd58ba008
Original change: https://android-review.googlesource.com/c/platform/cts/+/1349068

Change-Id: I0e55bacc1e8bcad9844e0e60ac4eadf92b977cf9
2020-06-26 07:48:13 +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
Cody Kesting
9e602b3a7c [automerger skipped] Merge "Fix ConnDiags Test for invoke-after-validate and unregister CBs." am: 58af3db73e am: 9a17cc9f1c -s ours
am skip reason: Change-Id I1836536fe60a65ba33170cd80e8f4996f1965d19 with SHA-1 cce29fc44d is in history

Original change: https://android-review.googlesource.com/c/platform/cts/+/1320277

Change-Id: I80bad133fa77c78334bf4d8c9d98097d7f5846fd
2020-06-25 16:14:11 +00:00
Cody Kesting
9a17cc9f1c Merge "Fix ConnDiags Test for invoke-after-validate and unregister CBs." am: 58af3db73e
Original change: https://android-review.googlesource.com/c/platform/cts/+/1320277

Change-Id: I6bb3f71a4d919026d768c7e443afeb30cd928998
2020-06-25 15:54:12 +00:00
Cody Kesting
ee8feba3c1 Fix ConnDiags Test for invoke-after-validate and unregister CBs.
This change fixes several things in ConnectivityDiagnosticsManagerTest:
- testOnConnectivityReportAvailable creates the Test Network after
registering the ConnectivityDiagnosticsCallback. This ensures that the
callback is invoked only after the network is validated (not for the
on-register behavior).

- The TestNetworkInterface created while setting up the Test Network is
held onto for the duration of each test. This ensures that the interface
is not garbage collected during the test. While the interface is not
needed for the test, this change makes it clear when the interface is
cleaned up.

- All registered ConnectivityDiagnosticsCallbacks are unregistered at
the end of each test. This ensures that all accompanying NetworkRequests
are cleaned up. If NetworkRequests are leaked, unrelated test failures
can occur (the platform limits the number of NetworkRequests per UID).

Bug: 156294356
Bug: 148032944
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Change-Id: I1836536fe60a65ba33170cd80e8f4996f1965d19
Merged-In: I1836536fe60a65ba33170cd80e8f4996f1965d19
2020-06-25 01:07:48 +00:00
Luke Huang
8b8b898fde [automerger skipped] Merge "Add net-utils-framework-common to cts-net" am: 10fa0790d9 am: 7b91e6e0d6 -s ours
am skip reason: Change-Id I40e2d4c4945a0579f6e1923e4722b09354ff050c with SHA-1 6261d27a9f is in history

Original change: https://android-review.googlesource.com/c/platform/cts/+/1348526

Change-Id: Ic92f7d753597c455c992e2b88f628f73ee1092c2
2020-06-24 19:12:10 +00:00
Luke Huang
9a174d1995 [automerger skipped] Merge "Update DnsPacket package name" am: 1ef852ef06 am: 2ba91a70c6 -s ours
am skip reason: Change-Id I908cb5f7bc6150e461748c8e34c92a19aa0206e4 with SHA-1 8f3a1b5091 is in history

Original change: https://android-review.googlesource.com/c/platform/cts/+/1348525

Change-Id: Ib9545f397412e49e69d8d9d71aac460e321d2ec6
2020-06-24 19:11:24 +00:00
Luke Huang
7b91e6e0d6 Merge "Add net-utils-framework-common to cts-net" am: 10fa0790d9
Original change: https://android-review.googlesource.com/c/platform/cts/+/1348526

Change-Id: I1fcebc37c5585e8e5d21662b6b97e052f1c01e16
2020-06-24 18:53:29 +00:00
Luke Huang
2ba91a70c6 Merge "Update DnsPacket package name" am: 1ef852ef06
Original change: https://android-review.googlesource.com/c/platform/cts/+/1348525

Change-Id: I4b5a9dba48af60642a72d6fbf13aafdf778f738c
2020-06-24 18:51:42 +00:00
Luke Huang
10fa0790d9 Merge "Add net-utils-framework-common to cts-net" 2020-06-24 18:41:18 +00:00
Luke Huang
1ef852ef06 Merge "Update DnsPacket package name" 2020-06-24 18:39:56 +00:00
Cody Kesting
5bf43cd7fb [automerger skipped] Merge "Only run ConnectivityDiagnosticsManagerTest as AppModeFull." am: 1b7351a948 am: 57033b41a3 -s ours
am skip reason: Change-Id Id867b8dcaca758cfeb83009848e1099e900a0790 with SHA-1 7c9d2128de is in history

Original change: https://android-review.googlesource.com/c/platform/cts/+/1326394

Change-Id: Iea3186e33644f3db72f07d1d5a4ec9c9269b80c8
2020-06-24 16:17:33 +00:00
Cody Kesting
57033b41a3 Merge "Only run ConnectivityDiagnosticsManagerTest as AppModeFull." am: 1b7351a948
Original change: https://android-review.googlesource.com/c/platform/cts/+/1326394

Change-Id: I66f85a4ef7f6f2146af5084ab7366532d69cad5a
2020-06-24 16:06:38 +00:00
Cody Kesting
5c2e383949 Only run ConnectivityDiagnosticsManagerTest as AppModeFull.
This CL restricts ConnectivityDiagnosticsManagerTest to only being run
as @AppModeFull. This is required, as Instant Apps are not allowed
CHANGE_NETWORK_STATE (required for CM#requestNetwork) or
MANAGE_TEST_NETWORKS (required for TestNetworkManager#setupTestNetwork)
permissions - both of which are required for
ConnectivityDiagnosticsManagerTest.

Bug: 158431112
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Change-Id: Id867b8dcaca758cfeb83009848e1099e900a0790
Merged-In: Id867b8dcaca758cfeb83009848e1099e900a0790
2020-06-24 07:59:36 -07:00
Luke Huang
1eebfa3d87 Add net-utils-framework-common to cts-net
In order to avoid class package missing problem, add
net-utils-framework-common in cts net test build. Also jarjar
the package name to prevent conflict.

Test: build
Test: atest DnsResolverTest
Bug: 150952393
(clean cherry-pick from internal branch)
Merged-In: I40e2d4c4945a0579f6e1923e4722b09354ff050c
Change-Id: I40e2d4c4945a0579f6e1923e4722b09354ff050c
2020-06-24 11:39:56 +00:00
Luke Huang
d9daaff707 Update DnsPacket package name
The package name needs to be updated as
the class is moved into com.android.net.module.util.

Bug: 149403767
Test: atest DnsResolverTest
(clean cherry-pick from internal branch)
Merged-In: I908cb5f7bc6150e461748c8e34c92a19aa0206e4
Change-Id: I908cb5f7bc6150e461748c8e34c92a19aa0206e4
2020-06-24 19:38:10 +08:00
TreeHugger Robot
2cd3762879 Merge "Skip flaky CTS tests for presubmit" into rvc-dev am: a372d80c12
Original change: https://googleplex-android-review.googlesource.com/c/platform/cts/+/11970057

Change-Id: Ib1852885513a3044bdc0cee05638719d2918d394
2020-06-24 08:25:33 +00:00
Remi NGUYEN VAN
4feab037a5 Skip flaky CTS tests for presubmit
Skip testRegisterCallbackWithCarrierPrivileges and
testContinuousQueriesInline for presubmit, as they are highly flaky.
These tests are still run in postsubmit as part of MTS. In order to put
the CTS suite in presubmit as early as possible, add the annotation so
they are skipped in TEST_MAPPING.

Bug: 158153057
Bug: 159718782
Bug: 159762682
Test: m
Change-Id: I4763db869fbc714767ea5ca3651e4a0b0c9e9378
2020-06-24 06:02:27 +00:00
Cody Kesting
30e195dae3 Merge "Fix ConnDiags Test for invoke-after-validate and unregister CBs." into rvc-dev am: ba9dd48cca
Original change: https://googleplex-android-review.googlesource.com/c/platform/cts/+/11916181

Change-Id: I42e34d97aa3575b298dc99efd4e7bf3a7ce69aea
2020-06-22 18:28:18 +00:00
Cody Kesting
ba9dd48cca Merge "Fix ConnDiags Test for invoke-after-validate and unregister CBs." into rvc-dev 2020-06-22 18:17:28 +00:00
Cody Kesting
9f8a87c7e2 [automerger skipped] Merge "CTS test ConnectivityDiagnostics via CarrierPrivilegesTracker." into rvc-dev am: efaf28e9f3 -s ours
am skip reason: Change-Id Iee8a428ada0b6e2127410267a13c3b688df83e6d with SHA-1 7d1159a2d4 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/cts/+/11916180

Change-Id: I27fb1f42bc60c4798bbb45257449142bfe0674e3
2020-06-22 17:30:14 +00:00
Cody Kesting
efaf28e9f3 Merge "CTS test ConnectivityDiagnostics via CarrierPrivilegesTracker." into rvc-dev 2020-06-22 17:12:41 +00:00
Cody Kesting
cce29fc44d Fix ConnDiags Test for invoke-after-validate and unregister CBs.
This change fixes several things in ConnectivityDiagnosticsManagerTest:
- testOnConnectivityReportAvailable creates the Test Network after
registering the ConnectivityDiagnosticsCallback. This ensures that the
callback is invoked only after the network is validated (not for the
on-register behavior).

- The TestNetworkInterface created while setting up the Test Network is
held onto for the duration of each test. This ensures that the interface
is not garbage collected during the test. While the interface is not
needed for the test, this change makes it clear when the interface is
cleaned up.

- All registered ConnectivityDiagnosticsCallbacks are unregistered at
the end of each test. This ensures that all accompanying NetworkRequests
are cleaned up. If NetworkRequests are leaked, unrelated test failures
can occur (the platform limits the number of NetworkRequests per UID).

Bug: 156294356
Bug: 148032944
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Change-Id: I1836536fe60a65ba33170cd80e8f4996f1965d19
2020-06-22 16:03:15 +00:00
Cody Kesting
c60ca1afda resolve merge conflicts of 9e491121c5 to rvc-dev-plus-aosp. Caused by aosp/1316384
Bug: 148032944
Bug: 151332031
Change-Id: I7cc024249afb59631820819fed62c2417ffbd05e
2020-06-22 14:31:05 +00:00
TreeHugger Robot
f42e51ec45 Merge "Add net-utils-framework-common to cts-net" into rvc-dev am: f1a476d61e
Original change: https://googleplex-android-review.googlesource.com/c/platform/cts/+/11931026

Change-Id: I5e0a161d7fd5af4f9d097189674727e2a8a4baa2
2020-06-22 12:56:31 +00:00
Luke Huang
6261d27a9f Add net-utils-framework-common to cts-net
In order to avoid class package missing problem, add
net-utils-framework-common in cts net test build. Also jarjar
the package name to prevent conflict.

Test: build
Test: atest DnsResolverTest
Bug: 150952393
Change-Id: I40e2d4c4945a0579f6e1923e4722b09354ff050c
2020-06-22 15:08:27 +08:00
Lorenzo Colitti
9e491121c5 Merge "CTS test ConnectivityDiagnostics via CarrierPrivilegesTracker." am: c7f94d5052
Original change: https://android-review.googlesource.com/c/platform/cts/+/1316384

Change-Id: If5630e02b0ae9a15976c0d21fe48eb4a88f53cf6
2020-06-22 04:55:45 +00:00
Cody Kesting
a9dda29874 CTS test ConnectivityDiagnostics via CarrierPrivilegesTracker.
This change adds a CTS test for ConnectivityDiagnostics using
CarrierPrivilegesTracker to receive permissions for
ConnectivityDiagnostics callbacks.

Specifically, the test provides CarrierPrivileges to the test package
(android.net.cts) for the active subscription via Carrier Configs
overrides. CarrierPrivilegesTracker listens to the Carrier Configs
change and matches the loaded certificate with the test package, then
includes the test package UID as an administrator for the Network in
ConnectivityService. Then, a ConnectivityDiagnosticsCallback is
registered and receives a ConnectivityReport on register for the active
subscription.

Bug: 148032944
Bug: 151332031
Test: atest ConnectivityDiagnosticsManagerTest
Change-Id: Iee8a428ada0b6e2127410267a13c3b688df83e6d
Merged-In: Iee8a428ada0b6e2127410267a13c3b688df83e6d
2020-06-22 04:44:17 +00:00
Lorenzo Colitti
c7f94d5052 Merge "CTS test ConnectivityDiagnostics via CarrierPrivilegesTracker." 2020-06-22 04:41:43 +00:00
Remi NGUYEN VAN
fd265a7858 Merge "Move Inet[4]AddressUtils to libs/net" into rvc-dev am: a530216c7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/cts/+/11835437

Change-Id: I773c676203488e9a323fa6a5b6c78e2006031fa0
2020-06-19 01:08:48 +00:00
Remi NGUYEN VAN
a530216c7d Merge "Move Inet[4]AddressUtils to libs/net" into rvc-dev 2020-06-19 00:49:29 +00:00
Lorenzo Colitti
946b09bb5c Merge "Update DnsPacket package name" into rvc-dev am: 7703986e4c
Original change: https://googleplex-android-review.googlesource.com/c/platform/cts/+/11863010

Change-Id: I166a083b41e7a7ccb5206e0c332ae0a77825f42a
2020-06-18 10:34:11 +00:00
Lorenzo Colitti
7703986e4c Merge "Update DnsPacket package name" into rvc-dev 2020-06-18 10:14:47 +00:00
Cody Kesting
286a433d78 Only run ConnectivityDiagnosticsManagerTest as AppModeFull. am: 7c9d2128de
Original change: https://googleplex-android-review.googlesource.com/c/platform/cts/+/11904000

Change-Id: Ia6830bfbb3c15fa04553433c8320eb0a79b3a299
2020-06-18 06:27:23 +00:00
Cody Kesting
7c9d2128de Only run ConnectivityDiagnosticsManagerTest as AppModeFull.
This CL restricts ConnectivityDiagnosticsManagerTest to only being run
as @AppModeFull. This is required, as Instant Apps are not allowed
CHANGE_NETWORK_STATE (required for CM#requestNetwork) or
MANAGE_TEST_NETWORKS (required for TestNetworkManager#setupTestNetwork)
permissions - both of which are required for
ConnectivityDiagnosticsManagerTest.

Bug: 158431112
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Change-Id: Id867b8dcaca758cfeb83009848e1099e900a0790
2020-06-18 13:38:00 +09:00
Luke Huang
8f3a1b5091 Update DnsPacket package name
The package name needs to be updated as
the class is moved into com.android.net.module.util.

Bug: 149403767
Test: atest DnsResolverTest
Change-Id: I908cb5f7bc6150e461748c8e34c92a19aa0206e4
2020-06-18 03:27:27 +00:00