Commit graph

109,942 commits

Message SHA1
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 "Fix missing function in NetworkStaticLibHostPythonTests" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-03-18 01:47:31 -07:00
d492666256
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
Merge changes Id80bfca1,I8254c3f4 into main
* changes:
  clatd: one less shutdown log line
  clatd: rework sigterm & error handling

Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-18 00:42:37 -07:00
8aff973a30
Merge "clatd: move send_dad out of event_loop() into main()" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-18 00:30:48 -07:00
2413654ad8
Merge "clatd: embed CLATD_VERSION directly in log string" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-18 00:30:47 -07:00
13070faab5
Fix missing function in NetworkStaticLibHostPythonTests
This change corrects a missing function error, which was renamed in aosp/3545962.

Test: atest NetworkStaticLibHostPythonTests
Change-Id: I2f51702adfa48f2207ef4dd79f641c8f57d15ac7

Jimi Chen   commited 2025-03-17 23:56:23 -07:00
e6c9b28c2b
Merge "Add carrier privilege utils to CarrierConfigRule" into main
Quang Luong   authored and   Gerrit Code Review   commited 2025-03-17 23:35:22 -07:00
ab6342b70e
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
Merge "Use non-tentative IPv6 addresses in multi-device test" into main
Jimi Chen   authored and   Gerrit Code Review   commited 2025-03-17 23:04:03 -07:00
d1cbad238c
clatd: one less shutdown log line
less spam

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id80bfca1d2988928c6c3b56f9783d7414830d104

Maciej Żenczykowski   commited 2025-03-17 22:53:38 -07:00
0372f296b5
clatd: rework sigterm & error handling
Separate 'running' flag out into 'running' and 'sigterm',
and make SIGTERM handler the only thing that sets 'sigterm'.

running is cleared via catastrophic errors, ie. EOF and ENETDOWN

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8254c3f4643d60feff1cb32aaa9784dca18e138c

Maciej Żenczykowski   commited 2025-03-17 22:53:32 -07:00
b984f31e55
clatd: move send_dad out of event_loop() into main()
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id74ad4adf861182d928676213c77a24675c358a4

Maciej Żenczykowski   commited 2025-03-17 22:53:26 -07:00
2f96f2c242
clatd: embed CLATD_VERSION directly in log string
Allows for:
  adbz shell strings /apex/com.android.tethering/bin/for-system/clatd | grep 'clat version'
to print:
  Starting clat version 1.7 on %s plat=%s v4=%s v6=%s
instead of:
  Starting clat version %s on %s plat=%s v4=%s v6=%s

(which is more useful for rapid development)

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4ba7458287837cb014950927f3c8ff18dac268fc

Maciej Żenczykowski   commited 2025-03-17 22:53:26 -07:00
1961f673d1
netd bpf: correct comment in NetBpfLoad S+ world (try 2).
fixup for https://android-review.git.corp.google.com/c/platform/packages/modules/Connectivity/+/3548759

Bug: 404398959
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iae01ffba7496140349a8b113bed68d9f19d8b25f

Maciej Żenczykowski   commited 2025-03-17 22:49:56 -07:00
c07d271e54
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
netd bpf: correct comment in NetBpfLoad S+ world.
Bug: 404398959
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ieefac68fc531868cdf9aa4402cf8cb5a9d1a05ab

Maciej Żenczykowski   commited 2025-03-17 22:15:29 -07:00
4f373e3efa
Merge changes I65d57e0e,I8ca1f7ae into main
* changes:
  [Thread] unregister all country code callbacks when CountryCode is not needed
  [Thread] do not set the country code again if the co-processor doesn't support it

Zhanglong Xia   authored and   Gerrit Code Review   commited 2025-03-17 22:10:39 -07:00
996c612875
Add more NativeVpnType AIDL constants for OEM-specific VPNs.
Test: m
Bug: 389829981
Change-Id: If39e012dcf6388f2d4e7f8d2eebf01410e3f1543

Lorenzo Colitti   commited 2025-03-18 13:13:31 +09:00
d731b8136e
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
[Thread] unregister all country code callbacks when CountryCode is not needed
This commit unregisters all country code callbacks (WiFi, Telephony and
Location) when the CountryCode module detects that the co-processor
doesn't support setting the country code.

Bug: b/402276117
Test: atest ThreadNetworkUnitTests:ThreadNetworkCountryCodeTest#setCountryCodeNotSupported_returnUnsupportedFeatureError_unregisterAllCallbacks
Change-Id: I65d57e0e826202ad696335200645bf6d78c8b87c

Zhanglong Xia   commited 2025-03-18 03:04:21 +00:00
fe54478761
[Thread] do not set the country code again if the co-processor doesn't support it
Some the co-processors do not support setting the country code. This
commit enables the CountryCode module doesn't set the country again
after it knows that the co-processor doesn't support setting the
country code.

Bug: b/402276117
Test: atest ThreadNetworkUnitTests:ThreadNetworkCountryCodeTest#setCountryCodeNotSupported_returnUnsupportedFeatureError_countryCodeNotSetAgain

Change-Id: I8ca1f7aed3774a086e114e91d8100fb7fe9e3664

Zhanglong Xia   commited 2025-03-18 03:01:59 +00:00
f6187b99c7
Merge "change 'for-system' owner from root to clat" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2025-03-17 19:47:33 -07:00
1569bc4cbe
Merge "Start tethered hotspot with TetheringRequest" into main
Quang Luong   authored and   Gerrit Code Review   commited 2025-03-17 15:01:54 -07:00
8594562526
Merge "Add CachedService Class" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-17 09:59:20 -07:00
ac1af41d42
Start tethered hotspot with TetheringRequest
Use WifiManager.startTetheredHotspot(TetheringRequest, Executor,
SoftApCallback) to start softap. This allows for passing in the
requested SoftApConfiguration via TetheringRequest.

Bug: 216524590
Test: atest TetheringTest TetheringManagerTest
Change-Id: Ie4fb851e8b2243d233f9a8b3e18e2fa335cec307

Quang Anh Luong   commited 2025-03-17 21:13:47 +09:00
f7b6434a65
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 "Unify registration and NM assignment in NAI"
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: I65fdaaacb56c8ef227eaf1a0193efe8d332d6473

Pechetty Sravani (xWF)   commited 2025-03-17 00:48:05 -07:00
30fcf820f9
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
Use non-tentative IPv6 addresses in multi-device test
This update ensures multi-device offload tests retrieve only non-tentative IPv6 addresses,
preventing test caused by tentative addresses undergoing duplicate address detection.

Test: atest NetworkStaticLibHostPythonTests
Change-Id: Id2f61a34eda01a6e8e0457647229fe438a85c232

Jimi Chen   commited 2025-03-17 06:31:46 +00:00
2bfe2654d1
Fix WifiManager.startTetheredHotspot mocking
TetheringTest has several tests that rely on starting Wifi tethering,
but do not mock WifiManager.startTetheredHotspot. This causes the
pending Wifi request to be removed, even though the test continues
thinking that the call succeeded and continues mocking Wifi AP events.

Fix this by making sure the mock returns true in setUp(), and only set
it to false when we expect that the call should fail.

Bug: 216524590
Test: atest TetheringTest
Change-Id: Iaf076b9ae64d737a8591c7f41a5552757b47999b

Quang Anh Luong   commited 2025-03-17 15:18:29 +09:00
db7fdac6d9
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 "[Thread] leverage the TestableNetworkAgent to simplify the setup of test network" into main
Handa Wang   authored and   Gerrit Code Review   commited 2025-03-16 22:21:11 -07:00
ad3ca8bbb4
Merge "Enable the cached service removal feature by default" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-16 21:24:34 -07:00
c5852b2601
Merge "[Thread] create standalone border router test module" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-16 21:03:19 -07:00
51a2b6ae1f
[Thread] leverage the TestableNetworkAgent to simplify the setup of test network
Some previous setup steps were implemented in NsdManager test cases
hence we couldn't reuse them in Thread test cases. aosp/3377549
introduced more methods in TestableNetworkAgent class which we could use
to get unify the behavior and reduce redundant code.

Not sure if this can deflake the integration test cases.

Bug: 338061061

Change-Id: I6b4542505ec80bf06b736fecbbe7d6901d27cbc4

Handa Wang   commited 2025-03-16 20:10:09 -07:00
ff509d40ae
[Thread] create standalone border router test module
This is for reduce the overall time of the ThreadNetworkIntegrationTests
which now runs twice for both BR and non-BR cases

Bug: 403360961
Bug: 402480982

Change-Id: Ifa80b8e8885ed980064f92100ef817f9f62b4dc2

Kangping Dong   commited 2025-03-17 10:50:38 +08:00
f96d06db57
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 "no-op: Remove checkAndNotifyCommonError with ResultReceiver" into main
Quang Luong   authored and   Gerrit Code Review   commited 2025-03-14 23:53:01 -07:00
67055ed7a8
Merge "Fix TetheringTest.failureEnablingIpForwarding verification count" into main
Quang Luong   authored and   Gerrit Code Review   commited 2025-03-14 19:51:47 -07:00
856f57a0ce
Fix TetheringTest.failureEnablingIpForwarding verification count
failureEnablingIpForwarding verifies that TetheringMetrics sends one
more error report than it should. This extra verification is caused by
any(class) being passed into the mock WifiManager.startTetheredHotspot,
which does not match null even though the actual code passes in a
null. This results in an extra failure that causes the extra error
report call.

Fix this by replacing any(class) with null, and removing the extra error
verification.

Bug: 216524590
Test: atest TetheringTest
Change-Id: I93986a999d573a186696e54793563e2be8405f39

Quang Anh Luong   commited 2025-03-15 10:42:22 +09:00
3b6ee54cf6
Merge "Add CompatibilityVersion v2 to CT downloader" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2025-03-14 09:26:07 -07:00
d64a649df9