Commit graph

107,628 commits

Message SHA1
Add WRITE_ALLOWLISTED_DEVICE_CONFIG perm when modifying DeviceConfig
Android 16 introduces restrictions on the DeviceConfig flags that
can be modified by the shell user by removing the WRITE_DEVICE_CONFIG
permission from this user and replacing it with the
WRITE_ALLOWLISTED_DEVICE_CONFIG permission; with this permission,
only those flags that have been allowlisted can be modified. This
commit adds the ALLOWLISTED permission to any test that explicitly
adopts the shell permission identity with the WRITE_DEVICE_CONFIG
permission; the WRITE_DEVICE_CONFIG permission is not removed to
ensure tests do not break when run on previous platform releases
without the ALLOWLISTED permission.

Bug: 364083026
Flag: TEST_ONLY
Test: Manually ran all modified tests
Change-Id: Iad68063550f99f3dc78ac2f0483dad98a8a93f2e

Michael Groover   commited 2024-11-18 23:28:24 -06:00
a3882a238b
Merge "Add IGMP network stack constants" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-11-18 23:32:00 +00:00
b69182f217
Merge "Set llndk.moved_to_apex explicitly" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-11-18 20:12:33 +00:00
6c4d64a513
Merge "Add IGMP type offset definition" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-11-18 20:10:50 +00:00
34e969b5c9
Merge "Revert "Set diagnostics log-data-type to CONNDIAG"" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-18 03:16:23 +00:00
0006d2ee51
Merge "Refactor query delay calculations" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-18 01:43:01 +00:00
3e9d905bb6
Revert "Set diagnostics log-data-type to CONNDIAG"
This reverts commit 5714031dcc.

Reason for revert: breaks MCTS as tests are run with older tradefed that does not have the option: b/378710131

This can be rolled forward after cherry-picking the tradefed change to older branches.

Change-Id: Ib9b4fe3b1c5393cd6e802eee4899457497d79ca7

Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2024-11-18 00:57:58 +00:00
27fb206ded
Merge "[Thread] Add a NAT64 test case after switching to another infra network" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-16 08:07:12 +00:00
7c064a8a27
Add IGMP network stack constants
Test: TH
Change-Id: I873bc9eb46c14f5c1fe73174abe668d83b94a74a

Jimi Chen   commited 2024-11-14 07:22:33 +00:00
abaf3db53c
Add IGMP type offset definition
Test: TH
Change-Id: Ia81dd5a359b95bc68aa48d30fda08fc69608fcdb

Jimi Chen   commited 2024-11-14 01:04:19 +00:00
32691a94c4
Set llndk.moved_to_apex explicitly
Set llndk.moved_to_apex on libcom.android.tethering.connectivity_native
to simplify the apex logic in Soong.

Bug: 372543712
Test: no change to make_vars-${TARGET_PRODUCT}.mk
Change-Id: I664bf59b0041ea5ddc746c77918cbfbe74473bac

Colin Cross   commited 2024-11-13 16:09:52 -08:00
4078a4064b
Merge "Delete unused flag" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-13 21:12:11 +00:00
9410d5678f
Merge "Make newly created CT directories executable" into main
Bessie Jiang   authored and   Gerrit Code Review   commited 2024-11-13 19:31:30 +00:00
b9e245e24a
Merge "Add new flag for Tethering w/ SoftApConfig" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-13 18:18:49 +00:00
9d8d167f0f
Delete unused flag
This flag is unused after the previous commit.

Test: TH
Change-Id: Ic6b5378f503b822d5bdf9a94cf328ffef5e3a5b8

Patrick Rohr   commited 2024-11-13 17:21:58 +00:00
2580051834
Add new flag for Tethering w/ SoftApConfig
Old flag gantry flow was disabled due to being out of sync
(b/362407371). This change adds a new version of the same flag to
kickstart a new gantry flow.

Flag: com.android.net.flags.tethering_with_soft_ap_config

Bug: 216524590
Test: build
Change-Id: I50701582852c2077e7807ab2685e390f112fd029

Lorenzo Colitti   commited 2024-11-13 17:19:11 +00:00
172fe79552
Make newly created CT directories executable
Directories treat the executable bit differently than files, and need it
to be set in order for the files within said directories to be
accessible. Without making the CT directories executable, the log list
file is not accessible. See
https://www.redhat.com/en/blog/linux-file-permissions-explained for more
details.

Test: atest NetworkSecurityUnitTests (also manually)
Bug: 319829948
Change-Id: I03c172e93dc3ecb50f69297ea47b2fdeb860048b

Bessie Jiang   commited 2024-11-13 16:17:26 +00:00
dfed8dc100
Merge "Log CT log list download failures" into main
Sandro Montanari   authored and   Gerrit Code Review   commited 2024-11-13 11:12:10 +00:00
ddf3636296
Merge "bpf: Ringbuf: Ensure we acquire load the length for the ring buf entry" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-13 09:12:27 +00:00
3d2a3c5eb4
Merge "[Thread] introduce TestTunNetworkUtils and use it in existing test cases" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-11-13 05:43:32 +00:00
7175f59956
[Thread] Add a NAT64 test case after switching to another infra network
Bug: 377618622
Change-Id: I699a218a3bb18582406654381cd31c26675f3c77

Handa Wang   commited 2024-11-13 05:20:03 +00:00
26a68af724
[Thread] introduce TestTunNetworkUtils and use it in existing test cases
TestTunNetworkUtils is a centralized place to control the test TUN networks used by integration test. With this we can safely tear down all test networks in `teardown()` instead of tearing down the newly created network in `finally` clause.

Bug: 377640059
Change-Id: I57b34bb2644bd6a5bb73ed1573932f35de657c8f

Handa Wang   commited 2024-11-13 04:29:10 +00:00
ebd31b8a6a
bpf: Ringbuf: Ensure we acquire load the length for the ring buf entry
The kernel updates the length with xchg() which does a memory barrier,
on the kernel side when the data is actually committed to the ring
buffer [1].

On the user space side the volatile is not sufficient to prevent the
data read from being reordered  before the load of length.


[1]a20971c187/kernel/bpf/ringbuf.c (L484)

Bug: 374722456
Bug: 368624834
Bug: 376536942
Change-Id: I75eee3deee2afce83c1b760e6df383375f926ebb
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>

Kalesh Singh   commited 2024-11-12 20:47:47 +00:00
717b44749a
Merge changes I2388220a,I5f282160 into main
* changes:
  Add a test for delayed teardown with unregisterAfterReplacement.
  Fix system crash when netd return error

Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-12 18:47:07 +00:00
f45f40717b
Add a test for delayed teardown with unregisterAfterReplacement.
Bug: 363854848
Test: test-only change
Change-Id: I2388220a97c50a8a39920c6354ec30c4936f045d

Lorenzo Colitti   commited 2024-11-12 15:34:00 +00:00
feeff37fca
Log CT log list download failures
This CL adds a DownloadStatus class inside the DownloadHelper. The class
acts as a thin wrapper around the status and reason Ids returned by the
DownloadManager, with some utility methods to help with the
interpretation of the download status.

Bug: 319829948
Test: atest NetworkSecurityUnitTests
Change-Id: I111388ee37c09e30c02bb9bc9b3d65273961b91d

Sandro Montanari   commited 2024-11-12 11:13:02 +00:00
478ba513aa
Merge "remove useless variable" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-11-12 10:28:52 +00:00
4205696aaf
Merge "Remove the VisibleForTesting annotation." into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-11 16:45:40 +00:00
9dbe69420d
Remove the VisibleForTesting annotation.
The MdnsRecord related classes are intended to be accessed from
the non-testing class MndsUtils. Therefore, remove the
unnecessary VisibleForTesting annotations from these classes.

Fix: 376587954
Test: atest ConnectivityCoverageTests NsdManagerTest
Change-Id: Ie24fd752a8ee8f007ac725052cf533eb161dffe7

Paul Hu   commited 2024-11-11 09:24:58 +00:00
5f71222f2b
[automerger skipped] Merge "Fix for CtsNetTestCasesUpdateStatsPermission" into android15-tests-dev am: b3d8081f76 -s ours
am skip reason: Merged-In I00111bf5bd2ea99bfff17177813d2814ea24894c with SHA-1 e7bbdcba2e is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3343041

Change-Id: I7b9b21eb9fb099d7aa2b5a33b432acb71d49ff6c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Treehugger Robot   authored and   Automerger Merge Worker   commited 2024-11-09 00:53:53 +00:00
163daddacb
[automerger skipped] Fix for CtsNetTestCasesUpdateStatsPermission am: 26fc9a31e3 -s ours
am skip reason: Merged-In I00111bf5bd2ea99bfff17177813d2814ea24894c with SHA-1 e7bbdcba2e is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3343041

Change-Id: I55d7134dac75b0df452f3d3ea62eca49cac0508e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Mayank Garg   authored and   Automerger Merge Worker   commited 2024-11-09 00:53:50 +00:00
ec2f0486e4
Merge "Fix for CtsNetTestCasesUpdateStatsPermission" into android15-tests-dev
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-09 00:31:56 +00:00
b3d8081f76
Refactor tether state change callback/broadcast for redactions
Refactor tether state change callback/broadcast to allow for redactions
based on the callback cookie of the recipient. This CL is a no-op and
will be used in a future CL to redact the SoftApConfiguration in
TetheringInterface.

Bug: 216524590
Test: atest TetheringTest CtsTetheringTests
Change-Id: I3684929e6ba832f4da353d48137967739ca558d6

Quang Anh Luong   authored and   Quang Luong   commited 2024-11-08 05:08:43 +00:00
8a3f2e0460
Merge "Remove mcts tags since the net-tests-utils-host-common is host_required by other CTS cases" into android15-tests-dev am: 54123391a1
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3342613

Change-Id: I4495e7dfc05ca5ff20e6fddd137aaa5135558ea2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Tongbo Liu   authored and   Automerger Merge Worker   commited 2024-11-08 03:43:15 +00:00
19e2806f88
Merge "Remove mcts tags since the net-tests-utils-host-common is host_required by other CTS cases" into android15-tests-dev
Tongbo Liu   authored and   Gerrit Code Review   commited 2024-11-08 03:28:42 +00:00
54123391a1
Merge changes from topic "fixTetheringRevert" into main
* changes:
  Validate packageName with AppOpsManager#checkPackage
  Revert^2 "Add UID and package name to TetheringRequest"

Quang Luong   authored and   Gerrit Code Review   commited 2024-11-08 02:31:58 +00:00
5cd7166523
Validate packageName with AppOpsManager#checkPackage
Change the permission check for tethering to checkPackage. This avoids
having to create context as another user which is not supported when
running the networkstack from secondary user.

Bug: 375535923
Bug: 216524590
Test: atest TetheringManagerTest TetheringServiceTest
Change-Id: Ibc3abe9ec2eab5ec976c6a9cbc08e1552203ee5d

Oscar Shu   authored and   Quang Luong   commited 2024-11-08 02:31:46 +00:00
5f9339d6a9
Enable secondary_user_on_secondary_display for CtsNetTestCasesMaxTargetSdk33 am: 1ebe54b8d4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3341060

Change-Id: Iab1aa43781bf4258416d4e24e38b7f194c39ceeb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Yabin Huang   authored and   Automerger Merge Worker   commited 2024-11-07 22:09:30 +00:00
bf3f11cf7f
Fix for CtsNetTestCasesUpdateStatsPermission
The CtsNetTestCasesUpdateStatsPermission apk was missing ConnectivityTestPreparer apk.

Flag: EXEMPT test only

Bug: 364634490
Test: atest CtsNetTestCasesUpdateStatsPermission
Test: atest --user-type secondary_user_on_Secondary_display CtsNetTestCasesUpdateStatsPermission
Change-Id: I00111bf5bd2ea99bfff17177813d2814ea24894c
Merged-In: I00111bf5bd2ea99bfff17177813d2814ea24894c
(cherry picked from commit e7bbdcba2e)

Mayank Garg   commited 2024-11-07 18:51:10 +00:00
26fc9a31e3
Merge "Fix for CtsNetTestCasesUpdateStatsPermission" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-07 18:16:28 +00:00
117edc6a77
Remove mcts tags since the net-tests-utils-host-common is host_required by other CTS cases
Change-Id: Ice129f55b58f246d01eae63f555677e992fad177

Tongbo Liu   commited 2024-11-07 12:26:49 +00:00
5801f1644a
[Thread] avoid re-setting the infra link state when the state doesn't change
In the situation where infra state changes very frequently, it may cause the border routing to frequently restart.

Bug: 377821980
Test: atest ThreadNetworkIntegrationTests

Change-Id: Id2862b0db7e01f89da20c56c4ad2f0086d4b6a98

Handa Wang   commited 2024-11-07 08:13:03 +00:00
0435210627
Merge "[Thread] add integration tests for aosp/3334156" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-07 02:35:16 +00:00
2ec7bbc491
Enable secondary_user_on_secondary_display for CtsNetTestCasesMaxTargetSdk33
secondary_user_on_secondary_display is for background users that have
access to UI on assigned displays (a.k.a. visible background users) on
devices that have config_multiuserVisibleBackgroundUsers enabled.
The main use case is Automotive's multi-display Whole Cabin experience
where passengers (modeled as visible background users) can interact
with the display in front of them concurrently with the driver
(modeled as the the current user) interacting with driver's display.

The AndroidTest.xml  file is shared by several modules, including
CtsNetTestCasesMaxTargetSdk33. Now all modules can pass now.

Fixes: 365184699
Test: atest CtsNetTestCasesMaxTargetSdk33
Test: atest --user-type secondary_user CtsNetTestCasesMaxTargetSdk33
Test: atest --user-type secondary_user_on_secondary_display CtsNetTestCasesMaxTargetSdk33
Flag: TEST_ONLY

Change-Id: I905646aca1a3d3ed2a80bbe3a8c67ec0139e7562

Yabin Huang   commited 2024-11-07 01:36:08 +00:00
1ebe54b8d4
Fix for CtsNetTestCasesUpdateStatsPermission
The CtsNetTestCasesUpdateStatsPermission apk was missing ConnectivityTestPreparer apk.

Flag: EXEMPT test only

Bug: 364634490
Test: atest CtsNetTestCasesUpdateStatsPermission
Test: atest --user-type secondary_user_on_Secondary_display CtsNetTestCasesUpdateStatsPermission
Change-Id: I00111bf5bd2ea99bfff17177813d2814ea24894c

Mayank Garg   commited 2024-11-06 16:50:54 +00:00
e7bbdcba2e
Merge "Drop the redundant type and caller uid checks for TrafficStats" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-06 08:58:27 +00:00
6258c4482f
[Thread] add integration tests for aosp/3334156
Bug: 374037595
Change-Id: I1a380067681297c6047d9b0b772c873ecd110754

Kangping Dong   commited 2024-11-06 16:35:28 +08:00
3b6bb1ba4a
Merge "[Thread] add private API ThreadNetworkSpecifier" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-11-06 07:01:55 +00:00
594a9a8cfa
Merge "Remove framework-connectivity-shared-srcs from net-utils-all-srcs" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-11-06 05:41:48 +00:00
373874180b
Merge "Enable secondary_user_on_secondary_display for CtsNetTestCasesInternetPermission" into android15-tests-dev am: 9bf459028c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/3335456

Change-Id: Ia06123d19403f8bed812c576142d72ea674ce180
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>

Treehugger Robot   authored and   Automerger Merge Worker   commited 2024-11-06 05:29:05 +00:00
abc0345426