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
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
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
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 Żenczykowskicommited 2024-06-02 22:28:35 +00:00
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
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
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 Żenczykowskicommited 2024-05-30 11:10:06 +00:00
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
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
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
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
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
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
Modified the sendPing() method in ApfIntegrationTest to allow setting
the payload size for flexibility in testing scenarios.
Test: TH
Change-Id: Ie87a1defc7589ae3ce2f6d9ac182f790d59d0b3b
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
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 Sikkaauthored and Gerrit Code Reviewcommited 2024-05-28 16:55:49 +00:00
This CL simplifies the code for validating the service by reducing a
level of indention.
Bug: 342954618
Change-Id: I8a239c3ea39560e4c2bc3b42e5be0a757a737fdd
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