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
Due to ongoing issues discovered in the APF multidevice CTS, it is safer
to disable the entire test suites rather than individual test cases.
This change removes the ApfV4Test and ApfV6Test classes.
Bug: 406570694
Test: TH
Flag: EXEMPT bugfix
Change-Id: I0f176e2a075fb33625fcc824418484df10137ccc
This commit removes the test_igmpv3_general_query_offload() test
logic. This test fails on user builds because they run on non-rootable
devices, preventing the necessary test operations.
Additionally, the APF counter check logic is removed as it was causing
test flakiness and instability.
Bug: 406570694
Test: TH
Flag: EXEMPT test only change
Change-Id: I9f2f32c49737721e537d578d6df41d4062d0684f
Replace usage of hidden API that can easily be replaced by API
equivalents in CtsNetTestCases.
Test: atest
Flag: TEST_ONLY
Bug: 410435307
Change-Id: Ia76913682eaf0590126706cdcb92b5c2cdaad561
Remove the dependency on hidden API by setting the constant in tests.
While there is a ConnectivitySettingsManager for this setting, it is
mostly broken (does not allow combining different bitmask values for the
multipath preference), and OEMs are much more likely to be setting the
setting directly. In practice the constant cannot be changed, otherwise
some of these callers may break. Therefore it is more valuable/realistic
to test behavior when the setting is modified directly.
Test: atest
Flag: TEST_ONLY
Bug: 410435307
Bug: 411565010
Change-Id: I802541ae0a6a6bab4b98c1a64dacb04775c349df
Use a common code path for getTestableNetworks, which obtains Wi-Fi and
cellular from network callbacks. This avoids mixing callbacks and
synchronous calls, as getTestableNetworks may be called after
ensureWifiConnected, which uses NetworkCallbacks.
Test: atest
Bug: 253698734
Flag: TEST_ONLY
Change-Id: I8bf946b5258270554286e52b8aa3189aa2ba52e1
To help investigate flakes when calling awaitPrivateDnsSetting, add more
logs.
Bug: 253698734
Test: atest
Flag: TEST_ONLY
Change-Id: I224b2693b61003a723d1e67e970232c00bd94f84
Follow-up from aosp/3405539, it is possible that OEMs do not
install Tethering/NetworkStack for certain user types.
This is undesirable. Therefore, enforce this with CTS test cases.
Flag: TEST_ONLY
Test: m CtsTetheringTest && atest \
CtsTetheringTest:android.tethering.test.TetheringManagerTest
Fix: 400836850
Change-Id: I176d4930040d288846bde43beda9e30519ecd513
This check is needed for devices which doesn't support tethering,
e.g. wear devices
Flag: TEST_ONLY
Test: lunch cf_gwear_x86-next-userdebug
atest CtsTetheringTest:android.tethering.cts.TetheringWifiP2pTest#testWifiP2pGoNetworkAgent_networkCallbacks \
-- --test-arg com.android.testutils.ConnectivityTestTargetPreparer:ignore-mobile-data-check:true
Fix: 408634222
Change-Id: I1b17eec973615f4d934e831de521d7699da7b3fd
RestoreDefaultNetwork has been flaky due to delays in Wi-Fi validation
after reconnecting (sometimes exceeding 30 seconds).
RestoreDefaultNetwork fails at the end of all tests. So connectivity
diagnostics does not contain diagnostics for the network that fails to
be validated.
This CL updates some tests to fail if the Wi-Fi network is not
validated within 30 seconds after the reconnect. This ensures that
connectivity diagnostics include the diagnostics for the problematic
network.
Flag: TEST_ONLY
Bug: 361401328
Test: ConnectivityManagerTest
(cherry picked from https://android-review.googlesource.com/q/commit:cd1bd59a1a18b04e71c3137c4e7d506757691c6c)
Merged-In: Ifeadc8b030f0073133df4fca838e64f1b37e735c
Change-Id: Ifeadc8b030f0073133df4fca838e64f1b37e735c
Instead of relying on the test runner ignoring "include-annotation" if
the annotation class is not part of the APK, and on the module name
matching the annotation name, specify the annotation in the build rule.
This makes the test setup easier to understand and less likely to break
with test runner behavior changes or annotation/test renames.
Test: atest
Bug: 410435307
Flag: TEST_ONLY
Change-Id: I2db905a65729adaca508eefcc0c06e5427b1bb98
Bundle the version of the tethering APEX in the build branch into
CtsNetTestCases as a resource, and include it in the failure header on
test failure.
This should make it easy to identify what version of the module matches
the built test when investigating test failures.
Test: atest
Flag: TEST_ONLY
Change-Id: I15a53b3d7649ebde9706b10ee504d08aa78ee7de