Commit graph android_packages_modules_Co.../tests
Message SHA1
Enable REQUEST_RESTRICTED_WIFI and CARRIER_SERVICE_CHANGED_USE_CALLBACK by default with kill switch
Bug: 416044405

Test: atest ConnectivityManagerTest
      atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest
Change-Id: I1b67c00ce3d4054414ce9c538ec4d7b9a55b4302
Flag: com.android.net.flags.request_restricted_wifi

Ying Xu   commited 2025-05-14 10:56:45 -07:00
7e4e0952f8
Merge "Extend QosFilter address matching function" into main
Sewook Seo   authored and   Android (Google) Code Review   commited 2025-05-09 01:02:33 -07:00
ceb29e6cdf
Extend QosFilter address matching function
Extend QosFilter address match function for IP address range based on
prefix length.

Bug: 406146808
Bug: 399960748
Flag: com.android.net.flags.qos_filter_ip_range_matching
Test: atest CtsNetTestCases
Test: atest ConnectivityCoverageTests
Change-Id: I78d995fda111d258da9a912c7afa5e472e43437f

Sewook Seo   commited 2025-05-08 22:37:32 -07:00
6305252415
Merge changes Ia7691368,I802541ae into main
* changes:
  Remove most hidden API usage in net CTS
  Hardcode the setting for multipath preference

Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-08 21:49:24 -07:00
28d9001a20
Merge "Log improvement when the meta-data format is unexpected" into main
Junyu Lai   authored and   Android (Google) Code Review   commited 2025-05-08 19:59:45 -07:00
27aa3082b6
Log improvement when the meta-data format is unexpected
Currently, if the value of opt-in meta-data is not a String,
calling Bundle#getString would result in flooding the system
log with Bundle warning log and callstacks, but without
useful information like the package name.

Thus, a manual type check is performed, and the package name
is logged if a mismatch occurs.

Flag: EXEMPT flagged with a kill switch
Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideSatelliteDataOptInTest \
      ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
      --update-device
Bug: 416351099
Change-Id: Iae8e26f657e009edb8630dbbe64c7e3e958abc43

Junyu Lai   commited 2025-05-09 09:15:12 +08:00
4943a17fb6
Merge "Implement network avoid bad wifi from carrier config" into main
Jimi Chen   authored and   Android (Google) Code Review   commited 2025-05-08 17:46:53 -07:00
ae13aeb0fd
Add Kill Switch for PermissionMonitor Refactoring
As a follow-up to ag/33089478 and ag/33101784, the intent
receiving and dispatching logic was refactored and centralized
within the newly introduced BroadcastReceiveHelper.

However, due to the potential risks associated with this
refactoring, a kill switch is being added specifically for the
PermissionMonitor refactoring. This will allow for reverting
to the previous implementation (potentially involving code
duplication) to mitigate risks if issues arise.

Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.PermissionMonitorTest \
      ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest \
      --update-device
Bug: 410731080
Change-Id: I7889ef457d841c750da60a80e50ed6208c45448f

Junyu Lai   commited 2025-05-08 19:01:25 +08:00
638c43f201
Implement network avoid bad wifi from carrier config
Flag: android.net.platform.flags.avoid_bad_wifi_from_carrier_config
Bug: 410976315
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.MultinetworkPolicyTrackerTest
Change-Id: I89c579a8d5c7299303278280c463aa4c7c5bea99

Jimi Chen   commited 2025-05-08 07:25:36 +00:00
0881fc0a7d
Merge "Update link properties early for VPN networks" into main
Paul Hu   authored and   Android (Google) Code Review   commited 2025-05-07 22:28:58 -07:00
c360088112
Merge "Remove SSLCertificateSocketFactoryTest @hide usage" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-07 04:02:36 -07:00
8c79c399da
Merge "Fix for timing issue for handling user interaction addExternalApprover" into main
Paul Hu   authored and   Android (Google) Code Review   commited 2025-05-07 02:48:27 -07:00
8014cfea1e
Fix for timing issue for handling user interaction addExternalApprover
If client knows network name and passphrase, it can connect to the
server (Group owner) without user interaction. In this case, it needs
to use interface address of group owner, not device address

Bug: 408245757
Test: atest CtsConnectivityMultiDevicesTestCases
Flag: EXEMPT bug fix
Change-Id: I47bc8609e63564f4226a4ef71ea9e382f5f919fe
Signed-off-by: Rohit Kothari <r.kothari@samsung.corp-partner.google.com>

Rohit Kothari   authored and   Paul Hu   commited 2025-05-07 02:47:38 -07:00
50b479097d
Remove SSLCertificateSocketFactoryTest @hide usage
Include verifyHostname in the test instead of calling the hidden API.

This removes a bit of coverage as verifyHostname itself is not tested
anymore, but it still verifies behavior of the verification and state of
the SSL session on socket creation.

verifyHostname is @hide API so it should not be exercised directly by
CTS.

Bug: 410435307
Flag: TEST_ONLY
Test: atest

Change-Id: I11f56e21ba242b7fcc5b84f6de992dc94d90ddee

Remi NGUYEN VAN   authored and   Junyu Lai   commited 2025-05-07 17:21:26 +08:00
145dc19675
Merge "Skip network requests in MultinetworkApiTest for instant mode" into main
Paul Hu   authored and   Android (Google) Code Review   commited 2025-05-06 23:06:32 -07:00
af00e59dfc
Merge "Ensure Thread network is never mDNS capable" into main
Handa Wang   authored and   Android (Google) Code Review   commited 2025-05-06 19:48:34 -07:00
0c23270fbc
Ensure Thread network is never mDNS capable
Thread doesn't use mDNS and we should prevent NsdService from sending any mDNS traffic to Thread.

Bug: 414258735
Test: CI
Flag: EXEMPT bugfix
Change-Id: I62299769cd44d2984b81b273adea7ce459d3d773

Handa Wang   commited 2025-05-06 19:34:34 -07:00
b59c829ff1
Merge "Add a test for a multihoming configuration" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-06 15:36:32 -07:00
0339433a11
Add a test for a multihoming configuration
Without rule 5.5 this won't work correctly anyway. However, this tests
the behavior of the DHCPv6-PD client.

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: Ibd84883391926f4e19c0e3d370d28fbcb68c0b8e

Patrick Rohr   commited 2025-05-06 12:22:54 -07:00
c2bae6716c
Increase timeout to wait for Bluetooth to be enabled
Bug: 415541761
Flag: EXEMPT mainline
Test: yes
Change-Id: I2a9aa900802cd7801908cffe3fa801ff4c0bfb56

Patrick Rohr   commited 2025-05-06 09:43:08 -07:00
a48d4b8cdb
Merge "Add a test for multiple prefixes with p flags" into main
Maciej Ĺ»enczykowski   authored and   Android (Google) Code Review   commited 2025-05-06 09:27:03 -07:00
1c1d53877c
Add a test for multiple prefixes with p flags
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: Iffa24fdfbf739b8135f94d6d3434a496de7f3f28

Patrick Rohr   commited 2025-05-06 08:17:23 -07:00
3a019692f0
Merge "Test that DHCPv6 provisioning succeeds" into main
Patrick Rohr   authored and   Android (Google) Code Review   commited 2025-05-06 08:01:52 -07:00
847084636f
Merge "Use the corresponding PackageManager for different users" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-05 21:58:40 -07:00
8c31a84f9f
Use the corresponding PackageManager for different users
Currently, isSatelliteDataOptimizedApp utilizes the PackageManager
from the primary user's context. However, if the added package is
not visible to the primary user, the satellite controller will
fail to parse the required information from the AndroidManifest.

Therefore, the corresponding PackageManager should be used when
a package is being checked.

Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
      --update-device
Test: Manual:
      1. Create and setup 2nd user.
      2. adb install --user 10 CtsHostsideSatelliteDataOptimizedWithMetaData.apk
      3. adb shell dumpsys connectivity
      4. adb uninstall com.android.cts.net.hostside.satellitedataoptin.testapp
Bug: 410731080

Change-Id: I7adadb3449ec2ff984e6672ffb97919a2418e9b7

Junyu Lai   commited 2025-05-06 10:59:50 +08:00
988d00e57b
Skip network requests in MultinetworkApiTest for instant mode
MultinetworkApiTest would attempt to request cellular and Wi-Fi
network connections in test setup. This requires the
CHANGE_NETWORK_STATE permission, which is not granted to
the instant app. Therefore, skip the network requests if the
tests are running in instant mode.

Bug: 413261962
Test: atest android.net.cts.MultinetworkApiTest --instant
Flag: EXEMPT bug fix
Change-Id: I64366a4f2528402d3050adb54bb0aea352c53088

Paul Hu   commited 2025-05-06 02:39:52 +00:00
37c39d0af6
Test that DHCPv6 provisioning succeeds
Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I88421058cd4bf0b982ccb6ae5362e4f037130114

Patrick Rohr   commited 2025-05-05 14:51:43 -07:00
3db76bdfbc
Add end-to-end test for DHCPv6-PD
This adds the basic structure for a full end-to-end test for DHCPv6-PD
using a tap interface. This tests the interaction between the DHCPv6-PD
client, IpClient, and Netlink callbacks, and the kernel.

Test: TH
Flag: EXEMPT mainline
Bug: 1000001
Change-Id: I6e56703187310ceaf6462b41f2e1ab3690faff01

Patrick Rohr   commited 2025-05-05 11:10:06 -07:00
7f6b868224
Format MdnsInterfaceAdvertiserTest with ktlint
Test: TH
Flag: EXEMPT test only change
Change-Id: I1f278dfebb17836ff0a928c08b68a7266ac4d90a

Yuyang Huang   commited 2025-05-04 14:39:36 +09:00
21a4193c7b
Merge "Read meta-data instead of property" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-01 22:47:52 -07:00
3305741269
Read meta-data instead of property
Currently, the SatelliteAccessController checks if apps are
opt-in via a property tag under the application. This is
incorrect because PROPERTY_SATELLITE_DATA_OPTIMIZED is an
existing, released meta-data usage for Android B and needs
to be preserved.

Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
  --update-device
Bug: 410731080
Change-Id: If09890faf5d208d007179ecc29b7cf16f6fe6ebb

Junyu Lai   commited 2025-05-02 12:08:38 +08:00
0beea1e992
Merge "Enforce run on handler thread for SatelliteAccessController" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-05-01 20:30:51 -07:00
be4ecf0ac4
Enforce run on handler thread for SatelliteAccessController
This is a no-op refactoring that ensures events are handled
on the handler thread. While this is already the case in
production code, it's not consistently true in the tests.

This change adds the necessary methods for faking events
on the handler thread while maintaining readability in the
tests.

Flag: EXEMPT refactor
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
      --update-device
Bug: 410731080
Change-Id: I816233a823314c4c276138438bbaf33f781eccfe

Junyu Lai   commited 2025-05-02 09:50:40 +08:00
00625abeda
Merge "Add NET_CAPABILITY_NOT_RESTRICTED to test network in CtsNetUtils" into main
Jacque Li   authored and   Android (Google) Code Review   commited 2025-05-01 08:39:26 -07:00
d36772174f
Merge changes Id3eaa838,If07fb6c1 into main
* changes:
  Move failWithErrorReason to a common place
  Enable the last preference tests

Jean Chalard   authored and   Android (Google) Code Review   commited 2025-04-30 20:05:50 -07:00
175e8aeebf
Merge changes Ic80aff75,Ifc6aa8d6 into main
* changes:
  Support SharedLog for SatelliteAccessController
  Deduplicate fallback UID callbacks

Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-04-30 04:03:51 -07:00
c80e39d2ed
Merge "Add connectivity pre-check for CtsHostsideNetworkTests" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-04-30 02:45:52 -07:00
407cd52ca1
Add connectivity pre-check for CtsHostsideNetworkTests
Test: atest CtsHostsideNetworkTests
Flag: TEST_ONLY
Change-Id: If7f8cd614f0528248ca87be1d3aac5396b64e071

Paul Hu   commited 2025-04-30 01:14:24 -07:00
882a44f978
Deduplicate fallback UID callbacks
Currently, onUserAdded calls onRoleSmsChanged, which triggers a
fallback UIDs callback.  Updating opt-in UIDs also triggers a
callback. The callback triggered by onRoleSmsChanged actually
not necessary and should be removed.

Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
      --update-device
Bug: 410731080

Change-Id: Ifc6aa8d6b798cca2bfc575f986a012c52ea75667

Junyu Lai   commited 2025-04-30 16:12:06 +08:00
f0e3d9b1d7
Improve naming for SatelliteAccessController
This is a no-op refactoring, which renames several methods and
variables to more accurately reflect their functionality and
follow the naming style.

Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
--update-device
Bug: 410731080

Change-Id: I84b9eca60f2b8543b8bdb7cf972103b79105e670

Junyu Lai   commited 2025-04-30 11:58:49 +08:00
b0b5dcf96e
Add NET_CAPABILITY_NOT_RESTRICTED to test network in CtsNetUtils
Bug: 404377608
Flag: TEST_ONLY
Test: atest CtsNetTestCases
Change-Id: I594de55622d20d6fe178d121472d95b92c611ee4

Jacque Li   commited 2025-04-29 20:14:27 -04:00
d161f1dcf1
Merge "Listen to onExternalApplicationsAvailable in SatelliteAccessController" into main
Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-04-28 06:37:49 -07:00
bc08a1ffcb
Listen to onExternalApplicationsAvailable in SatelliteAccessController
For maintaining constrained data satellite opt-in apps, this is
needed for tracking apps installed on the storage.

Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
  --update-device
Bug: 410731080
Change-Id: I2a686a5a37747de97dcee6b78f66965cb4fd9942

Junyu Lai   commited 2025-04-28 16:35:36 +08:00
63dbd3ec93
Update link properties early for VPN networks
When LinkProperties are updated after a private DNS configuration
is set in updateNetworkInfo(), particularly when private DNS mode
is set to opportunistic and the VPN server uses its own DNS
servers, this can cause the private DNS to use the underlying
network for TLS handshaking, potentially leading to a leak.
To fix this, adjusting the order of operations—setting the private
DNS configuration before updating LinkProperties should resolve
the issue. This ensures that private DNS validation occurs after
the VPN's network configuration is fully applied.

Bug: 274867806
Test: atest ConnectivityCoverageTests
Flag: EXEMPT legacy flag early_link_properties_update_for_vpn
Change-Id: If684b51e6522a8284d5baee8db0d2f767405d359

Paul Hu   commited 2025-04-28 01:16:25 -07:00
515efcf47d
Merge changes Iabc2fad0,I2078330b into main
* changes:
  Improve TestableNetworkOfferCallback
  Add a way to poll with a position for ReadHead

Jean Chalard   authored and   Android (Google) Code Review   commited 2025-04-27 23:25:04 -07:00
74dcb4637c
Merge "Add EthernetPort class" into main
Chuwei He   authored and   Android (Google) Code Review   commited 2025-04-27 22:56:01 -07:00
8e31d9d8e9
Merge changes I579b3cd9,Ib008e63c into main
* changes:
  Allow QuicConnectionCloser to close loopback QUIC connection
  Enable QUIC connection close by default in ConnectivityService

Treehugger Robot   authored and   Android (Google) Code Review   commited 2025-04-27 22:20:38 -07:00
5ae058b9d4
Enable QUIC connection close by default in ConnectivityService
This feature will be controlled by the caller.
Cronet calls the register/unregisterQuicConnectionClosePayload APIs only
when the Chromium experiment flag is enabled
(http://crrev.com/c/6421621/).

This CL also updates testRegisterQuicConnectionClosePayload
to be skipped on U or older releases since FIREWALL_CHAIN_BACKGROUND is
supported on V or higher releases.

Flag: EXEMPT guarded by chromium flag
Bug: 311792075
Test: TH
Change-Id: Ib008e63c585cfe8775b25783cd55b0873bb5e2f0

Motomu Utsumi   commited 2025-04-28 12:52:58 +09:00
2ea5939672
Add EthernetPort class
This patch adds EthernetPort class which is used to track configuration
of ethernet networks internally.

Bug: 397536853
Test: atest ConnectivityCoverageTests:android.net.connectivity.
      com.android.server.ethernet.EthernetPortTest
Flag: EXEMPT mainline

Change-Id: Iba1c4461ae7d666aa31c076baa33c32c2c1f7603

Chuwei He   commited 2025-04-27 20:52:26 -07:00
8092ae7d29
Pipe the satellite network opt-in UIDs down to ConnectivityService
Flag: EXEMPT flagged with a kill switch
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.SatelliteAccessControllerTest \
  --update-device
Bug: 410731080
Change-Id: I76a57a3c42659b594cd541c55e0e179062461085

Junyu Lai   commited 2025-04-28 10:21:57 +08:00
2fd0d11db3