The created handler thread will stay there for a while until
all the tests are finished. This is considered as a leakage
which will take the resource from the devices. In low end
devices, this may possibly impact the performance. The created
threads should be closed explicitly.
Test: atest FrameworksNetTests
Change-Id: I332d55d8effdb975fd9a8953b19910a7fb25e426
Mark fixed this test in aosp/2709233
Bug: 295829521
Test: Dashboard will stop showing this failure
Change-Id: I439d4b65b2fc5981af924fb1f1155273bdd52e7a
The testMobileDataPreferredUids was disabled from presubmit
because of flaky test. It's no longer flaky now, so add the test
back to presubmit.
Fix: 292174275
Test: atest android.net.cts.ConnectivityManagerTest\
#testMobileDataPreferredUids --iterations 1000
Change-Id: I191888069a00942aa4c82f62bd1d62b7fc70b4fa
There may be additional CapabilitiesChanged callbacks before
the test network is torn down. To verify ON_LOST, use
eventuallyExpect instead of expect.
Bug: 295829521
Test: atest ConnectivityManager#testSetOemNetworkPreferenceForTestOnlyPref
Change-Id: I24bb11bf2c2da08e5757c845beeb35b7004f25a4
Ikev2VpnTest uses TestNetworkRunnable to start test networks
to perform VPN related tests. In some low performance devices,
such as cuttlefish, the request to disconnect test network
at the end of the previous test may not be executed completely
yet. It results in the disconnect-pending network being used
by the follow-up test and fail the test. To fix this, the utility
method should wait for onLost callback before performing next
test.
Bug: 293239828
Test: atest CtsNetTestCases:android.net.cts.Ikev2VpnTest \
--rerun-until-failure 100
Change-Id: I6f3c4f45d3dbadc7e8783c05d6cf67f0896ffa95
chiachangwangauthored and Chiachang Wangcommited 2023-08-15 05:21:29 +00:00
This test is run by resolver MTS and it should pre-check device
connectivity before running. The reason why the test never or
seldom failed in the past is probably that it usually ran after
CtsNetTestCasesLatestSdk DnsResolverTest (which is also run by
resolver MTS) that already pre-checked the connectivity.
Bug: 291495329
Test: atest CtsNativeNetDnsTestCases
Change-Id: I20159029c7e68e9c21dcb6e7bbf221cda39117a5
RFC7421_PREFIX_LENGTH is being removed from NetworkConstants and import
it from NetworkStackConstants instead.
Bug: 290885904
Test: TH
Change-Id: I35e785be3f1a278c76b0810cad844710254b0f15
Similarly to Nearby, remoteauth is expected to regularly need to change
the API files.
Import the existing owners file for that purpose.
Test: m
Change-Id: I4b900481df3bf505a8209e5370dc4bc4c928dbee
This should help find changes that do not do proper NewApi checks
in presubmit, and when building with RUN_ERROR_PRONE=true
Test: m
Change-Id: I87ce56d9df2eb27dafd2ec8d2c814c83098a979f
(next step is to replace use of Stats struct with
identical (except field order) StatsValue struct)
Test: TreeHugger
Bug: 294604315
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9be3c411f9592bf4edc75386b1c5b386ebeb5905
Maciej Żenczykowskicommited 2023-08-12 08:20:39 +00:00
This patch is based on aosp/2535559 from maze@.
Add source prefix into the upstream key such that only packets which
source IPv6 address matches it will be forwarded to the upstream
interface.
In this patch, the source prefix is set to zero so there is no
behavior changes. Next CL in patch series will use the real source
prefixes retrieved from upstream interface.
Test: atest TetheringTests
Bug: 261923493
Change-Id: I43d068a29b937c7dfeb6fab632a8effb47ee2263
Fix flaky test by only catch relevant the AddOrUpdateEvent and
RemoveEvent.
Bug: 294685851
Test: atest CtsNetTestCases
Change-Id: Ia12e51a6527f1e23610fdb0bea1068ebb5b80a73
NativeHandles shouldn't be closed in OffloadHardwareInterface after
passing them to initOffload() of AIDL service, because their owner
will be changed to ParcelFileDescriptor by libbinder.
Add test cases to verify that NativeHandles are closed correctly.
NativeHandles should be closed after initOffload if:
- Init with HIDL HAL interface
- Has null NativeHandle, any non-null NativeHandles should be closed
Bug: 277834236
Test: atest OffloadHardwareInterfaceTest
Change-Id: Icbe74da73d3bdc582d1816b314fdfce9661465fc
The NsdService will throw a NPE if a new client is registered
with a null INsdManagerCallback object. To avoid this, perform
a null check before registering a new client and throw an
IllegalArgumentException if the callback is null.
Bug: 293285797
Test: atest FrameworksNetTests
Change-Id: Id61e27873591031c3fe383879aee0d40eebc08b3
The nsd metrics implementation needs to be updated to support
the new field sent_query_count on NetworkNsdReported.
Bug: 287546772
Test: m
Merged-In: Ie1d8d5f2cce4f6040dcfb980db6ab11dfe01fb72
Change-Id: Ie1d8d5f2cce4f6040dcfb980db6ab11dfe01fb72
Test main thread mocked settings object but use that on the handler
thread as well, which is not thread-safe.
Create a real object instead of mocking it instead.
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest#testDataMigration_differentFromFallback \
--rerun-until-failure 500
Fix: 289705810
Change-Id: Ibfb722818467fdf2b69a4b8fa87b4ac04a713573
These tests were disabled from presubmit because of flaky test.
It's no longer flaky now, so add these tests back to presubmit.
Bug: 293233390
Test: atest FrameworksNetTests
Change-Id: I7f1f36385d2ca6ed210e1d9b7399b6509fd26519
When the device is very slow to run this test, cell might end
its lingering period in the middle of the test while wifi is
the default. VPN will then ignore it as an underlying network,
causing the test to fail.
Test: testVpnSetUnderlyingNetworks
Added sleep in a strategic place to make sure the problem
was correctly identified, and observed the test failing.
After the fix, the test passes with the sleep.
Fixes: 280627836
Fixes: 293844384
Change-Id: Iaf56de963eb17845c1d76a0310b55f7f9321f7e4
Move scheduling logic into a standalone MdnsQueryScheduler class to
simplify the MdnsServiceTypeClient class.
Bug: 292470176
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I31130c239bc54f6dc0efde2921ce51df35076a74