On at least some kernel versions sufficient memlock
is needed for some [types? larger? preallocated?]
bpf map creation requests to succeed.
(the kernel's bpf subsys ignores CAP_IPC_LOCK)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia6975e854e6398ee9c56ce836b278b570e17a0f9
Maciej Żenczykowskicommited 2025-03-20 11:54:00 -07:00
This reverts commit 372a15220a.
Reason for revert: this is Android B+ CTS and shouldn't be run with previous release, this can help to catch human error.
Change-Id: I867c63511d4f640e07b8317506291de284efcef3
CTS tests screen-on device in the beginning, but APF is not activated after screen-off in the test setup.
This change adds 3 secs delay to ensure APF activation before test execution.
Bug: 402667362
Test: ./cts-tradefed run cts-on-gsi -m CtsConnectivityMultiDevicesTestCases -t ApfV4Test --shard-count 2
Test: atest CtsConnectivityMultiDevicesTestCases:ApfV4Test
Change-Id: I067ce792b5f89e2f0051933982ebc734607fbf98
Following up from aosp/3313055, the binder interface getUidStats(II)J
is removed from the module. Currently, the test catches
NoSuchMethodException for reflection.
But did not properly skip for NoSuchMethodError which is thrown by
the java runtime when a method was present during compilation is
no longer available.
Test: cts-tradefed run commandAndExit cts -m CtsNetTestCases -t \
android.net.cts.NetworkStatsBinderTestinderTest
Bug: 378982661
Merged-In: I7b8baa7ab98ce0114541bf1a9568db6f832213b6
Change-Id: I7b8baa7ab98ce0114541bf1a9568db6f832213b6
(cherry picked from commit 05b57b7724)
Junyu Laiauthored and Samip Gargcommited 2025-03-19 23:53:55 -07:00
(a) this function returns a constant
(b) this function is utterly misnamed/documented:
an ipv4 mapped address is (like any ipv6 address) 128 bits long
(c) there's not even a guarantee the address is v4 mapped
when it is called
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I35bd84d28feca080152fd0c3d8e7b22835698b38
Maciej Żenczykowskicommited 2025-03-19 22:03:50 -07:00
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: I0c0b2724666cf6dfddbe3633fd50454f003ed133
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
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 Yallaauthored and Gerrit Code Reviewcommited 2025-03-19 20:18:37 -07:00
Otherwise, the tear down code that unregisters the NetworkAgent runs
after calling declareNetworkRequestUnfulfillable() which surpresses the
onLost() callback.
Test: CSL2capProviderTest
Change-Id: I447881bd4bd76ba492abf6cc3177143db626749e
It's possible that OEMs or device manufacturers may have relied on the
previous behavior (where interfaces without specified capabilities would
have minimal capabilities) to prevent certain Ethernet interfaces from
becoming the default network. To avoid breaking existing device
configuration, creating default network capabilities is limited by the
SDK level.
Bug: 399549599
Flag: EXEMPT bugfix
Test: atest ConnectivityCoverageTests
Change-Id: I46dc9fb02347710b09c0d2e8125b84a95f99fc9b
Additionally, when calling isEthernet(null), throw NPE instead of
SIGSEGV.
Test: New test in this patch
Change-Id: Ie80b860d4befe65a1777d0ebeb18d1807c6375d0
Chalard Jeanauthored and Patrick Rohrcommited 2025-03-19 08:24:45 -07:00
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 Colittiauthored and Chalard Jeancommited 2025-03-19 21:03:23 +09:00
This CL provides convenience methods to iterate over all
networks.
- forEachNetworkAgentInfo takes a consumer and runs it on all
networks in mNetworkAgentInfos. The consumer is allowed to
remove any number of networks. This is needed because some
loops over mNetworkAgentInfos result in disconnecting networks,
which removes them from the set.
- anyNetworkAgentInfo takes a predicate and returns true iff it
returns true on any element in mNetworkAgentInfos. The
predicate is not allowed to modify the set in any way.
Bug: 288149251
Test: simple refactor, covered by existing unit tests
Change-Id: I5d8b38503895d33abc2d96daaa1c96372befce64