Note: to avoid missing some dependeices change only happen in T+, below
testing verification is perform by internal branch.
Test: atest TetheringTests
atest TetheringIntegrationTests
atest CtsTetheringTest
atest MtsTetheringLatestSdk
manually change entitlement check recheck period to 1 min and
monitor schedule alarm works.
Dogfood this change personally 7 days, major use hotspot sharing network to notebook to work.
Bug: 232193147
Change-Id: I3cba98f42ac1a9c0c1db4b2ad036aff714a428f3
This APK will only run tests that require target SDK 31 or below.
Bug: 233553525
Test: test-only change
Change-Id: Ia86187de50107748d8053194d3f7a55b7947412e
Lorenzo Colitticommited 2022-05-30 23:36:21 +09:00
Bug: 233553525
Test: Presubmit
Changing target_sdk of or CtsNetTestCasesLatestSdk to 33 to match with apps target_sdk
Change-Id: Id786f64956d52307e15b3cd3feaa02d585e7623e
* changes:
Add CTS tests for EthernetNetworkProvider changes
Move EthernetNetworkFactory to using the NetworkProvider API
Improve waiting for interface added or removed
Patrick Rohrauthored and Gerrit Code Reviewcommited 2022-05-24 03:34:25 +00:00
Adds CTS test to validate behavior of EthernetNetworkProvider API.
These tests are currently still pretty slow due to the fact that newly
registered tracked interfaces are brought up, back down, and back up
before they are available (this is a bug and will hopefully get fixed in
the near future).
Test: atest EthernetManagerTest
Bug: 197548738
Change-Id: I8e806b3b884f2e0b6c1a1d2fffdb9a99c5dd60e8
We are checking for network access in onResume(), which
wouldn't be called until the screen is on. So, there
shouldn't be a need for the extra sleep after turning
on the screen.
Also, remove redundant waits after the last try when
doing verifications as the test is anyway to going to
fail at this point.
Bug: 231440256
Test: atest tests/tests/app.usage/src/android/app/usage/cts/UsageStatsTest.java
Change-Id: I28429c929142a95c19b1f8a5b7d28b9c8c4a45b9
Merged-In: I28429c929142a95c19b1f8a5b7d28b9c8c4a45b9
- NsdManagerTest would fail on R device because the
android.net.TestNetworkSpecifier is not existed when creating a
test networks. Test networks are only used for those target T+
tests. Thus, only create the test networks on T+ devices.
- Those target T+ NsdManagerTest would fail on S image because
aosp/2098750 updated ConstantsShim to 33, so the
ConstantsShim.VERSION check will be true. Then these tests
will run on S image but fails with no api found. Thus, the
pre-check should include platform check(T+).
Bug: 233200200
Bug: 232813132
Test: atest CtsNetTestCasesLatestSdk:android.net.NsdManagerTest\
on R & S devices.
Change-Id: I246194e6e266a5e75d2f7053e0aa02ff06f11097
paulhuauthored and Paul Hucommited 2022-05-22 14:22:52 +00:00
In a previous CL, code was added to wait for interfaces being properly
registered with the EthernetTracker before continuing the test. The same
logic applies to removingInterfaces (which prevents a previous tests
Lost callbacks to show up in a subsequent test).
The createInterface listener was improved to expect the down callback
first. EthernetTracker receives down and up callbacks from netd which it
posts on its handler. While the initial up-up callbacks (KI) can be
flaky, down-up should always be the correct signal that the interface is
ready and properly registered with the ethernet code.
Test: atest EthernetManagerTest
Bug: 227008268
Change-Id: Id2a078da732009411934166df7ae08bedd17a19d
Adds a global listener that is used to wait for an interface to show up
in EthernetTracker when it is newly created. This prevents races when
the interface is used directly after creation.
This test should fix the testCallback flakes.
Test: atest EthernetManagerTest
Bug: 227008268
Change-Id: I37d2ec63aea9f4de6010e13150bc236ee07e2f85
aosp/2085868 has not included in a tethering train build and it
probably will be included in a T module release. But the test in
that CL has been put to the S MTS test. Thus, fix the test failure
on S image + S module.
Bug: 233019430
Test: atest CtsNetTestCasesLatestSdk:android.net.cts\
.ConnectivityManagerTest#testUidsAllowedOnRestrictedNetworks
on the S image + S module device.
Change-Id: Iafb26a1c80c48232a76050d4c8c21e2de2c21207
This avoids races where NetworkInterface.getByName does not return the interface
right after it is created.
Change-Id: I17a5a22034bafc30023307d5480db18e918fc042
Test: test-only change
Bug: 227008268
Lorenzo Colitticommited 2022-05-19 02:45:16 +00:00
Updating EthernetManagerTest to account for existing ethernet
interfaces. Specifically, testCallbacks() assumed the test interface
created would be the only ethernet interface on the device. This would
cause the test to fail if other ethernet interfaces existed.
Bug: 230305098
Test: atest CtsNetTestCases:android.net.cts.EthernetManagerTest
Change-Id: I675c4ef5c2bd96d01a057bdfec1794d6bfcf82bb
Add an CTS test to verify that a service can still be registered
with non-ASCII characters. And the service info can be
resolved successfully.
Bug: 230698801
Test: atest CtsNetTestCases:android.net.cts.NsdManagerTest
Change-Id: I1cb9a558988af5f1264d0ae732ab4b62c0bb8cde
paulhuauthored and Paul Hucommited 2022-05-17 10:27:10 +08:00
- All tests in NsdManagerTest would be ignored when running
CtsNetTestCasesLatestSdk on android S devices. But
NsdManagerTest#testNsdManager is existed before android T, it
should not be ignored on android S devices. Besides, those
tests can only run after android T have guarded by
ConstantsShim check. Thus, remove DevSdkIgnoreRule on
NsdManagerTest.
- In the legacy NsdManagerTest that covers older APIs, do not use
newer APIs that use executors, and use only older APIs instead.
Bug: 228286975
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.\
NsdManagerTest
Change-Id: I2b4ca568e9819dc0f476f66e43072ddbcfd75a02
Remove usage of Ikev2VpnProfileShim and Ikev2VpnProfileBuilderShim.
Both were used to allow the test to build in branches that do not have T
APIs, but all downstream branches now do.
The shims would throw checked exceptions when unsupported methods were
used, not providing fallback behavior, so they can just be replaced by
direct calls in any case.
Bug: 232251248
Test: atest Ikev2VpnTest
Change-Id: I1d5418206fab9f35403eb3baf81363b1286b0b3b
This is not strictly necessary because the NetworkStats code is
only mainlined on T+. But it is useful to run it because it
ensures that any mainline code that uses NetworkStats APIs will
not show up as uncovered in the API coverage dashboard.
The test has not changed much recently and it should not be
difficult to keep it passing on R.
Bug: 229055233
Test: test-only change
Change-Id: Icab9e7c9e6762359cbbc2d69081636e6050573d3
Lorenzo Colitticommited 2022-05-16 08:35:00 +09:00
* changes:
Skip NetworkStatsManager CTS test before T.
Fix testDataMigrationUtils fail on R device
Fix testCallback fail caused by lacking of looper
[MS84] Add CTS for data migration utils
Treehugger Robotauthored and Gerrit Code Reviewcommited 2022-05-12 15:07:00 +00:00
The corresponding class was only mainlined in T so there is no
need to run this test on previous Android versions (which must
already have passed it on device ship).
To do this, switch to JUnit 4 so we can use DevSdkIgnoreRunner.
Make setUp and tearDown public (as required by JUnit 4) and move
the AppModeFull annotation to the class level to avoid repeating
it on every test method. Also switch to getting the
instrumentation the instrumentation and the context from
InstrumentationRegistry since getInstrumentation() returns null.
Bug: 204830222
Test: atest CtsNetTestCases:NetworkStatsManagerTest
Test: atest --instant CtsNetTestCasesLatestSdk:android.net.cts.NetworkStatsManagerTest (skips all tests)
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkStatsManagerTest on S device (skips all tests)
Change-Id: Ie5689ba6e7826e51c76257cf66bd8fef846376f7
Lorenzo Colitticommited 2022-05-11 04:15:04 +00:00
Since the test is using JUnit3, which doesn't support rules
or assumeTrue, the IgnoreUpTo rule does not take effect.
Replace with a return statement as short term solution to
unblock presumit.
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkStatsManagerTest
on R device
Bug: 219099881
(cherry-picked from ag/16927063)
Change-Id: I6056da19324715237c6fdac0975fb89de8a04416
Merged-In: I6056da19324715237c6fdac0975fb89de8a04416
junyulaiauthored and Junyu Laicommited 2022-05-10 19:35:20 +08:00
For T- devices, the registerUsageCallback invocation without
a handler needs a looper from the thread that calls into
the API, which is not available in the test.
Thus, skip related checks if the sdk level is below T.
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkStatsManagerTest#testCallback
on R device
Bug: 218845894
(cherry-picked from ag/16835803)
Change-Id: I89f391297e8c7108d3e790a3d2da7b373f7b4012
Merged-In: I89f391297e8c7108d3e790a3d2da7b373f7b4012
junyulaiauthored and Junyu Laicommited 2022-05-10 19:34:58 +08:00
This change also add minor changes to testCallback to
increase test covergage.
Test: atest CtsNetTestCases:android.net.cts.NetworkStatsManagerTest
Bug: 204830222
(cherry-picked from ag/16826539)
Change-Id: I6760d57929f95283b355a6369fd3571b784eb331
Merged-In: I6760d57929f95283b355a6369fd3571b784eb331
junyulaiauthored and Junyu Laicommited 2022-05-10 19:34:40 +08:00
Since 3p apps are allowed to use restricted networks in S, they
should be allowed to request a restricted network reasonably.
Otherwise, the functionalities of 3p apps will break if they rely
on restricted networks. Thus, CS needs to allow 3p apps to
request restricted networks if 3p apps are in the allowed list.
Bug: 230509118
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I236f1550095ee2be29adbc3b28d3ac2561a8b072
Mark CtsNetTestCases test app as debuggable to let it run correctly on
*-user build targets.
Test: atest CtsnetTestCases:LinkPropertiesTest
Bug: 229813087
Change-Id: I21435cd6cb5c43074eef95e8896c02652ffea216
Added SPDX-license-identifier-Apache-2.0 to:
tests/cts/hostside/app3/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Change-Id: I0f594c539640b9815040bf5082677592574b022d
Add CTS tests for LinkProperties#EXCLUDED_ROUTES gated change.
These tests check LinkProperties#getRoutes and
LinkProperties#getAllRoutes behavior depending on whether the gated
change is enabled.
Bug: 186082280
Test: atest HostsideLinkPropertiesGatingTests
Change-Id: Id353714331a19d09022d20f186c8f71343686da7
When the test is run in a mainline context, this allows only running it
when the relevant modules are installed.
This is a prerequisite for test suite configurations used for module
testing.
Bug: 229951035
Change-Id: Icb67905d16a6b8f3863463e8150d61bbeabbcadd
Test: mts-tradefed run mts-all
This is preparation for sharing version function with
EthernetTetheringTest.
- Move compareMajorMinorVersion, getVersionFromString to
frameworks/libs/net/../testutils/DeviceInfoUtils
- Move testMajorMinorVersionCompare to
packages/modules/NetworkStack/../testutils/DeviceInfoUtilsTest
Bug: 230359047
Test: atest \
android.net.cts.ConnectivityManagerTest#testSocketKeepaliveLimitTelephony \
android.net.cts.ConnectivityManagerTest#testSocketKeepaliveUnprivileged \
android.net.cts.ConnectivityManagerTest#testCreateTcpKeepalive \
android.net.cts.ConnectivityManagerTest#testSocketKeepaliveLimitWifi \
android.net.cts.ConnectivityManagerTest#testKeepaliveWifiUnsupported
Change-Id: I2c9ef22ce9bec6877b47a383cc4327dab7cc6416