Commit graph

103,614 commits

Message SHA1
BpfSyscallWrappers: remove mapRetrieve()
(spurious)

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

Maciej Żenczykowski   commited 2024-06-04 13:49:06 +00:00
dfef229781
Merge "Refresh time before connectivity tests" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-06-04 10:01:32 +00:00
8b8cf5d8d4
Merge changes If3dbe234,Ia1299759 into main
* changes:
  Dump current max entries and cache duration even if the flags change
  Check compat change flag for rate-limit cache

Junyu Lai   authored and   Gerrit Code Review   commited 2024-06-04 07:07:21 +00:00
67b67908a1
Refresh time before connectivity tests
After checking that networking is available, force a time sync.

This should avoid flakes where time changes during tests, for example
for tests using test settings like test_url_expiration_time in
NetworkMonitor.

Fixes: 342489019
Test: atest
Change-Id: I0c07440679bc14dcf5cddf55fb1391d3ed76feba

Remi NGUYEN VAN   commited 2024-06-04 16:06:19 +09:00
4ae1387146
Dump current max entries and cache duration even if the flags change
Test: TH
Fix: 339154631
Change-Id: If3dbe2344a026bb8170c65c2d156e5cb541b7a28

Junyu Lai   commited 2024-06-04 07:04:52 +00:00
11681f9162
Add ICMPv6 NS Souce Link Layer Option Length constant
Bug: 337807604
Test: TH
Change-Id: Iaef51d344fa727e43edde307b0f07cd31bea7701

Jimi Chen   commited 2024-06-04 06:51:18 +00:00
9c87172ad2
Merge changes from topic "2nd-landing-fix" into main
* changes:
  Fix testUpdateDeviceStatsPermission for TrafficStats cache mechanism
  Revert "Temporary disable rate-limit cache for TrafficStats"

Junyu Lai   authored and   Gerrit Code Review   commited 2024-06-04 05:28:47 +00:00
b82cabf8c9
Increase cell connection timeout to 2min
With some SIM cards getting a mobile data connection can take more than
30s (the default callback). Increase the test timeout to 2min.

Test: atest

Change-Id: Ic79221e937c8f6b8d212c9a1448287e130b667dc

Remi NGUYEN VAN   commited 2024-06-04 02:12:10 +00:00
0594d0399f
Merge "move V+ kernel/arch/bitness checks from BpfHandler to NetBpfLoad" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-06-03 07:22:49 +00:00
becb4c1c98
Merge "[Thread] enforce a timeout for waiting FTDs' output in integration tests" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-06-03 04:58:36 +00:00
37f70df140
[Thread] enforce a timeout for waiting FTDs' output in integration tests
When developing and debugging a test case, sometimes the FTD may stuck and will not give any output. In such a case the test may time out after 1 minute (or longer). We should enforce a timeout (e.g. 5 seconds) when reading from its stdout so we don't have to wait for it that long.


Bug: 343885515
Test: CI

Change-Id: I766c172364106f19500032459de12ed6de38fb05

Handa Wang   commited 2024-06-03 03:04:56 +00:00
eca707dda4
move V+ kernel/arch/bitness checks from BpfHandler to NetBpfLoad
Mainline netbpfload is mandatory on V+, so it matters little
whether we perform the checks in it, or in BpfHandler
(which runs as part of netd startup via libnetd_updatable.so),
and this avoids the need to reimplement isTV() opt-out.

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

Maciej Żenczykowski   commited 2024-06-02 22:28:35 +00:00
c834fdb760
Merge "Explicitly log portal detections" into main
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2024-05-31 11:27:11 +00:00
d1c52e3eb0
Merge changes Ib0df2810,Ic8dcb7e5 into main
* changes:
  Refactor tethering utility methods
  Fix NetworkCallback#onAvailable does not match SSID

Junyu Lai   authored and   Gerrit Code Review   commited 2024-05-31 08:41:06 +00:00
8a14358e16
Merge "Clatd: add dump raw BPF map support" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-05-31 08:11:44 +00:00
3812c394ba
Merge "Treat APFv3 as APFv4 with not fully working counters." into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-05-31 07:48:45 +00:00
0f6a857cf5
Clatd: add dump raw BPF map support
Add dump raw BPF map command to connectivity service. The result will
be encoded as base64 strings. This is a preparation for Clatd's tests.

Usage:
    dumpsys connectivity {clatEgress4RawBpfMap|clatIngress6RawBpfMap}

Bug: 285124667
Test: test with MtsEthernetTetheringTest#testTetherClatBpfOffloadUdp
      which will be uploaded in a separated CL
Change-Id: I02c8efadb1c4b861d9bf6168667816b13412dc75

KH Shi   commited 2024-05-31 06:34:41 +00:00
855712aa55
Treat APFv3 as APFv4 with not fully working counters.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8908e131955c028ac3aabb9436daf60ca5efcfb3

Maciej Żenczykowski   authored and   Yuyang Huang   commited 2024-05-31 01:14:44 +00:00
288aca0a23
Merge "Add proposed trendy teams for CTS modules" into main
Yihan Dong   authored and   Gerrit Code Review   commited 2024-05-31 00:20:28 +00:00
a7e15822bc
Merge "Move dumpRawMap to BpfDump" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-05-30 14:44:56 +00:00
45e1328360
Merge "Fix fd leak in clatStart() by closing in finally block" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2024-05-30 13:42:18 +00:00
b94ab30c1e
Merge "NetBpfLoad: TV - don't abort boot on unsupported kernel/arch/bitness" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-05-30 12:33:22 +00:00
d9c058f541
Fix fd leak in clatStart() by closing in finally block
Resolved LeakedClosableViolation in ClatCoordinator.clatStart() by
ensuring file descriptors (FDs) are closed in a finally block after
being passed to clatd.

Bug: 343563720
Test: TH
Change-Id: I9da89c0a1c12c952bf829126215781a580ad0bf0

Yuyang Huang   commited 2024-05-30 21:20:20 +09:00
d55e9cc560
NetBpfLoad: TV - don't abort boot on unsupported kernel/arch/bitness
Android TV OEMs & vendors are more interested in keeping costs down
rather than keeping networking functional.

Considering this probably mostly affects more advanced networking,
like VPNs and/or network statistics, it may be an acceptable trade off.

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

Maciej Żenczykowski   commited 2024-05-30 11:10:06 +00:00
68eab8928b
Merge "Report isKnownService in discovery stop metrics" into main
Paul Hu   authored and   Gerrit Code Review   commited 2024-05-30 09:01:33 +00:00
4171348894
Refactor tethering utility methods
This is no-op refactoring to extract tethering utility methods
to a standalone file, and split setup and clean up process
to allow new test cases can perform custom verifications.

Also, this CL makes connectToWifi returns NetworkHandle for later use.

Test: m connectivity_multi_devices_snippet && \
      atest CtsConnectivityMultiDevicesTestCases:ConnectivityMultiDevicesTest
Bug: 335368434
Change-Id: Ib0df28107fd09b573db1e51ff624d0f027bda23d

Junyu Lai   commited 2024-05-30 16:11:12 +08:00
cea928f188
Merge "Move NetHttpCoverageTest to external/cronet TEST_MAPPING" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-05-30 07:00:02 +00:00
958766845e
Add proposed trendy teams for CTS modules
Change-Id: Ic1d352f6a64acbda759aca6788eb2cb74da3dda1
Test: build locally
Bug: 341598672

Yihan Dong   commited 2024-05-30 06:16:35 +00:00
5f857b0220
Merge "Adjust test payload sizes based on API level for APF ping tests" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2024-05-30 05:27:36 +00:00
d12620e034
Merge "Fix ThreadFeatureCheckerRule on U- devices" into main
Kangping Dong   authored and   Gerrit Code Review   commited 2024-05-30 04:53:24 +00:00
7ab992b3c6
Fix ThreadFeatureCheckerRule on U- devices
On U- devices, the ThreadNetworkManager class is not available, so we need to use the service name instead. And we should make sure Thread test cases runs on only devices that does has Thread feature supported.

Change-Id: Idd356062277a5180933789c7d471c70e2689350d

Kangping Dong   commited 2024-05-30 03:36:45 +00:00
953a161f1a
Merge "Run testFilterAgeIncreasesBetweenPacketstest() when VSR API is higher" into main
Yuyang Huang   authored and   Gerrit Code Review   commited 2024-05-30 03:16:23 +00:00
421aefadb9
Merge "Add configurable payload size to sendPing() in ApfIntegrationTest" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-05-30 03:15:42 +00:00
6f0898e41b
Fix NetworkCallback#onAvailable does not match SSID
The test checks whether the client is connected to the hotspot
by register network callback with specified hotspot SSID in the
WifiNetworkSpecifier. However, SSID is not matched when
WifiNetworkAgentSpecifier#canBeSatisfiedBy due to privacy
consideraions.

Thus, manually match SSID is needed to make sure the client
is connected to the hotspot to ensure follow-up tests
can be performed correctly.

Test: m connectivity_multi_devices_snippet && \
      atest CtsConnectivityMultiDevicesTestCases:ConnectivityMultiDevicesTest \
      --rerun-until-failure 100
Bug: 335368434
Change-Id: Ic8dcb7e5c1cf346e4b149367048b6e914894b6d4

Junyu Lai   commited 2024-05-29 19:58:21 +08:00
b99caadfab
Merge "Enhance APF read/write tests error message" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-05-29 08:38:19 +00:00
88a83d413e
Report isKnownService in discovery stop metrics
In the reportServiceDiscoveryStop function, the isKnownService
value is not set. This means that it is not possible to track
how many discovery queries are answered from cache. To track
this information, add the isKnownService to
reportServiceDiscoveryStop.

Fix: 339738663
Test: atest FrameworksNetTests NsdManagerTest
Change-Id: Idf9948826d3b8ffff9bce4f224543af87c653d80

Paul Hu   commited 2024-05-29 08:23:37 +00:00
b771670b5d
Merge "[mdns] simplify the validation check" into main
Handa Wang   authored and   Gerrit Code Review   commited 2024-05-29 08:02:23 +00:00
4ddb2720fc
Run testFilterAgeIncreasesBetweenPacketstest() when VSR API is higher
Restricted the execution of testFilterAgeIncreasesBetweenPackets() to
devices with VSR API level 34 or higher.  VSR-14 mandates APF activation
under specific conditions screen off && (idle Wi-Fi | low traffic).

Test: TH
Change-Id: I480c0d0422fa39a580dbadd31a377986ce37c25f

Yuyang Huang   commited 2024-05-29 14:27:10 +09:00
c943e37f13
Adjust test payload sizes based on API level for APF ping tests
Modified testPrefilledMemorySlotsV4() and testDropPingReply() to use a
payload size of 4 for devices with first API level 34 and below, and a
payload size 68 for devices with first API level 35 and above.

Test: TH
Change-Id: Iee6981de164d1fbcf2788e34723149e5e8d46c56

Yuyang Huang   commited 2024-05-29 14:17:31 +09:00
643d58732f
Add configurable payload size to sendPing() in ApfIntegrationTest
Modified the sendPing() method in ApfIntegrationTest to allow setting
the payload size for flexibility in testing scenarios.

Test: TH
Change-Id: Ie87a1defc7589ae3ce2f6d9ac182f790d59d0b3b

Yuyang Huang   commited 2024-05-29 14:17:27 +09:00
9e095e02f4
Enhance APF read/write tests error message
Improved the error message to explicitly state that firmware declaring
APFv4 support must pass read/write tests, otherwise it should only
declare it support APFv3(if counter is partially supported) or APFv2.

Test: TH
Change-Id: Ia5605811481b8a3359d967cda45dda86701167ea

Yuyang Huang   commited 2024-05-29 14:14:39 +09:00
d1d70cc365
Merge "Bluetooth: Use enableRule instead of BTAdapterUtils" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-05-29 02:36:26 +00:00
0948896898
Merge "Update VpnTest#testDefault to check other uid blocked status" into main
Motomu Utsumi   authored and   Gerrit Code Review   commited 2024-05-29 02:03:01 +00:00
055829986b
Merge "Add test to ensure filter age increases" into main
Patrick Rohr   authored and   Gerrit Code Review   commited 2024-05-28 21:05:06 +00:00
0895fa8a1c
Merge "Revert "NetBpfLoad: slow down V boot on unsupported kernels"" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-05-28 18:28:54 +00:00
d637e21917
Revert "NetBpfLoad: slow down V boot on unsupported kernels"
This reverts commit 75caacdd10.

Reason for revert: The policy is already checked in VTS. It seems delaying the boot is out-of-scope for NetBpfLoad.

Change-Id: I12cec43dc2efb90ae35ccda7203317d198054d0e

Rishi Sikka   authored and   Gerrit Code Review   commited 2024-05-28 16:55:49 +00:00
9cfccad9b7
[mdns] simplify the validation check
This CL simplifies the code for validating the service by reducing a
level of indention.

Bug: 342954618

Change-Id: I8a239c3ea39560e4c2bc3b42e5be0a757a737fdd

Handa Wang   commited 2024-05-28 10:58:23 +00:00
bbd732596e
Merge "Handle enabledState change in onStateChanged()." into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-05-28 10:50:04 +00:00
5b93b601ee
Update VpnTest#testDefault to check other uid blocked status
On V+, ConnectivityService generates blockedReasons based on bpf map
contents even if the uid does not exist on device.
So if allowlist chain (e.g. background chain) is enabled, network access
from non existing uid is considered blocked.

Test: VpnTest#testDefault
Bug: 342557183
Change-Id: I7776c1ea0d546e53a3495d4db6d42c573b6d1f7f

Motomu Utsumi   commited 2024-05-28 19:15:13 +09:00
5d96fada30
Merge "Modify the test boundary for read/write test" into main
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2024-05-28 08:40:26 +00:00
7c03c95b83