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
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
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
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
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
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
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
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
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
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
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
Instead of reconnecting without disabling/re-enabling wifi in
CaptivePortalTest, actually do the toggle during the test and
on teardown to ensure that the BSSID blacklist is cleared.
CaptivePortalTest intentionally makes the network not validate, which
causes it to be added to the BSSID blacklist. Toggling wifi is necessary
to make sure the test does not affect other tests.
Also check development SDK instead of the exact SDK_INT number so that
the test can pass on current AOSP builds.
Bug: 158924461
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalTest \
CtsNetTestCasesLatestSdk:ConnectivityManagerTest
Original-Change: https://android-review.googlesource.com/1336114
Merged-In: I31f9f4a9678e11042005c29535af840246358764
Change-Id: I31f9f4a9678e11042005c29535af840246358764
This change adds assertions to ensure that the owner UIDs of IKEv2 VPNs
are correctly set.
Bug: 150135470
Test: This
Merged-In: Iabf2859c289aa86ec38aea1edcc1fb248b9d0d26
Change-Id: Iabf2859c289aa86ec38aea1edcc1fb248b9d0d26
(cherry picked from commit 30234827aa24716062a23f28b1effc59e9ef46de)