Commit graph

80,605 commits

Message SHA1
Merge "Add NetworkStackModuleTest exclusion for ConnectivityCoverageTests in TEST_MAPPING." into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-09-29 12:00:19 +00:00
ecfa576c02
Merge changes Ifd7abd8a,I39cab8ff,I6b3270d6,Ia28c6abc,If47d7e23 into main
* changes:
  Move the MULTI_SIM_ACTION receiver inline
  Inline registerForCarrierChanges
  Make mThread a local
  Introduce a flag for using the carrier service changed callbacks.
  Have DevSdkIgnoreRunner support @Parameterized parameters

Jean Chalard   authored and   Gerrit Code Review   commited 2023-09-29 06:46:08 +00:00
1d600f4300
Add NetworkStackModuleTest exclusion for ConnectivityCoverageTests in TEST_MAPPING.
testTetherZeroLengthDhcpPacket requires to install both Tethering
and NetworkStack modules, add NetworkStackModuleTest annotation for
ConnectivityCoverageTests running as presubmit to exclude the
testTetherZeroLengthDhcpPacket from presubmit.

Bug: 287798985
Test: TH
Change-Id: I2e21e2623b181e678189ca7758210be1b5409ae7

Xiao Ma   commited 2023-09-29 15:35:21 +09:00
432162d5de
Merge "Exclude testGetNeighborsQuery from NetworkStackCoverageTests." into main
Xiao Ma   authored and   Gerrit Code Review   commited 2023-09-29 05:42:16 +00:00
f45ec2858a
Merge "Add more necessary infra to CSTest" into main
Jean Chalard   authored and   Gerrit Code Review   commited 2023-09-29 03:50:45 +00:00
21599869f7
Exclude testGetNeighborsQuery from NetworkStackCoverageTests.
sepolicy gates RTM_GETNEIGH{TBL} with a new permission nlmsg_getneigh
and block access from untrusted_apps, but NetworkStackCoverageTests
uses the same UID with NetworkStack module, so it still has the
permission to send RTM_GETNEIGH(context: u:r:network_stack:s0<00>),
which causes the test always fails. Add the same assumeFalse check
for tests with network_stack context.

Bug: 283346574
Test: atest NetworkStackCoverageTests
Change-Id: Iaf652841bb9868783c924aa22fdf0c4f07e1e391

Xiao Ma   commited 2023-09-29 12:26:49 +09:00
998f6b0eda
Merge "reverse BpfMap & BpfMapRO inheritence to make sense" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-09-29 03:24:37 +00:00
d58042e0d4
Merge "Update the logic of isFeatureEnabled and isFeatureNotChickenedOut" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-09-29 03:05:55 +00:00
241e110c6c
reverse BpfMap & BpfMapRO inheritence to make sense
Bug: 235590615
Bug: 235907076
Bug: 286003437
Test: TreeHugger, m droid gpuservice_unittest libtimeinstate_test bpf_benchmark bpf_module_test libbpf_load_test && mma
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I020a898fe8b257040a100f146654d4a04b19f843

Maciej Żenczykowski   commited 2023-09-29 00:44:33 +00:00
7e2f53e762
Move the MULTI_SIM_ACTION receiver inline
This will be easier to read when this behavior is diverted
based on a flag

Test: FrameworksNetTests
Change-Id: Ifd7abd8ad82cb8307b1cd8535ac5fa82004404e6

Chalard Jean   commited 2023-09-28 21:37:32 +09:00
090b1f586b
Inline registerForCarrierChanges
This method is only called once in system ready and is better
inlined. This will also make followups clearer where they
start using callbacks to listen to service package updates
based on a flag.

Test: CarrierPrivilegeAuthenticatorTest
Change-Id: I39cab8ff1c71a8ba0db6d189d8a248013764b18e

Chalard Jean   commited 2023-09-28 21:37:32 +09:00
6af0b8714d
Make mThread a local
Small cleanup

Test: CarrierPrivilegeAuthenticatorTest
Change-Id: I6b3270d60d67c227bcb9f9a75a47abddd08bf474

Chalard Jean   commited 2023-09-28 21:37:32 +09:00
9a685267c2
Introduce a flag for using the carrier service changed callbacks.
Test: CarrierPrivilegeAuthenticatorTest
Change-Id: Ia28c6abca67866c1de953cb61953a0d2882cd7e2

Chalard Jean   commited 2023-09-28 21:37:32 +09:00
84dfa9f104
Have DevSdkIgnoreRunner support @Parameterized parameters
Test: aosp/2405723 uses this, TH is happy with existing tests
Change-Id: If47d7e239d8483716fb78a97bbc2da4e24731209

Chalard Jean   commited 2023-09-28 21:37:31 +09:00
a10ae005df
Merge "Revert "RateLimitTest: temporarily dump ConnectivityThread if setUp fails"" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-09-27 22:51:34 +00:00
dd3e7e0159
Merge "OWNERS: master -> main" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-09-27 19:31:13 +00:00
66f39a5667
OWNERS: master -> main
Change-Id: I7912bf91841a4260d0a1eec022a6a832b312321d

Maciej Żenczykowski   commited 2023-09-27 19:29:11 +00:00
9ec09ec315
OWNERS: master -> main
Change-Id: Iad7d1818d1959024d5fd1fc8810d2b7ce0f06e40

Maciej Żenczykowski   commited 2023-09-27 19:29:09 +00:00
a1ab4aaeb5
Revert "RateLimitTest: temporarily dump ConnectivityThread if setUp fails"
This reverts commit cbe1755826.

Reason for revert: we found the culprit for the flakiness and b/272147742 is fixed.

Change-Id: I672c42bb57184393588666b6196f3a316f8c99c7

Patrick Rohr   authored and   Maciej Żenczykowski   commited 2023-09-27 19:20:58 +00:00
479dbbd906
Merge "wear proxy behind portal" into main
Andriy Naborskyy   authored and   Gerrit Code Review   commited 2023-09-27 17:39:30 +00:00
6aec2583cd
Merge "Unregister NetworkCallback in NetworkStatsManagerTest" into main
Patrick Rohr   authored and   Gerrit Code Review   commited 2023-09-27 16:21:12 +00:00
8d44250440
Update the logic of isFeatureEnabled and isFeatureNotChickenedOut
If the flag value is unset or 0, isFeatureEnabled return false and
isFeatureNotChickenedOut return true.
If the flag value is -1 (force disable), both return false.
If the flag value is other values, both query the package version and
return `flagValue <= packageVersion`

Now the only difference is a default behavior when the flag is not set
or 0.
So isFeatureEnabled and isFeatureNotChickenedOut can use the same flag.

This CL also fixes the issue in rollback.
Before this CL, isFeatureNotChickenedOut did not check the module
version and could have a issue if there is a rollback.

Test: NetworkStaticLibsTests
Bug: 279108992
Change-Id: I12d6ebadff3aee7b7c614aca4eb0a34ef0db9857

Motomu Utsumi   commited 2023-09-27 17:30:01 +09:00
ed4e7ec954
Merge "cronet: Remove unused cronet_disabled api directory" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2023-09-27 07:42:45 +00:00
3f4bf87af6
wear proxy behind portal
Do not avoid captive portal on wear proxy network; keep network agent
after detecting portal.

Bug: 291112432
Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.ConnectivityServiceTest
Change-Id: I8f6669da62ebd76b6a46d2aec9b3ea563a08cb5e

Andriy Naborskyy   commited 2023-09-27 07:28:05 +00:00
d032dd42ea
Merge "Add @AppModeFull annotation to NsdManagerDownstreamTetheringTest" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2023-09-27 05:09:55 +00:00
b01d0721a2
Merge "Nat464Xlat: rely on netd events being called on handler thread." into main
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2023-09-27 02:01:58 +00:00
d196fab898
Unregister NetworkCallback in NetworkStatsManagerTest
NetworkStatsManagerTest issues NetworkRequests but does not release
them. In addition, it performs blocking operations inside the
onAvailable() callback that runs on the shared ConnectivityThread
impacting tests that run later.

Test: TH
Bug: 272147742
Change-Id: Ide2f5ba0b12752099d7665deaa9050463cd7ebee

Patrick Rohr   commited 2023-09-26 18:32:55 +00:00
f88fccde48
Merge "Park RemoteAuth Manager and Service" into main
Igor Zaslavsky   authored and   Gerrit Code Review   commited 2023-09-26 17:17:29 +00:00
f0afc53836
Nat464Xlat: rely on netd events being called on handler thread.
aosp/2724918 moved processing netd events for 464xlat to the
handler thread.

This CL makes 464xlat run the code that processes those events
inline. This simplifies the code and makes the ordering of events
more similar to what it was before.

Bug: 293965195
Fix: 302071735
Test: existing unit tests
Change-Id: I18b0d491aff94646b878a3d3488b5519fd42783c

Lorenzo Colitti   commited 2023-09-26 11:00:37 +00:00
3b817cbad3
Add @AppModeFull annotation to NsdManagerDownstreamTetheringTest
Because the WifiManager can not be obtained in instant mode, the test
should only runs in AppModeFull.

Bug: 300219769
Test: TH
Change-Id: If5049a68dce23aafa3c9b8a59bf9a759c9532541

Yuyang Huang   commited 2023-09-26 18:57:25 +09:00
9244912a3f
Merge "Fix testSetOemNetworkPreferenceForTestPref flake" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-09-26 08:43:15 +00:00
8454fb5fed
Merge "Add QUERY_ALL_PACKAGES to FrameworksNetTestsLib" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-09-26 07:28:01 +00:00
20cb93aa5d
Fix testSetOemNetworkPreferenceForTestPref flake
The issue seems to be that some other network may become
available or change capabilities before Lost happens, as
can be the case with real networks like in CTS.

Test: TH
Bug: 289879931
Change-Id: I849f3b7d99f5d5195a3bbd3c39720923597a51d9

Chalard Jean   commited 2023-09-26 14:51:05 +09:00
79adff3ae7
Merge "Fix a socket leak" into main
Jean Chalard   authored and   Gerrit Code Review   commited 2023-09-26 02:57:25 +00:00
3f48f42cb9
Merge changes I1731e65e,I2df84427 into main
* changes:
  Factorize CarrierPrivilegeAuthenticator constructors
  Change mCarrierServiceUid from int[] to SparseIntArray

Treehugger Robot   authored and   Gerrit Code Review   commited 2023-09-25 22:52:11 +00:00
f411c02294
Fix a socket leak
Test: manual :
      adb root
      adb shell lsof | grep system_ | grep IPv
      adb shell dumpsys connectivity --diag
      adb shell lsof | grep system_ | grep IPv
      Before the change : plenty of new open FDs
      After the change : no new FD
Bug: 297483305
Change-Id: I1c1fb8de44e50998e99af8b3aac3f77edce903e0

Chalard Jean   commited 2023-09-25 20:37:03 +09:00
90050b2528
Factorize CarrierPrivilegeAuthenticator constructors
Test: FrameworksNetTests
Change-Id: I1731e65ef09cb32b51ac9cc7884a9737c19ecce9

Chalard Jean   commited 2023-09-25 19:05:05 +09:00
2186945466
Change mCarrierServiceUid from int[] to SparseIntArray
Because followup changes will stop using synchronous getters
for getting the service package UIDs, it will be a lot more
convenient if this array is automatically sized.

Test: FrameworksNetTests
Bug: 236669534
Change-Id: I2df8442727b5f17bd2d4e55a8795dc9210beb74b

Chalard Jean   commited 2023-09-25 19:05:05 +09:00
dfee6bec1a
Add more necessary infra to CSTest
- Ability to mock enabled changes, which is necessary for
  requestNetwork
- Ability to disconnect an agent

Test: in aosp/2761506
Change-Id: If2701f1fff29453e74a4b388758c6ee3a16a5734

Chalard Jean   commited 2023-09-25 14:56:09 +09:00
073606fc8d
Merge changes Ic69fc75e,I6373d251 into main
* changes:
  Add ICMP type/code and udplite/sctp in Nettrace.
  Make BundleKey a distinct struct from PacketTrace.

Ryan Zuklie   authored and   Gerrit Code Review   commited 2023-09-22 19:38:59 +00:00
8a88d85145
Merge "use different log.h header file" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-09-22 04:11:47 +00:00
1b0f6fe058
Park RemoteAuth Manager and Service
Limit the amount of parked code built into Connectivity module

Test: built successfully.
Bug: 300522527
Change-Id: I87d7516011c469aa89fc7e67cf03c4ee8aa1bb9b

Igor Zaslavsky   commited 2023-09-22 04:09:02 +00:00
e336586353
Merge changes I8843ce7c,I90566998 into main
* changes:
  Block the package updater while CTS are running
  Add a command to block networking for an app

Jean Chalard   authored and   Gerrit Code Review   commited 2023-09-22 02:26:19 +00:00
487191dbe6
Merge "[remoteauth] Clean up unused deps" into main
Jin Chen   authored and   Gerrit Code Review   commited 2023-09-22 02:18:36 +00:00
10f59a248c
Add ICMP type/code and udplite/sctp in Nettrace.
This adds support for additional protocols and also provides more clear
semantics of protocol specific fields, such as only including tcpFlags
when the protocol is IPPROTO_TCP.

Test: atest libnetworkstats_test & flash and trace
Change-Id: Ic69fc75e85ebf8734027c942a253af4972ad14d8

Ryan Zuklie   commited 2023-09-21 15:14:07 -07:00
e72b48416c
Make BundleKey a distinct struct from PacketTrace.
This change refactors BundleKey to be a separate struct. This allows
us to do the conversion (e.g. of sport/dport, or icmp fields in the
future) in the constructor and change types (use optionals) where it
is convenient to simplify the code.

This change also fixes a bunch of desigated initializer order warnings
in the test (fields should be declared in same order as defined).

Test: atest libnetworkstats_test
Change-Id: I6373d2512280e93c54395fde38dcff43705b449e

Ryan Zuklie   commited 2023-09-21 15:14:07 -07:00
1733d3e6be
use different log.h header file
Test: TreeHugger
Bug: 299653233
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1e5c7bfc86d2ad61c0bad3b5ef2add94b4ce1481

Maciej Żenczykowski   commited 2023-09-21 22:11:43 +00:00
601d9f8b65
Merge "[Refactor] Make uid owner match comparison logic into a function" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2023-09-21 10:21:52 +00:00
3897aaf7e9
Block the package updater while CTS are running
Test: manual
Bug: 284534251
Change-Id: I8843ce7c9e14cfe3f6f3439405d519587f2656ef

Chalard Jean   commited 2023-09-21 12:57:10 +09:00
3a6544fb1f
Add a command to block networking for an app
Test: Manual
Bug: 284534251
Change-Id: I90566998501c215de350965e3bffcd852d487bfe

Chalard Jean   commited 2023-09-21 12:57:08 +09:00
c8fefb36d8