setEthernetEnabled() is used as a synchronization mechanism, so don't
let it affect enabled state.
Test: TH
Flag: EXEMPT test
Bug: 10000001
Change-Id: Ib023b7f944a8a84435dcc546aced9b0eab96d364
R & V+ never needed this as there is no platform
loading of mainline bpf.
On T/U we've been loading via mainline NetBpfLoad
for the past year, so the struct sizes only actually
matter for S.
S switches to mainline NetBpfLoad in M-2025-05
(currently in small canary), at which point the
struct sizes stop mattering.
In M-2025-07 S/T/U still look at the 'min bpf loader'
section of the .o, but don't go any deeper.
In M-2025-08 we no longer ship any bpf .o
files that need to be parsed by platform
bpfloader (as they're in a different subdirectory
in the tethering apex they don't even look in).
Test: TreeHugger
Flag: EXEMPT test deletion
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I72b9ebcf4ea59e61cdfd8bb009ede13670e3421f
Maciej Żenczykowskicommited 2025-05-22 02:08:43 -07:00
This commit adjusts the APF enforcement logic to align with 25Q2 GMS-VSR
and GTVS requirements. APFv6 is currently applicable only to handheld
and tablet devices (GMS-VSR) and TV devices (GTVS). For Wear OS devices,
APF enforcement will commence with Wear OS 7; therefore, the APF
enforcement check is skipped for devices launched/upgraded on Wear OS in 25Q2.
Bug: 381819368
Test: TH
Flag: EXEMPT bugfix
Change-Id: I4224738d9658fb4f6b67e491e7cd7d78e9b48748
requestTetheredInterface() only returns a callback if an interface for
tethering is available. The previous code timed out after 500ms which
was not enough for some devices. Instead of increasing the timeout, this
change calls setEthernetEnabled() which triggers a callback as soon as
it was processed on the handler thread. Since this event is guaranteed
to be processed after requestTetheredInterface(), the subsequent
expectOnAvailable() does not have to wait at all.
Test: TH
Flag: EXEMPT test
Bug: 418151132
Change-Id: Iff119a8e425d4071bf63fe92815061c7eb36848a
This class doesn't actually serve a purpose, it only makes
TestableNetworkCallbck more complex.
Test: CtsNetTestCases ConnectivityCoverageTests
Flag: EXEMPT test-only
Change-Id: I39a598b82a3215384bdfe04980f4b280ab2c2716
Problem:
- SSLCertificateSocketFactory has a bug causing socket leaks in
certain exception scenarios.
- SSLCertificateSocketFactoryTest triggers this, leading to
leaked sockets during test runs.
- When run within CtsNetTestCases, the network traffic from these
leaked sockets interferes with
TrafficStatsTest#testTrafficStatsForLocalhost, which monitors
traffic by UID within that same suite.
- This interference causes TrafficStatsTest to be flaky.
Solution:
- Moving SSLCertificateSocketFactoryTest to a different suite
ensures its leaked socket traffic is no longer associated with
the same UID context monitored by TrafficStatsTest.
- This isolation prevents the test interference and resolves the
flakiness.
Flag: TEST_ONLY
Test: atest CtsLibcoreNetTestCases
Bug: 393471251
Change-Id: I1cc626ba281939999a7d6978668eefea8531ffec
This enables the proper packaging of the dependency along with the test module rather than maintaining a manual mapping the CI infrastructure. The new field introduced in Soong is the right field to properly declare a host side dependency for a device-test (b/262397555)
Test: presubmit
Bug: 413525819
Flag: TEST_ONLY
Change-Id: If103e32632e4312460d99abd2a5c5b00e877f8ac
tryTest{} catches and returns and must be ended with a cleanup{}
block to throw. That is why it's marked with @CheckReturnValue.
The IDE marks the entire block as a huge warning.
Ideally this should really be an error, but that flag only exists
in Kotlin 2.2 and above, which is not out of beta yet, so
add a TODO in the bp file
Test: NsdManagerDownstreamTetheringTest
Flag: EXEMPT test-only
Change-Id: I62a9d0a16926574eb286d45b61d4d5d2e8c870ab
This new field ensures that the dependence is properly packaged with the module.
(original context: b/262397555)
Test: presubmit
Bug: 413525819
Flag: TEST_ONLY
Change-Id: Ifca931a4ee7fa671f2316ae731b207404a8edd3d
AOSP code has never used this API, and metrics from production
show no usage either. Removing it will allow simplifying the
code.
This CL removes testRequestStaticIpLegacyTether because it makes
legacyTether a no-op and there is already a test for static IP
request right above it.
Bug: 408087033
Flag: EXEMPT dead code
Test: updated existing tests
Change-Id: Ib94ed0860ab57abfd9fc7bdfdc911f5ab57003ed
Lorenzo Colitticommited 2025-05-13 19:43:58 +09:00
This commit modifies ApfIntegrationTest to skip execution on automotive
devices. APF GMS-VSR requirements do not apply to automotive devices.
APF offer no power benefit automotive devices due to their almost
infinite battery power supply. This change aligns the test suite with
the platform's specific requirements.
Test: TH
Flag: EXEMPT bugfix
Change-Id: Iad43a122407fe438cab94f59ed8aba8d6080af02
This commit adds a check to enforce that reported APF versions are
either 0 (indicating no support) or one of the officially valid
versions: 2, 3, 4, 6000 or 6100. This ensures consistency and prevents
issues arising from device using unsupported APF versions.
Test: TH
Flag: EXEMPT bugfix
Change-Id: Icdefa89fae590ec78146df4cbd2c683b5d8258f7
This commit adjusts the APFv6 enforcement logic to align with 25Q2
GMS-VSR and GTVS requirements. APFv6 is currently applicable only to
handheld and tablet devices (GMS-VSR) and TV devices (GTVS). For Wear OS
devices, APFv6 enforcement is deferred until specific requirements are
officially incorporated; thus, the enforcement check is skipped.
Bug: 415732337
Test: TH
Flag: EXEMPT bugfix
Change-Id: I838a96f3f214d8e46895484f836ade2588a335db
Instead of building against hidden API, build against module API.
This does not build against test API as test API does not contain module
API stubs, and this test uses more module APIs than test APIs.
Building against stubs should make the build faster (no need to build
all of framework.jar), and is desirable in CTS to avoid depending on
methods that may change over time or be modified by OEMs.
Test: atest
Flag: TEST_ONLY
Bug: 410435307
Change-Id: I2ac80daa144416cab5477843ecf32041fe0882c5
Inline the last remaining constants, and add a workaround for test APIs
that are missing in module API stubs.
While inlining the constants and reflection usage is far from ideal,
this is effectively what the tests are doing today, and it allows
preventing further usage of hidden API in the tests by making them build
against API stubs (in subsequent change).
Test: atest
Flag: TEST_ONLY
Bug: 410435307
Change-Id: Id2ffc0cb41bc31e4cd049b711a392904910414a3
Extend QosFilter address match function for IP address range based on
prefix length.
Bug: 406146808
Bug: 399960748
Flag: com.android.net.flags.qos_filter_ip_range_matching
Test: atest CtsNetTestCases
Test: atest ConnectivityCoverageTests
Change-Id: I78d995fda111d258da9a912c7afa5e472e43437f
If client knows network name and passphrase, it can connect to the
server (Group owner) without user interaction. In this case, it needs
to use interface address of group owner, not device address
Bug: 408245757
Test: atest CtsConnectivityMultiDevicesTestCases
Flag: EXEMPT bug fix
Change-Id: I47bc8609e63564f4226a4ef71ea9e382f5f919fe
Signed-off-by: Rohit Kothari <r.kothari@samsung.corp-partner.google.com>
Rohit Kothariauthored and Paul Hucommited 2025-05-07 02:47:38 -07:00
Include verifyHostname in the test instead of calling the hidden API.
This removes a bit of coverage as verifyHostname itself is not tested
anymore, but it still verifies behavior of the verification and state of
the SSL session on socket creation.
verifyHostname is @hide API so it should not be exercised directly by
CTS.
Bug: 410435307
Flag: TEST_ONLY
Test: atest
Change-Id: I11f56e21ba242b7fcc5b84f6de992dc94d90ddee
Remi NGUYEN VANauthored and Junyu Laicommited 2025-05-07 17:21:26 +08:00
MultinetworkApiTest would attempt to request cellular and Wi-Fi
network connections in test setup. This requires the
CHANGE_NETWORK_STATE permission, which is not granted to
the instant app. Therefore, skip the network requests if the
tests are running in instant mode.
Bug: 413261962
Test: atest android.net.cts.MultinetworkApiTest --instant
Flag: EXEMPT bug fix
Change-Id: I64366a4f2528402d3050adb54bb0aea352c53088
This feature will be controlled by the caller.
Cronet calls the register/unregisterQuicConnectionClosePayload APIs only
when the Chromium experiment flag is enabled
(http://crrev.com/c/6421621/).
This CL also updates testRegisterQuicConnectionClosePayload
to be skipped on U or older releases since FIREWALL_CHAIN_BACKGROUND is
supported on V or higher releases.
Flag: EXEMPT guarded by chromium flag
Bug: 311792075
Test: TH
Change-Id: Ib008e63c585cfe8775b25783cd55b0873bb5e2f0
It was thought originally that it would not make a lot of sense to
offer such a call, but with usage it became clear that there is a
simple, obvious and useful behavior.
In particular this is very useful to mix eventuallyExpect and
expect calls. Interestingly, before this patch, calling
callback.eventuallyExpect<...>()
callback.expect<...>()
does not actually behave like you would intuitively think, because
eventuallyExpect does not advance the read head. When this
utility was made we thought this was the better behavior, but
usage has shown that advancing is both obvious and more useful.
Astonishingly, there seem to be no caller who needs to
eventuallyExpect() and later expect(), meaning that this
behavior change is apparently fine.
Test: ConnectivityCoverageTest and treehugger
Flag: EXEMPT test-only change
Change-Id: I2078330bd913cf0f75240bf3d4852e487e3e0163