This includes in particular {Full,Network}Score.POLICY_* members
which were removed recently.
Before :
Policies : 55&62&63
After :
Policies : EVER_EVALUATED&EVER_VALIDATED&IS_VALIDATED
This patch also unifies the directives under Tethering/ for
simplicity.
Test: adb logcat & dumpsys connectivity & dumpsys tethering
Change-Id: I3d231fbaaebe233b2633da8bb880b5ad1613a32f
testDefaultNetworkActiveListener expects Wifi network to be
the system default network. This requires Wifi to be validated
since the cellular network may be connected in the devices that
support telephony. The original timeout was only set to 5
seconds. The timeout may not be enough in some poor environment
cases, so increase the timeout would be helpful to reduce the
flaky rate.
Bug: 250250617
Test: atest android.net.cts.ConnectivityManagerTest
Change-Id: Iaef307e72dcd7a74cd5fdc6a406443eed6b412a6
If the app tries to make a network connection in the
foreground immediately after trying to do the same when
it's network access was blocked, it could receive a
UnknownHostException due to the cached DNS entry.
So, clear the dns cache after every network access for
now until we have a fix on the platform side.
Bug: 237549250
Bug: 238064333
Bug: 237556596
Bug: 238962235
Bug: 238833668
Bug: 239262832
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Ignore-AOSP-First: Will be cherrypicked to aosp later
Change-Id: Ic603b1bd9da24ee3724054c4a91794ee569e97f6
Merged-In: Ic603b1bd9da24ee3724054c4a91794ee569e97f6
* changes:
ethernet: fix interface state callbacks ignoring restricted permission
ethernet: cleanup ethernet state listener interaction
ethernet: fix IpClient restart when link is down
ethernet: ignore NUD failures for static ip configurations
Patrick Rohrauthored and Gerrit Code Reviewcommited 2022-10-07 18:30:08 +00:00
Add a addEthernetStateListener() function that works just like
addInterfaceStateListener(). Make sure ethernet state listeners are
added to addedListeners, and addedListeners are removed from both
ethernet and interface state listeners on tearDown. This is safe even if
a given listener was not registered as one or the other.
Test: atest EthernetManagerTest
Change-Id: I74d9d0747b94b7d34a2fe7630e840acd34f1a500
Do not restart IpClient when link is down after calling
updateConfiguration().
Test: atest EthernetManagerTest
Bug: 249897651
Change-Id: Ia0f6b67cde63747a608d35b8bec6ad37bcabb110
Some tests use internal http server to mock the network
validation test URLs. The test URLs are expected to apply on
specific network only, like Wifi. However, the network may
sometimes unexpectedly reconnect due to network issues. If a
network is connecting while applying the test URLs, the network
will get the same mock validation result and carry the result
to the follow up tests. This will fail the tests after it.
Thus, verify the supported networks to be connected and validated
before changing the validation URLs to prevent the URLs using in
unexpected networks.
Bug: 248251876
Test: atest android.net.cts.ConnectivityManagerTest
Change-Id: I39428abe05ab4336ca49beec33b2f9973f14f239
* changes:
ethernet: further cleanup updateConfiguration tests
ethernet: add test for updateConfiguration on untracked interface
ethernet: fix updateConfiguration expectations
ethernet: add LinkPropertiesChanged coverage in EthernetManagerTest
ethernet: remove unit test cases that have end-to-end coverage
ethernet: temporary mitigation for test that uses TUNSETCARRIER
Patrick Rohrauthored and Gerrit Code Reviewcommited 2022-10-04 15:44:20 +00:00
This test need a connected enterprise Network before setting
a profile network preferences. If there is no enterprise network
after setting no fallback preference, it will get lost callback
from cell network because it's not matched current preference.
The test fails sometimes because the enterprise network agent is
not fully connected yet. Thus, make sure the agent is fully
connected before settting a profile network preferences.
Fix: 242833379
Test: atest FrameworksNetTests:com.android.server.Connectivity\
ServiceTest#testPreferenceForUserNetworkUpDownWithNo\
FallbackWithAlreadyConnectedWorkAgent \
--rerun-until-failure 100 on cf target
Change-Id: I040b9f31c29834f90f4ca62c512e392141a3244d
Information in the dump does not change
....
current ownerMatch configuration: 516 DOZABLE_MATCH OEM_DENY_1_MATCH
....
Bug: 217624062
Test: dumpsys connectivity trafficcontroller, atest BpfNetMapsTest
Change-Id: I5f7b56e4ba03256414f49d0e82d65477fb97f05a
Information in the dump does not change
....
current statsMap configuration: 0 SELECT_MAP_A
....
Bug: 217624062
Test: dumpsys connectivity trafficcontroller, atest BpfNetMapsTest
Change-Id: I42a844227f258b91ba5b368d8e8abf82a773a801
Also remove the dump of mPrivilegedUser because this is not used now and
the information is duplicated with uidPermissionMap dump.
Before this CL
....
mUidPermissionMap:
10049 PERMISSION_NONE
10027 BPF_PERMISSION_INTERNET BPF_PERMISSION_UPDATE_DEVICE_STATS
1041 BPF_PERMISSION_UPDATE_DEVICE_STATS
....
After this CL
....
sUidPermissionMap:
10049 PERMISSION_NONE
10027 PERMISSION_INTERNET PERMISSION_UPDATE_DEVICE_STATS
1041 PERMISSION_UPDATE_DEVICE_STATS
....
Bug: 217624062
Test: dumpsys connectivity trafficcontroller, atest BpfNetMapsTest
Change-Id: I416501d5a28a5443f954f9c8c58ea255e5cdc897
If an interface is created before the interface state listener is
registered with the ethernet service, callbacks can get missed.
Specifically, createInterface() expects a down before an up callback. If
the listener registration executes after the event, the listener only
receives the final state event (up in this case).
This was a common source of flakiness in the EthernetManagerTests.
Test: EthernetManagerTest
Bug: 243120665
Merged-In: Iefccc9318a9ea2f929d34a52b7b275bf7a23f443
Change-Id: Iefccc9318a9ea2f929d34a52b7b275bf7a23f443
(cherry picked from commit ef61c582f5)
Moving NetworkCapabilities to a global removes a bunch of boilerplate
code. In addition, eventuallyExpectCapabilities() now checks for the
(non-exlusive) presence of all specified capabilities.
Test: atest EthernetManagerTest --iterations 10
Change-Id: Ic3d0a22ec45c8be8d9a719c4d9f2291e63437578
The automotive team has confirmed that updating IpConfiguration /
NetworkCapabilities should succeed independent of the interface state
(absent, client mode, server mode). This ensures updateConfiguration
works when the interface is absent, and the configuration is applied to
the interface once it gets added.
Test: atest EthernetManagerTest --iterations 10
Bug: 236312641
Change-Id: I6d295bce4575daca2061f46313732a9e4600a2ee
Since the mainline module is required to pass CTS, expectations that
test implementation details need to be removed from tests. For
updateConfiguration specifically, this means removing the expectLost() /
expectAvailable() expectation that is a symptom of the current
implementation but does not affect that actual outcome of this API.
Test: atest EthernetManagerTest --iterations 5
Change-Id: I40c38a1fe847eb4166e75535cf70db9ba569bc43
This replaces testNetworkRequest_linkPropertiesUpdate in
EthernetNetworkFactoryTest.
Test: atest EthernetManagerTest
Change-Id: Ib27b18a153a1866765378753baa9046aff9636f3