Those tests are no longer flaky after fix being merged, so add
them back to presubmit.
Fix: 293239828
Test: atest CtsNetTestCases:android.net.cts.Ikev2VpnTest \
--rerun-until-failure 100
Change-Id: I3e5b0f8053404b8840e8ce67ea82344ab53ce421
chiachangwangauthored and Chiachang Wangcommited 2023-08-18 00:41:55 +00:00
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: Id5faceec341578f1c9757194c91a433fbb3f657f
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
Following CLs remove the default value from isFeatureEnabled since the
default value was difficult to use correctly.
For example, there was a code that use isAtLeastT() as default value and
expect feature is always enabled on T+ devices.
However, default value is used only when the device does not have the
flag value or flag value is 0.
So the expectation that the feature is always enabled on T+ devices is
not correct if flag is pushed to the device by mistake or the device is
upgraded from S to T but the flag value is not cleared.
If the feature should be always enabled on T+ devices, `isAtleastT() ||
isFeatureEnabled()` should be used instead of `isFeatureEnabled(
isAtleastT() /* defaultValue*/ )`
After the default value argument is removed from isFeatureEnabled,
isFeatureEnabled is used for default false flag and
isTetheringFeatureNotChickenedOut is used for default true kill switch flag.
automatic_on_off_keepalive_version flag is not configured and devices
don't have this flag value.
So updating to use isTetheringFeatureNotChickenedOut should not have any
behavior change.
Test: m
Bug: 279108992
Change-Id: I43ceab6cc5234bd5a43af3acbd7bd7344844c5a6
Collect information on resolution success and failure events,
then use this data to build metrics and report them.
Bug: 287546772
Test: atest FrameworksNetTestCases NsdManagerTest
Change-Id: I373ce91fea9d5a278f53fc0c505be90dd39b2d5b
Collect information on discovery start, failure, and stop events,
then use this data to build metrics and report them.
Bug: 287546772
Test: atest FrameworksNetTestCases NsdManagerTest
Change-Id: I2f6a718024870f9658cfeabe8995624a3ad81f05
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
Add end-to-end testing for conflicts happening during and after probing.
This includes making sure that interfaces have a usable IPv6 address
before starting each test, as mdnsresponder would not probe on the
interface if the address is not present, and would go straight to
advertising otherwise.
Bug: 266151066
Test: atest NsdManagerTest
Change-Id: Ie1a1e888afbcd5c1bafaf218a98ac4c2f5fe63ee
Remi NGUYEN VANauthored and Paul Hucommited 2023-08-14 15:02:54 +08:00
Fix flaky test by only catch relevant the AddOrUpdateEvent and
RemoveEvent.
Bug: 294685851
Test: atest CtsNetTestCases
Change-Id: Ia12e51a6527f1e23610fdb0bea1068ebb5b80a73
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
EthernetNetworkFactory does not track interfaces in server mode; use
EthernetTracker#getInterfaceState() instead.
Bug: 241070589
Test: atest EthernetManagerTest
Change-Id: Id68f2ae8b30dd5bacef09b828692a9692c6dba75
eventuallyExpect(CallbackEntry) was missing an assertNotNull, which
essentially made it a no-op.
Bug: 241070589
Test: atest EthernetManagerTest
Change-Id: I0ebf54bc9b7ae8a5de59f2bc302b06747174d4ea
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
This test assumes the data saver mode is initially disabled, but WearOS enables the mode on boot. This change fixes the precondition in the setUp method.
Test: run cts -m CtsHostsideNetworkTests
Bug: 280542664
(cherry picked from https://android-review.googlesource.com/q/commit:2cdeffc7e97a915a847cfc40d89e091aeadf20b3)
Merged-In: Ibcceaf0f44821100c861ef7b3c61d0888ae30481
Change-Id: Ibcceaf0f44821100c861ef7b3c61d0888ae30481
Kefan Tuauthored and Android Build Cherrypicker Workercommited 2023-08-04 22:02:25 +00:00
Components that can provide offload like IpClient (packet
filter offloading) can use the API to register a callback to be notified
when offload is necessary.
Bug: 269240366
Test: atest CtsNetTestCases
Change-Id: I8080702f5b530001b88e79e504f4722ac01bc576
This commit adds the version control for keepalive packet address
translation design to prevent device crash if the network stack
is not updated to a newer version. This commit also adds a
DeviceConfig to control the design in newer module version.
Bug: 291870956
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: Id4efbf51dae9154d2bc3a1ee405e2139d5c91e36