When adding a dependencies, if the variants don't match, but the
dependency only has 1 variant anyways, soong will always use that
variant. This makes it hard to add new variants to soong, because the
1-variant fallback stops being used and you start getting missing
variant errors. Make changes to bp files such that all dependencies
correctly specify the variant to use.
Bug: 372091092
Flag: EXEMPT refactor
Test: m nothing
Change-Id: I8d4f59044f268088b44357d27322abbdcdc3001c
When CtsNetTestCases tests fail, or when a tryTest statement fails,
collect connectivity diagnostics and output them as a test artifact.
tryTest must be followed by cleanup blocks, which often change the
configuration, so having diagnostics when the tryTest fails in addition
to after the test failure is useful.
The collected diagnostics will be available as individual test
artifacts. They should make it easier to investigate test failures, and
could be collected across test runs in an automated way.
Output files are currently limited at 20 per run, to avoid collecting
too much data in case everything is failing in the run.
Test: atest
Change-Id: Iaa48e519028dc61c03d387beeade7d41fca2ef48
Connectivity module tests are currently included in both
FrameworksNetTests and ConnectivityCoverageTests. This causes confusion,
may cause tests to fail in one configuration but not the other, is
inefficient in terms of build time and infrastructure usage, and forces
developers to keep tests passing in two different configurations that
may use different libraries.
Only include non-connectivity-module-test in FrameworksNetTests, and
keep them excluded from ConnectivityUnitTestsLib (renamed from
FrameworksNetTestsLib).
Test: atest
Change-Id: I1c557c1b4c643b3eba3bffffd89634e1141d5c0e
* Renamed TapPacketReader to PollPacketReader to better reflect its
functionality beyond TAP interface interaction.
* The class includes general logic for polling and sending packets to
file descriptors, making it suitable for wider use cases.
Test: TH
Change-Id: Icdf9a9d7ef6f49b589ed9cdbd05159ab95e7e5d9
Move this utility method buildMdnsServiceInfoFromResponse from
MdnsServiceTypeClient to MdnsUtils so it can be used by other
classes.
Bug: 355421878
Test: atest FrameworksNetTests NsdManagerTest
Change-Id: I8ce1028de325da46f112a5ec58516453727151fe
* Modified testSetAvoidUnvalidated() to ensure the cellular network is
validated before proceeding with default network switching tests.
* This prevents inaccurate test results when the cellular network is not
usable, as the connectivity service won't switch to it if the Wi-Fi
network becomes invalid.
Bug: 371818866
Test: TH
Change-Id: I458903392605a44470d5f226a36cfa983ec71aea
CtsTetheringTest only appears in mts-tethering-tests-list-user.xml
and not in any other test lists. So remove the MCTS tags that refer to
other MTS suites.
Bug: 369758357
Test: test-only change
Change-Id: Ib75f9c287e011b770bddeee4fba3e6f6f699a93a
Tongbo Liuauthored and Lorenzo Colitticommited 2024-10-08 15:36:32 +00:00
This is a no-op refactoring for test.
Currently, shouldTestThisNetworkType method check test
preconditions and generating network traffic for testing.
Decouple these two functionalities to allow follow-up
changes to capture data usage baseline prior to
generating network traffic.
Test: atest CtsNetTestCases:android.net.cts.NetworkStatsManagerTest \
--rerun-until-failure 30
Bug: 368624224
Change-Id: I5510184ec0cf8afa05b46f78ebaf80e500abaeeb
The removeServices() is running on a different handler, which
might take some time to complete. Therefore, the verification
should include a timeout to wait longer and prevent test flake.
Bug: 367429622
Test: atest MdnsDiscoveryManagerTests#testRemoveServicesAfter\
SocketDestroyed --iteration
Change-Id: I79626bad680a62993c3e7d6b356acc10755257e3
* changes:
Skip testRouterSolicitations on T- devices.
Remove CtsHostsideNetworkTestAppNext.
Set all hostside network tests apps' target SDK to 10000.
Consolidate defaults for hostside network tests apps.
Stop depending on shims in CtsHostsideNetworkTests.
Lorenzo Colittiauthored and Gerrit Code Reviewcommited 2024-09-23 23:53:02 +00:00
Watches do not have a VpnManager instance anymore, so the tests crashes
at the teardown step when trying to interact with a null VpnManager.
Bug: 368624224
Bug: 340928692
Test: Ikev2VpnTest
Change-Id: Iedf784625933e73bcb5fed9bfa36fbae1e11d398
This does not lways pass on some devices before U. Now that the
test is being added to MCTS, and needs to be backwards
compatible, skip this test on T- devices.
Test: atest CtsHostsideNetworkTests
Change-Id: I2368f118d2539d70a97c937485f5179c47ba28d7
Lorenzo Colitticommited 2024-09-20 15:04:11 +09:00
This is now identical to CtsHostsideNetworkTestsApp, and we're
getting rid of -Next targets anyway, so there's no point in
keeping it.
Bug: 365191921
Test: atest CtsHostsideNetworkTests
Change-Id: I57eb7c6d9bc37d222a9449bbc85265e7c6ec9ffc
Lorenzo Colitticommited 2024-09-20 14:48:51 +09:00
This ensures they are subject to the most restrictive target SDK
restrictions and that we never have to manually increment their
target SDK version.
Bug: 365191921
Test: atest CtsHostsideNetworkTests
Change-Id: I66e4e53720b2860094b7a4d3194a81a063b116da
Lorenzo Colitticommited 2024-09-20 14:48:19 +09:00
For now, only share a couple of statements (min_sdk_version and
platform_apis). More will be added later.
Also, remove the test_suites stanzas everywhere. These are not
relevant for test apps because the APKs will be pulled in by
the data: stanzas anyway.
Bug: 365191921
Test: atest CtsHostsideNetworkTests
Change-Id: If510519b3bdd6ab27c1923bae523cddb694e0ecc
Lorenzo Colitticommited 2024-09-20 14:48:12 +09:00
These are no longer necessary, and now that udc-mainline-prod is
gone, we are moving away from shims entirely.
Bug: 365191921
Test: test-only change
Change-Id: Ia441170c25a04d7b146b48e170d53e0916d49ecf
Lorenzo Colitticommited 2024-09-20 14:48:08 +09:00
INGRESS_TO_VPN_ADDRESS_FILTERING is disabled due to b/352424251 and
testDropPacketToVpnAddress fails if the feature is disabled.
So skip testDropPacketToVpnAddress if the feature is disabled.
Bug: 362434644
Test: adb shell device_config put tethering
ingress_to_vpn_address_filtering -1
Test: atest CtsHostsideNetworkTests
(cherry picked from https://android-review.googlesource.com/q/commit:9d5d7d07793549a9c8a19d6277c498683cb7da3f)
Merged-In: Ib16a7550dcf93dd9ecf29047b1c4f101ff6d610d
Change-Id: Ib16a7550dcf93dd9ecf29047b1c4f101ff6d610d
Motomu Utsumiauthored and Android Build Cherrypicker Workercommited 2024-09-18 11:12:45 +00:00
secondary_user_on_secondary_display is for background users that have
access to UI on assigned displays (a.k.a. visible background users) on
devices that have config_multiuserVisibleBackgroundUsers enabled. The
main use case is Automotive's multi-display Whole Cabin experience where
passengers (modeled as visible background users) can interact with the
display in front of them concurrently with the driver (modeled as the
current user) interacting with driver's display.
Bug: 364635030
Test: atest CtsNetApi23TestCases
Test: atest --user-type secondary_user_on_secondary_display \
CtsNetApi23TestCases
(cherry picked from https://android-review.googlesource.com/q/commit:7969d8baff85ae6c2165e7ac525c913546f070f0)
Merged-In: I9315eff338e5ba232c26e27d2885ab922abddabd
Change-Id: I9315eff338e5ba232c26e27d2885ab922abddabd
bkchoiauthored and BK Choicommited 2024-09-17 15:27:28 +00:00
The services in the cache are no longer useful after the network
is disconnected. Because either the Network object or the
interface index will change after the network is reconnected,
these cached services won't be used for any discovery/resolution/
service info callback requests. Therefore, these cached services
should be removed after the network is disconnected. Otherwise,
these useless cached services will occupy memory until the device
is rebooted.
In addition, the cached service may not be reliable after the
last listener is unregistered. Because the socket is
disconnected, the service type client won't receive any updates
for the services. Therefore, remove these cached services after
exceeding the keeping time.
Bug: 355421878
Test: atest FrameworksNetTests NsdManagerTest
Change-Id: I06ff320fec84f71dc2ed742c50fa46f25c284170
Rename TrafficStatsRateLimitCache related
variables to TrafficStatsServiceRateLimitCache.
This is needed since client side cache
would be added.
Test: TH
Bug: 343260158
Change-Id: I12ae977ce33cfb5815aa908d719543d5c8e46f11
Prepare for implementation of client side
TrafficStats rate limit cache.
1. Write Typeless versions of getIfaceStats,
getUidStats, getTotalStats in INetworkStatsService.aidl
that returns NetworkStats instead of Long.
This is needed because in follow-up changes,
the NetworkStats instead of indiviual numbers will
be stored as a cache entry
2. Move some utils from NetworkStatsService
to TrafficStats. This is needed because in the follow-up
changes, these utils would be both accessed by TrafficStats
and NetworkStatsService.
Test: CtsNetTestCases:android.net.cts.TrafficStatsTest
Test: CtsNetTestCases:android.net.cts.NetworkStatsBinderTest
Test: FrameworksNetIntegrationTests:com.android.server.net.\
integrationtests.NetworkStatsIntegrationTest
Test: FrameworksNetTests:android.net.connectivity.com.android.\
server.net.NetworkStatsServiceTest
Test: FrameworksNetTests:android.net.connectivity.\
android.net.TrafficStatsTest
Test: ConnectivityCoverageTests:android.net.connectivity.\
android.net.TrafficStatsTest
Bug: 343260158
Change-Id: Iace251e1495fd3b81e072526e92ca97cbc7246eb
This commit introduces checks for APF version, VSR API level,
and Android version to decide whether an APFv4 test should be
run, skipped, or fail:
* If Android version is less than V, skip the test
* If VSR API level is greater than or equal to 14 and APF
version is less than 4, fail the test
* Otherwise, if APF version is less than 4, skip the test
Test: m connectivity_multi_devices_snippet && \
atest CtsConnectivityMultiDevicesTestCases:ConnectivityMultiDevicesTest
Fix: 352132428
Change-Id: I023164fb59ad40f489abea2e0c45761efc39699b
modules should specify the submodule of java_sdk_library that the module
actually depends on
Test: CI
Bug: 358613520
Change-Id: I0367068c901df98483f6cf95160d3e7801881b0a
The API to start them was only added in U.
The actual failure here is not an error in calling the API, it's
the fact that the test is using CollectionUtils from the
framework jar instead of statically linked copy. This might be
a problem with jarjar rules. That said, given that these APIs
are module-lib, and were only added in U, it's probably OK to
test them only on U.
Bug: 365129333
Test: CtsHostsideNetworkTests passes on redfin running S
Change-Id: I0b6a030e9ebcab573515fb58becadee8298bd653
Lorenzo Colitticommited 2024-09-09 19:47:44 +09:00
Updated the testing app and AIDL interface used by
CtsHostsideNetworkTests to support min_sdk_version 30, ensuring
compatibility with Android R devices.
Test: TH
Change-Id: Ib334f95cf9bd199cce46b2c98d40d8361179aac3
Yuyang Huangauthored and Lorenzo Colitticommited 2024-09-09 19:47:44 +09:00
This allows CtsHostideNetworkTests to run on S. Setting minsdk
to S is required because if the minsdk is T or above, the AIDL
compiler will generate code that contains Parcel#obtain(IBinder),
which only exists on T+.
Fix: 365129333
Test: atest CtsHostsideNetworkTests passes on redfin running S
Change-Id: Icac58bcc27194129014a0d615b5ca43b8f352ebd
Lorenzo Colitticommited 2024-09-09 18:43:15 +09:00