Commit graph

103,159 commits

Message SHA1
Merge "Remove extra handler#post inside setIncludeTestInterfaces" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-26 20:44:23 +00:00
90d53fa65e
Remove extra handler#post inside setIncludeTestInterfaces
This was (mistakenly?) added in aosp/1267639 patchset 2; however, there
does not seem to be any apparent reason to post
trackAvailableInterfaces() to the back of the handler thread. All
operations that precede trackAvailableInterfaces() are synchronous.

Test: atest EthernetManagerTest
Change-Id: Ic8e888ce5d8909c4b7a00e26c54286c454ff3e75

Patrick Rohr   commited 2024-03-26 11:20:22 -07:00
2de7d8ea38
Merge "Fix the test flakiness." into main
Ying Xu   authored and   Gerrit Code Review   commited 2024-03-26 16:06:22 +00:00
561b534227
Merge "Fix isUidNetworkingBlocked for system uids" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-26 11:45:16 +00:00
dc267df555
Merge "Update THREAD_ENABLED key string in ThreadPersistentSettings" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-03-26 11:18:35 +00:00
f2832c79d6
Fix isUidNetworkingBlocked for system uids
Update isUidNetworkingBlocked to return false for system uids regardless
of firewall chain status since this is an actual behavior

Bug: 328732146
Test: TH
Change-Id: Ic4760b927f51a1229e9af09c79b5261f85fe89d1

Motomu Utsumi   commited 2024-03-26 19:16:54 +09:00
cb448f5c78
Merge "Introduce initial CTS test for APF functionality" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2024-03-26 09:26:36 +00:00
a84bfb9cab
Update THREAD_ENABLED key string in ThreadPersistentSettings
Updated from Thread_enabled to thread_enabled

Test: presubmit
Change-Id: If0296f4d4bdf37f4564ee6fabdeffffe9d3020dd

Yang Sun   commited 2024-03-26 17:13:32 +08:00
2d4f91d548
Merge "check the Thread required features before running ThreadNetworkControllerTest" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-03-26 07:22:58 +00:00
8c35a75525
Merge "NetBpfLoad: Get logs back" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-26 06:24:35 +00:00
4be4d646af
check the Thread required features before running ThreadNetworkControllerTest
This CL checks if the device supports Thread specific features before
running the test case ThreadNetworkControllerTest. If the device
doesn't support specific features, just skip the test case.

Bug: b/330879812
Test: atest ThreadNetworkIntegrationTests
Change-Id: I1452ab02cc62228102d4a140f39abf13b79542c7

Zhanglong Xia   commited 2024-03-26 13:20:24 +08:00
c1d4e1eea1
Merge "Make PrefixInformationOption struct constructor visible for testing." into main
Xiao Ma   authored and   Gerrit Code Review   commited 2024-03-26 02:49:46 +00:00
f74488eb37
NetBpfLoad: Get logs back
r.android.com/3005052 changed the user id of the bpfloader service to
system, which cut off its access to /dev/kmsg, resulting in its logs
silently being dropped. Give back its access to /dev/kmsg.

See //system/core/init/README.md:

file <path> <type>

Open a file path and pass its fd to the launched process. type must be "r", "w" or "rw". For native executables see libcutils android_get_control_file().

and //system/libbase/logging.cpp's OpenKmsg()

Test: boot sdk_phone64_x86_64, check logs
Change-Id: I65f00545400140983737f3ff92e2c912eebce1fd

Theodore Dubois   authored and   Maciej Żenczykowski   commited 2024-03-25 22:49:56 +00:00
6e8c1aa03d
Fix the test flakiness.
Bug: 326387894
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest
Change-Id: I2fdb0913dcb2f110a40c9bc7307e9fea19fcce4f

Ying Xu   commited 2024-03-25 11:43:45 -07:00
ab00a8e4c8
Introduce initial CTS test for APF functionality
Added CTS test cases verifying APF version, maximum length, and packet
format.

Test: TH
Change-Id: I3f6f453fc0b906a5e290ebe8649c66b8e62fffb2

Yuyang Huang   commited 2024-03-25 17:37:03 +09:00
c15663c782
Merge "[mdns] restart probing/announcing the services on host address removal" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-03-25 04:34:11 +00:00
1bd299524f
[mdns] restart probing/announcing the services on host address removal
When some of a custom host's addresses are removed, the services which
are using the custom host should be updated accordingly:
- For the services being probed, the probing should be restarted with
  the updated address records.
- For the services which already finished probing, they should be
  re-announced with the updated address records.

For example, here is a scenario where the fix is necessary:
1. Register a host (host1) with addresses (addresses1)
2. Register a service (service1) using the host1.
3. Unregister the host1.
4. Re-register the host1 with different addresses (addresses2).

Then the probing messages of the second registration of host1 may
conflict with the announcements of service1 (which containing addresses
records of the addresses1). This is an undesired conflict. Restarting
the announcement of service1 when updating the addresses of host1
can get rid of this conflict.

Bug: 327304356

Change-Id: Ie97b72f1482c69fb5f24eab3ce9ed8f7cea957ec

Handa Wang   commited 2024-03-24 14:06:32 +00:00
734de7a1d5
[mdns] support discovering and resolving services
Bug: 305866779
Test: atest ThreadNetworkIntegrationTests:android.net.thread.ServiceDiscoveryTest

Change-Id: I96ee5b835c90fa55136dbbde68d36bbf2044b420

Handa Wang   commited 2024-03-22 06:32:23 +00:00
abefbf0b9f
Merge "[Thread] fix ot-daemon state consistency issues" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-22 06:31:18 +00:00
3a9d363bdf
Merge "[Thread] fix access to mOtDaemon" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-03-22 05:16:01 +00:00
619c41c01c
Merge "[Thread] add system API setChannelMaxPowers" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-22 04:54:04 +00:00
6faae533f4
Merge "Put known answers to query packets" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-22 04:18:38 +00:00
248424dc69
[Thread] fix ot-daemon state consistency issues
1. the OtDaemonState in OtDaemonCallbackProxy class is not cleared when
   ot-daemon dies
2. register ot-daemon state callback within the IOtDaemon#initialize API
   to avoid missing state changes between initialize() and
registerStateCallback()

Bug: 330441708
Change-Id: Ice58566582b40a6d25627cf01dec93da61ad3596

Kangping Dong   commited 2024-03-22 10:58:24 +08:00
0d22aded3d
[Thread] fix access to mOtDaemon
When calling a ot-daemon API, getOtDaemon() should always be used.
Access mOtDaemon directly can crash because it will be reset to null
when ot-daemon dies.

Change-Id: Id9941497fd43b1d57aba4bace31be0fbd9439c9c

Kangping Dong   commited 2024-03-22 10:58:20 +08:00
530147f061
[Thread] add system API setChannelMaxPowers
The `setChannelMaxPowers` allows privilege app to set the max
power of each channel. It is going to be used for controlling the
output power of the Thread radio chip.

Bug: b/320594263
Test: atest ThreadNetworkUnitTests && atest CtsThreadNetworkTestCases

Change-Id: Ic47eccd6de2da0e6cdb8f21d5b4df156b1f11747

Zhanglong Xia   commited 2024-03-22 10:49:09 +08:00
62abecc9b5
Improve documentation of addEthernetStateListener
The existing documentation was not clear at all about how this API
behaves.

Test: TH
Change-Id: I408f32c1e7b6c910aaaa197b6774865e79a03579

Patrick Rohr   commited 2024-03-21 11:26:07 -07:00
e762554170
Merge "Use MdnsUtils helper methods to construct query packets" into main
Paul Hu   authored and   Gerrit Code Review   commited 2024-03-21 15:17:11 +00:00
c2f56d83c9
[Thread] add command to force stop ot-daemon
The Thread HAL supports only one client for a single Thread chip, so
ot-daemon needs to be force stopped in VTS tests because the testapp
needs to connect to the HAL service to perform tests.

Bug: 328538612
Change-Id: I5288e5747ab3957050d0e85c1ea684c6ead6c87d

Kangping Dong   commited 2024-03-21 19:02:39 +08:00
82599d3e21
Merge "Use connectivityHandler in CarrierPrivilegeAuthenticator" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2024-03-21 07:22:41 +00:00
98eb360c0d
Merge "Move isChainEnabled and getUidRule to BpfNetMapsUtils" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2024-03-21 06:33:17 +00:00
452796c323
Merge "Move isUidNetworkingBlocked to BpfNetMapsUtils" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2024-03-21 06:28:26 +00:00
b3a55ce385
Merge "[Thread] do not restart ot-daemon when Thread is disabled" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-03-21 03:16:49 +00:00
f98b0d23c6
[Thread] do not restart ot-daemon when Thread is disabled
Current implementation will auto-restart ot-daemon even when Thread
has been disabled by ThreadNetworkController#setEnabled(false). This
commit fixes this issue and also adds the "enable" / "disable" shell
command to ease testing.

Bug: 328538612
Change-Id: Icc9360ccf5d7daa6345def75d1860f046600b85b

Kangping Dong   commited 2024-03-20 23:49:53 +08:00
adb3c1ac62
Merge changes from topic "revert-3001326-revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA-OOMALUYYUV" into main
* changes:
  Revert "Revert "Revert "[Cronet] Disable one of setURLStreamHand..."
  Revert "Revert "Revert "cronet 121_0_6167_71: remove http_client..."

George Verhaegen   authored and   Gerrit Code Review   commited 2024-03-20 13:39:16 +00:00
4a18c1bc11
Revert "Revert "Revert "[Cronet] Disable one of setURLStreamHand..."
Revert submission 3001326-revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA

Reason for revert: Build breakage as b/330450460

Reverted changes: /q/submissionid:3001326-revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA

Change-Id: I9b835950cf92abb0d54cafc332cf310ceef5061a

Lisa (LeeWei) Liu   commited 2024-03-20 08:28:59 +00:00
e307e20d47
Revert "Revert "Revert "cronet 121_0_6167_71: remove http_client..."
Revert submission 3001326-revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA

Reason for revert: Build breakage as b/330450460

Reverted changes: /q/submissionid:3001326-revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA

Change-Id: I56e53cf907c9d24c90b588e97ef8a101fd5aa19c

Lisa (LeeWei) Liu   authored and   Gerrit Code Review   commited 2024-03-20 08:30:25 +00:00
e450572718
Merge "[Thread] make demoapp system_ext_specific" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-03-20 07:38:43 +00:00
b0ae620f0b
Merge changes from topic "revert-2998737-revert-2980591-cronet_121_0_6167_71-JBOUFGJXPX-ICXECJPUPA" into main
* changes:
  Revert "Revert "cronet 121_0_6167_71: remove http_client_logging..."
  Revert "Revert "[Cronet] Disable one of setURLStreamHandlerFacto..."

Chidera Olibie   authored and   Gerrit Code Review   commited 2024-03-20 04:19:06 +00:00
52dceb80bd
Merge "[EthernetTetheringTest] Don't run setupOnce() if Ethernet is not supported." into main
Weilun Du   authored and   Gerrit Code Review   commited 2024-03-20 03:57:27 +00:00
cf71e324f3
Merge "Correct the usage for running query task" into main
Paul Hu   authored and   Gerrit Code Review   commited 2024-03-20 01:32:53 +00:00
a404348bf3
Merge "NetBpfLoad: rework mainline bpf execution codepath" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-03-20 00:27:58 +00:00
83af4a36a8
Merge "[EthernetManagerTest] Skip the test if EthernetManager is null" into main
Weilun Du   authored and   Gerrit Code Review   commited 2024-03-19 22:47:07 +00:00
b21fec534a
Merge "NetBpfLoad: enable mainline on T+" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-19 22:16:32 +00:00
4293ce84b5
NetBpfLoad: rework mainline bpf execution codepath
(for now for better testing we don't make V special)

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

Maciej Żenczykowski   commited 2024-03-19 21:45:21 +00:00
732a14164f
NetBpfLoad: enable mainline on T+
Note:
   2 == BPFLOADER_S_VERSION
  19 == BPFLOADER_T_VERSION
  25 == BPFLOADER_OBJ_AT_VER_VERSION
  33 == BPFLOADER_IGNORED_ON_VERSION
  37 == BPFLOADER_U_VERSION [*]
  41 == BPFLOADER_V_VERSION [**]
and currently we have:
  42 == BPFLOADER_MAINLINE_VERSION
  43 == BPFLOADER_MAINLINE_T_VERSION
  44 == BPFLOADER_MAINLINE_U_VERSION
  45 == BPFLOADER_MAINLINE_V_VERSION

[*] udc-dev/udc-release are actually 38, as 37 was some earlier
    udc beta2 (2.1 ifirc), and beta3+ switched to 38

[**] 24Q{1,2}-release (ie. U QPR2+) are technically actually 41,
     but their platform bpfloader no longer even looks in /apex/com.android.tethering/etc/bpf/...
     so it doesn't really matter (although 24Q1's platform
     netbpfload still does, however that is obsoleted by
     this change)

Thus we need to (as minimum for NetBpfLoad):
  BPFLOADER_T_VERSION -> BPFLOADER_MAINLINE_T_VERSION
  BPFLOADER_IGNORED_ON_VERSION -> BPFLOADER_MAINLINE_U_VERSION
to cause these to load appropriately from mainline.

One would perhaps also expect (as minimum for NetBpfLoad):
  BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_MAINLINE_U_VERSION
but (as maximum for platform bpfloader):
  BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_MAINLINE_U_VERSION

However, since the goal is actually for those to load via mainline on T+,
(with the 'old' version of the .o's loading on S via platform bpfloader)
thus one actually needs (as minimum for NetBpfLoad):
  BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_MAINLINE_T_VERSION
and (as maximum for platform bpfloader):
  BPFLOADER_OBJ_AT_VERSION -> BPFLOADER_T_VERSION

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

Maciej Żenczykowski   commited 2024-03-19 21:33:55 +00:00
11141da623
[EthernetTetheringTest] Don't run setupOnce() if Ethernet is not
supported.

BUG: 323896172
Test: atest CtsTetheringTest

Change-Id: Ibb01d9783a480f0c4acc9385a04527b95ae15fbb
Signed-off-by: Weilun Du <wdu@google.com>

Weilun Du   commited 2024-03-19 21:24:46 +00:00
2881157a6d
[EthernetManagerTest] Skip the test if EthernetManager is null
On Emulator system image, EthernetManager is not supported and it will
cause test crash when the "!!" operator is in place. Therefore, we
should skip the test before the lazy evaluation.

BUG: 323896504

Change-Id: I0f6f7bbb8ff7394730b193cf3f4ab5d89e65fa96
Signed-off-by: Weilun Du <wdu@google.com>

Weilun Du   commited 2024-03-19 14:09:39 -04:00
1137ed88e2
Merge "clat bpf: add byte/packet counter" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-03-19 16:23:43 +00:00
d77b3c4af2
[Thread] make demoapp system_ext_specific
Vendor or product extra apps/files can't be added to the generic system
image. Like below error:

```
FAILED:
build/make/core/artifact_path_requirements.mk:31: warning:  vendor/google/products/cf_x86_64_phone.mk produces files inside build/make/target/product/generic_system.mks artifact path requirement. Consider adding this file to the system_ext or product partition instead. Confused? Ch
eck out go/artifact-error.
Offending entries:
system/etc/permissions/privapp-permissions-com.android.threadnetwork.demoapp.xml
system/priv-app/ThreadNetworkDemoApp/ThreadNetworkDemoApp.apk
```

Bug: 330097284
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4c39c8f63edfa55edbd84a8473887df17ffe52fd)
Merged-In: I1b3723c12da44d80555aa35a86b9bae722845cb3
Change-Id: I1b3723c12da44d80555aa35a86b9bae722845cb3

Kangping Dong   authored and   Android Build Cherrypicker Worker   commited 2024-03-19 12:44:43 +00:00
184b400f8f
Merge changes from topic "overlay-vendor-model-name" into main
* changes:
  [Thread] support customize meshcop txt via resourceoverlay
  [Thread] add resourceoverlay config for vendor and model name

Kangping Dong   authored and   Gerrit Code Review   commited 2024-03-19 12:21:23 +00:00
ab1945c790