Commit graph android_packages_modules_Co.../tests
Message SHA1
Merge "Use scapy to generate ARP packet in multi-device test" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2025-03-20 16:58:58 -07:00
4703e17d98
Merge "Release ClientNetworkRequest before marking request unfulfillable" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-20 09:14:05 -07:00
360536d926
Use scapy to generate ARP packet in multi-device test
Test: m connectivity_multi_devices_snippet && atest CtsConnectivityMultiDevicesTestCases
Test: atest NetworkStaticLibHostPythonTests
Change-Id: I30adfe7ca2fef83ed4ef2ea3e5bc2291b9016530

Jimi Chen   commited 2025-03-20 12:25:57 +00:00
f0343a65d1
Add IPv6 neighbor solicitation offload for APFv6 multi-devices tests
Test: m connectivity_multi_devices_snippet && atest CtsConnectivityMultiDevicesTestCases
Change-Id: I97f6a60ddfa3dcaf4aee0ea1db83cc9636031a54

Jimi Chen   commited 2025-03-20 11:14:50 +00:00
8e8bbcabde
Skip Ping6 offload multi-device test on devices with APF ram less than 3000
Test: TH
Change-Id: If17df379d9bec49a5d1c60b73091a77d9f3bb46d

Jimi Chen   commited 2025-03-20 11:14:50 +00:00
c5a9e2e745
Add MLDv2 offload for APFv6 multi-devices tests
Test: m connectivity_multi_devices_snippet && atest CtsConnectivityMultiDevicesTestCases
Change-Id: If07deb3405b889382e938550c7b09f90030f9d31

Jimi Chen   commited 2025-03-20 11:14:46 +00:00
3cc069adea
Merge changes from topic "revert-3548747-TOVIIQGWFJ" into main
* changes:
  Revert "Make iterating over mNetworkAgentInfos safer."
  Revert "Always disconnect agents immediately."
  Revert "Immediately create networks unless chickened out"

ESWAR MAGATAPALLI (xWF)   authored and   Gerrit Code Review   commited 2025-03-20 00:52:25 -07:00
5a3a51eb7a
Revert "Always disconnect agents immediately."
Revert submission 3548747

Reason for revert: Droidmonitor created revert due to b/404956859. Will be verified through ABTD for standard investigation.

Reverted changes: /q/submissionid:3548747

Change-Id: I44affb742ca066406e93fc75056b4d3d1298eadb

Satish Yalla   commited 2025-03-19 20:18:37 -07:00
19dcc447c4
Revert "Immediately create networks unless chickened out"
Revert submission 3548747

Reason for revert: Droidmonitor created revert due to b/404956859. Will be verified through ABTD for standard investigation.

Reverted changes: /q/submissionid:3548747

Change-Id: Ic4226f2f1a20965f80b554967568a4450e460da2

Satish Yalla   authored and   Gerrit Code Review   commited 2025-03-19 20:18:37 -07:00
0141d82c2d
Release ClientNetworkRequest before marking request unfulfillable
Otherwise, the tear down code that unregisters the NetworkAgent runs
after calling declareNetworkRequestUnfulfillable() which surpresses the
onLost() callback.

Test: CSL2capProviderTest
Change-Id: I447881bd4bd76ba492abf6cc3177143db626749e

Patrick Rohr   commited 2025-03-19 17:12:07 -07:00
512b789a8d
Merge changes I65763a52,Ib1d77da3,I5d8b3850 into main
* changes:
  Immediately create networks unless chickened out
  Always disconnect agents immediately.
  Make iterating over mNetworkAgentInfos safer.

Jean Chalard   authored and   Gerrit Code Review   commited 2025-03-19 15:09:28 -07:00
451f2dd39d
Merge "Don't crash the system server when a misconfigured agent adds a DSCP policy" into main
Maciej Å»enczykowski   authored and   Gerrit Code Review   commited 2025-03-19 11:04:57 -07:00
51ac9ff7c4
Don't crash the system server when a misconfigured agent adds a DSCP policy
Additionally, when calling isEthernet(null), throw NPE instead of
SIGSEGV.

Test: New test in this patch
Change-Id: Ie80b860d4befe65a1777d0ebeb18d1807c6375d0

Chalard Jean   authored and   Patrick Rohr   commited 2025-03-19 08:24:45 -07:00
fd3ab6b212
Immediately create networks unless chickened out
Test: ConnectivityCoverageTests CtsNetTestCases
Change-Id: I65763a528fb2cc04700ac8468eeca762b9eb01b5

Chalard Jean   commited 2025-03-19 21:03:23 +09:00
a13e335983
Always disconnect agents immediately.
This relands aosp/2623893 now that the underlying timing
issues have been fixed. It also addresses the two outstanding
comments that had not been fixed. It conditions it on the
"queue in system server" feature.

Currently, various codepaths in ConnectivityService disconnect
networks using NetworkAgentInfo#disconnect. This posts a message
to the NetworkAgent to disconnect and also posts a message to
ConnectivityService to call disconnectAndDestroyNetwork, which
performs all cleanup in ConnectivityService. These two messages
race and the order is non-deterministic.

Instead, always disconnect using disconnectAndDestroyNetwork,
and have disconnectAndDestroyNetwork post the message to the
agent to disconnect.

This fixes a bug where if wifi uses unregisterAfterReplacement
twice in quick succession, when the third agent connects it
doesn't work because the interface is still being used by the
second network.

Bug: 286649301
Test: covered by existing tests
Change-Id: Ib1d77da39232c02060a7a7c016ffd3a969e2356d

Lorenzo Colitti   authored and   Chalard Jean   commited 2025-03-19 21:03:23 +09:00
0e9f5e626b
Merge "Skip hostside tethering test if not SdkLevel.isAtLeastB()" into main
Quang Luong   authored and   Gerrit Code Review   commited 2025-03-19 04:24:46 -07:00
b0cad64f5f
Skip hostside tethering test if not SdkLevel.isAtLeastB()
HostsideTetheringTest#testSoftApConfigurationRedactedForOtherApps is
only applicable in B+, so skip it if not.

Bug: 403129363
Test: atest HostsideTetheringTests
Change-Id: I6b4be858befcabb1892ee4113ac2cf17b5d49ca5

Quang Anh Luong   commited 2025-03-19 19:26:24 +09:00
cd2b87e4c9
Merge "Fix kotlin lint errors" into main
Junyu Lai   authored and   Gerrit Code Review   commited 2025-03-18 22:26:03 -07:00
8b7891106c
Fix kotlin lint errors
This change is a no-op which only fix lint errors.
This is necessary to make the subsequent changes easier to review.

Test: TH
Bug: 349487600
Change-Id: Ief867009db6aaabd9d0759048cdd7c3318991b02

Junyu Lai   commited 2025-03-19 10:52:36 +08:00
c3717cf502
Merge changes Idf75e4e9,Idf0435f4 into main
* changes:
  Process enqueued messages from the NAI synchronously.
  Remove the queue on the NetworkAgent side

Jean Chalard   authored and   Gerrit Code Review   commited 2025-03-18 18:07:59 -07:00
5eb96faaf6
Merge "Add Ping6 offload for APFv6 multi-devices tests" into main
Maciej Å»enczykowski   authored and   Gerrit Code Review   commited 2025-03-18 16:28:38 -07:00
ef10edc183
Merge changes Id3eba714,I595ba207 into main
* changes:
  Add CtsTetheringUtils methods for wifi tethering without permission
  Skip stopTetheringRequest tests if tethering isn't supported

Quang Luong   authored and   Gerrit Code Review   commited 2025-03-18 04:12:57 -07:00
e149a49c7d
Merge "Update ApfIntegrationTest for APFv6/v6.1 requirements" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2025-03-18 03:29:33 -07:00
a03654ad70
Remove the queue on the NetworkAgent side
Now that the system server has a queue doing this job,
the queue on the network agent side can be removed.

Test: ConnectivityCoverageTests, CtsNetTestCases
Change-Id: Idf0435f447cfdd28d829a867d1085771837c6f9b

Chalard Jean   commited 2025-03-18 19:23:57 +09:00
391ec5d99c
Merge changes I71abf9d0,I57f25f5e,If6b15419 into main
* changes:
  Reapply "Add a queue system server-side for NetworkAgent"
  Reapply "Unify registration and NM assignment in NAI"
  Reapply "Return the registry in registerNetworkAgent."

Jean Chalard   authored and   Gerrit Code Review   commited 2025-03-18 03:19:07 -07:00
6f2b294fd0
Update ApfIntegrationTest for APFv6/v6.1 requirements
This commit updates ApfIntegrationTest to reflect the latest
requirements for supporting APFv6 and APFv6.1, including their
respective memory requirements.

Test: TH
Change-Id: I29e8e692eaf8e378fea99bda36c752d9d729ed86

Yuyang Huang   commited 2025-03-18 18:10:06 +09:00
4797563fd3
Add Ping6 offload for APFv6 multi-devices tests
Test: m connectivity_multi_devices_snippet && atest CtsConnectivityMultiDevicesTestCases
Change-Id: I11b7cef13562884235bd4e505adec1fff381e7ab

Jimi Chen   authored and   Maciej Å»enczykowski   commited 2025-03-18 01:49:50 -07:00
c992100a71
Merge "Add IGMPv3 offload for APFv6 multi-devices tests" into main
Maciej Å»enczykowski   authored and   Gerrit Code Review   commited 2025-03-18 01:46:48 -07:00
e634a7da38
Merge changes from topic "vpn-type-oem-enterprise" into main
* changes:
  Treat new OEM VPN types like the corresponding non-OEM types.
  Add more NativeVpnType AIDL constants for OEM-specific VPNs.

Lorenzo Colitti   authored and   Gerrit Code Review   commited 2025-03-18 00:50:13 -07:00
944a1d2855
Add CtsTetheringUtils methods for wifi tethering without permission
Device Owner and Carrier-privileged tethering usage relies on starting
tethering without TETHER_PRIVILEGE permission. Add utilities to
CtsTetheringUtils to do this.

Bug: 295979433
Test: atest DeviceOwnerTest TetheringManagerTest
Change-Id: Id3eba71481e27ccfa32f2b0588b8a74c490c5311

Quang Anh Luong   commited 2025-03-18 16:24:39 +09:00
73b09281c0
Skip stopTetheringRequest tests if tethering isn't supported
Bug: 402315643
Test: atest TetheringManagerTest

Change-Id: I595ba20718cd13b7c6b6d66bf540c599ef48304e

Quang Anh Luong   commited 2025-03-18 16:24:31 +09:00
a4d16050f9
Add IGMPv3 offload for APFv6 multi-devices tests
Test: m connectivity_multi_devices_snippet && atest CtsConnectivityMultiDevicesTestCases
Change-Id: Ica704150527bca11b975b6f122678e69eaa04c71

Jimi Chen   commited 2025-03-18 06:21:22 +00:00
8d552bf2c0
Reapply "Add a queue system server-side for NetworkAgent"
Now that faulty Telephony tests have been disabled temporarily
to allow for this bugfix, this can be reverted.
This reverts commit a5ec9b4112.

Test: FrameworksTelephonyTests CtsNetTestCases
Change-Id: I71abf9d02bdd34a4de80157a3f42bdfee6f6617e

Chalard Jean   commited 2025-03-18 14:42:54 +09:00
3c040009c5
Reapply "Return the registry in registerNetworkAgent."
Now that faulty Telephony tests have been disabled temporarily
to allow for this bugfix, this can be reverted.
This reverts commit 653d5f1ef4.

Test: FrameworksTelephonyTests CtsNetTestCases
Change-Id: If6b1541981803dc84de57b48adb13d40c9997fa0

Chalard Jean   commited 2025-03-18 14:42:39 +09:00
8a97692638
Treat new OEM VPN types like the corresponding non-OEM types.
Bug: 389829981
Test: new CTS tests
Change-Id: I9455a1e00db6fdca3706e83e26daa60db6c73d09

Lorenzo Colitti   commited 2025-03-18 14:34:18 +09:00
fd89cf529a
Add carrier privilege utils to CarrierConfigRule
Move the existing helper methods to acquire carrier privileges in
NetworkAgentTest.kt to CarrierConfigRule where it can be reused by other
CTS tests. Also reset the carrier service package override in the rule
cleanup.

Bug: 216524590
Test: atest NetworkAgentTest
Change-Id: Id907a2d641aa61838119e2be65654b9796464498

Quang Anh Luong   commited 2025-03-18 13:05:01 +09:00
a620310e9c
Merge "Add CachedService Class" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-17 09:59:20 -07:00
ac1af41d42
Merge changes from topic "revert-3535182-EBVRAQTHFS" into main
* changes:
  Revert "Return the registry in registerNetworkAgent."
  Revert "Unify registration and NM assignment in NAI"
  Revert "Add a queue system server-side for NetworkAgent"

Pechetty Sravani (xWF)   authored and   Gerrit Code Review   commited 2025-03-17 02:23:26 -07:00
67cc745550
Add CachedService Class
This is a no-op refactoring. A new CachedService class is
introduced to better represent cached services and their expired
status. This class will be used to optimize expired service
removal in subsequent changes.

Bug: 387910548
Test: atest ConnectivityCoverageTests NsdManagerTest
Change-Id: I56fa43b8cc0c69d77aa14f0bdaf024a94c45757c

Paul Hu   commited 2025-03-17 07:58:59 +00:00
b6339349a4
Revert "Return the registry in registerNetworkAgent."
Revert submission 3535182

Reason for revert: <Droidmonitor created revert due to b/404070202.Will be verified through ABTD for standard investigation.>

Reverted changes: /q/submissionid:3535182

Change-Id: I2febd2ee7227d487d9cd69dcabd9c04f888fd2de

Pechetty Sravani (xWF)   commited 2025-03-17 00:48:05 -07:00
653d5f1ef4
Revert "Add a queue system server-side for NetworkAgent"
Revert submission 3535182

Reason for revert: <Droidmonitor created revert due to b/404070202.Will be verified through ABTD for standard investigation.>

Reverted changes: /q/submissionid:3535182

Change-Id: Id48ef1cf44911cb291bcd8db349934751297718b

Pechetty Sravani (xWF)   authored and   Gerrit Code Review   commited 2025-03-17 00:48:05 -07:00
a5ec9b4112
Replace isTetheringWithSoftApConfig flag with B SDK check
isTetheringWithSoftApConfig flag is finalized, replace it with a simple
SdkLevel.isAtLeastB() check. This also fixes any issues with reading the
flag during boot.

Bug: 216524590
Test: covered by existing tests
Change-Id: I6c2717a68fa4f3c664c9948ec19b246db5afdb8b

Quang Anh Luong   commited 2025-03-17 15:18:29 +09:00
a10437f133
[Revert^2] Stop tethering request only if fuzzy-matched to existing request
stopTethering with a TetheringRequest should only stop tethering if
there is an existing request (pending or serving) that fuzzy-matches the
input and whose UID matches the caller (unless the caller is Settings,
which is allowed to remove any request).

If there is no existing fuzzy-matched request, return
TETHER_ERROR_UNKNOWN_REQUEST.

Note: This was originally merged as aosp/3527440 but was reverted due to
a dependency CL being reverted. Remerging this on top of the fix for the
dependency CL.

Reverted changes: /q/submissionid:3541662-revert-3527440-JRJJTQBUFC

Bug: 216524590
Test: atest TetheringTest RequestTrackerTest TetheringManagerTest

Change-Id: I99dd2433efbb82f3721aa708ab50d198f6fbcb10

Quang Luong   authored and   Quang Anh Luong   commited 2025-03-17 15:18:29 +09:00
d093ea69b0
[Revert^2] Reject TetheringRequests that fuzzy-match existing ones
Legacy behavior will return success results to multiple startTethering
calls of the same type, even though the link layer can only support one
of those requests at a time (other than tethered AP + LOHS).

For B+, clean up this behavior by only allowing the amount of requests
that the link layer can concurrently support. To do this, we'll
introduce the concept of "fuzzy-matching" such that if a new request
fuzzy-matches an existing request (either pending or serving), this
indicates that the link layer cannot support the new request
concurrently, and we'll fail the new request with
TETHER_ERROR_DUPLICATE_REQUEST.

To keep track of serving requests, we'll store the request and it's
IpServer in RequestTracker when we call IpServer.enable(), and we'll
remove it (indexed by IpServer) when
1) Calling IpServer.onStop()
2) Calling IpServer.unwanted()
3) We detect an IpServer transition to AvailableState with error code

Note: This was originally merged as aosp/3529632 but was reverted due to
a crash when reading aconfig flags at boot. That issue has been fixed
here.

Reverted changes: /q/submissionid:3541662-revert-3527440-JRJJTQBUFC

Bug: 216524590
Test: atest TetheringTest RequestTrackerTest TetheringManagerTest

Change-Id: I87a1ed31927cda27d3b7fdd7c823b8f828f8d777

Quang Luong   authored and   Quang Anh Luong   commited 2025-03-17 15:18:29 +09:00
8b29d287f5
Merge changes I4bc29b10,I94a56b2b,I9ca025b1 into main
* changes:
  Add a queue system server-side for NetworkAgent
  Unify registration and NM assignment in NAI
  Return the registry in registerNetworkAgent.

Jean Chalard   authored and   Gerrit Code Review   commited 2025-03-16 15:57:51 -07:00
f04de0efc1
Merge changes I0b3ac7b4,I90385146 into main
* changes:
  Add Abstract Class for RealtimeScheduler
  Implement RealtimeScheduler in DiscoveryExecutor

Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-16 09:27:17 -07:00
7d1b5b56ce
Add Abstract Class for RealtimeScheduler
Because some APIs in RealtimeScheduler are higher than the min
SDK version for the standalone MDNS build, an abstract class is
required to allow the standalone MDNS build to pass.

Bug: 366373064
Test: atest FrameworksNetTests NsdManagerTest
      m service-connectivity-mdns-standalone-build-test
Change-Id: I0b3ac7b4f8dfceeb3dd81e6a5f368b5d57927c41

Paul Hu   commited 2025-03-16 14:46:14 +00:00
b84bb3b448
Implement RealtimeScheduler in DiscoveryExecutor
This provides more accurate delay callbacks, thereby enhancing
the executor's overall functionality.

Bug: 366373064
Test: atest FrameworksNetTests NsdManagerTest
Change-Id: I903851464a92427b6e256573d693bb89a96d013f

Paul Hu   commited 2025-03-16 14:45:00 +00:00
0f4d1ab4d9
Merge "Add a method to help mocking registerNetworkAgent" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-14 01:25:28 -07:00
13a5d4b36e
Add a queue system server-side for NetworkAgent
The intent is to remove the queue on the NetworkAgent side.
This queue is triggered with the same conditions as the
existing one.

Test: ConnectivityCoverageTests, CtsNetTests
Change-Id: I4bc29b10e48e13cdf3c3a8a15a7c8d15954d2457

Chalard Jean   commited 2025-03-14 13:23:50 +09:00
34ccc71462