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
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
This method can execute the task after the specified amount of
time elapses.
Bug: 355421878
Test: atest FrameworksNetTests NsdManagerTest
Change-Id: I9d749393bd5435cdba5072d48242cd0d17332b67
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://googleplex-android-review.googlesource.com/q/commit:ebef3cb0fe2b85fcf5828e64d437efc4eab18d30)
Change-Id: I9315eff338e5ba232c26e27d2885ab922abddabd
bkchoiauthored and BK Choicommited 2024-09-04 21:11:50 +00:00
Missing min_sdk_version will make the helper apps failed to install on
older Android releases.
Bug: 364110022
Test: TH
Change-Id: I2b53d3547d175786574064f9b8b24ea5d302a3ff
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
Change-Id: Ib16a7550dcf93dd9ecf29047b1c4f101ff6d610d
Another step towards moving all bpf related stuff into a common directory,
which will ease development.
I want to refactor this test so that it can also be run as a self-test
in UML (for testing bpfloading functionality across a large variety of
Linux kernel (both major and minor LTS) and Android (API/SDK level)
platform versions.
Bug: 205608149
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Idc9104783b2fa60626e9c1fd463c4d94fd4a908c
Maciej Żenczykowskicommited 2024-08-26 16:19:48 -07:00
testRequestIpSecTransformStateForTs was flaky because sometimes
ICMPv6(Router Solicitation) might be sent and failed the validation
of packet/byte count.
This CL provides two improvements
- Change the validation to handle possible ICMP packets
- In the await method, require sequence number match to ensure
the expected packet has been sent out. Otherwise the await method
will still return true on an old packet with the same SPI.
Bug: 358324865
Test: atest IpSecManagerTunnelTest
Flag: Exempt test code only
Change-Id: I471014c11328bc0f32ee1f805accbaf7b29b8e7c
This is a preparation patch for improving
testRequestIpSecTransformStateForTx
This patch:
- Adds another awaitEspPacket method that requires sequence number
match
- Defines ICMP header length in the PacketUtils
Bug: 358324865
Test: atest IpSecManagerTunnelTest
Flag: Exempt test code only
Change-Id: I5365c4daf983cc98f8f869a30cee1799138fa2b3