CtsNetTestCasesLatestSdk was originally used for MTS to prevent
installation issues with CUR_DEVELOPMENT target SDK modules (as is the
case for CtsNetTestCases) not installing on released devices.
However setting the min_sdk to a given value should be enough for that
purpose. While there may have been other blockers requiring separation
of CtsNetTestCases and CtsNetTestCasesLatestSdk at the time (in the Q/R
timeframe), more recent modules like CtsAdServicesDeviceTestCases seem
to be using CUR_DEVELOPMENT target SDK in MTS just fine.
Not specifying a target SDK means that the branch default will be used,
depending on the release configuration. So for example trunk_staging
would typically be CUR_DEVELOPMENT=10000, and "next" may use the SDK
version of that release.
This makes sense as a test suite targeting CUR_DEVELOPMENT is necessary
to verify a development build, while a production "next" configuration
should generally use the latest released SDK. But in any case, for
CtsNetTestCases purposes, this would cause the exercised connectivity
APIs to use their latest non-compatibility behavior, which is what
tests expect.
Considering this, add CtsNetTestCases to MTS, so that
CtsNetTestCasesLatestSdk can be removed. This will allow having one test
suite for both CTS and MTS, which in turns allows marking
CtsNetTestCases as MCTS, so that the version of the test to run is
autodetected based on installed modules.
Note this change also removes the unnecessary "platform_api" statement
and comment as this is already handled in
framework-connectivity-test-defaults.
Bug: 317913702
Test: m, aapt dump badging, verify (min)sdkVersion=30, targetSdk=10000
Change-Id: I2267e5c9219f059872928cc681547c3bd5fbc394
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.
For more details please refer to the link below,
<add g3 doc link>
Bug: 304529413
Test: N/A
Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5
Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5
This commit adds support of discovering services with explicit subtype.
With this change, a service can be discovered with subtype with:
```
nsdManager.discoverServices(
new DiscoveryRequest.Builder("_http._tcp", PROTOCOL_DNS_SD)
.setSubtype("_printer").build(),
executor, listener);
```
Bug: 265095929
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: Iba76283a003cf2d52a8c26e1de872c3e8e433350
This tests that the network providers are subject to appropriate
limitations as to what they can set as allowedUids – both in the
positive (can do) case, and the negative (can't do) case.
Test: this
Change-Id: I115e2a4bc02ddcd03ecf2f35130fcb0378da22bd
Add end-to-end testing for testing NsdManager advertising and
discovering works fine with downstream tethering interfaces.
Bug: 281639507
Test: atest NsdManagerTest
Change-Id: I5a66423f216cfe0c82db5128502c885980ab264b
Mainline push to Q was stopped in February 2023.
Test: TreeHugger
Bug: 283996141
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic645cce4df5780cdd62eda4e8c596396c2f83b25
Maciej Żenczykowskicommited 2023-06-15 00:22:48 +00:00
Use the new ConnectivityTestTargetPreparer name instead, as the preparer
is being made more generic.
Bug: 263665773
Test: m
Merged-In: I520e92c449f366c51cda2f8b33fe9a354a8c0445
Change-Id: I520e92c449f366c51cda2f8b33fe9a354a8c0445
The untrusted apps should not directly access /dev/socket/mdnsd since
Android U(SDK 34). For untrusted apps built with target SDK 33 or less,
it should still be able to access the mdnsd socket. Fix the mts test
suits from mts-networking to mts-tethering. If the test suits is marked
as mts-networking, it would run in NetworkStack MTS, which isn't really
what is tested in the tests.
Test: atest CtsNetTestCases CtsNetTestCasesMaxTargetSdk33
Bug: 267102290
Change-Id: I851c181fa7489115fb1f335a369830078f5a5c14
The untrusted apps should not directly access /dev/socket/mdnsd since
Android U(SDK 34). For untrusted apps built with target SDK 33 or less,
it should still be able to access the mdnsd socket. Fix the mts test
suits from mts-networking to mts-tethering. If the test suits is marked
as mts-networking, it would run in NetworkStack MTS, which isn't really
what is tested in the tests.
Test: atest CtsNetTestCases CtsNetTestCasesMaxTargetSdk33
Bug: 267102290
Change-Id: Icfbce8bb387df4481eef7fae94ffc38539975ce5
The untrusted apps should not directly access /dev/socket/mdnsd since
Android U(SDK 34). For untrusted apps built with target SDK 33 or less,
it should still be able to access the mdnsd socket. Fix the mts test
suits from mts-networking to mts-tethering. If the test suits is marked
as mts-networking, it would run in NetworkStack MTS, which isn't really
what is tested in the tests.
Test: atest CtsNetTestCases CtsNetTestCasesMaxTargetSdk33
Bug: 267102290
Change-Id: I895fe51454cca4ea1273215cf3072e688d97e1b8
This change moves ConnectivityChecker from `required` to `data`,
since the `required` is inherited from Make and is very vague. It's
discouraged by Android Build team to use it.
Besides, this change declares net-tests-utils-host-common, since Net
tests use ConnectivityCheckTargetPreparer that is included in
net-tests-utils-host-common. All dependencies of a test should be
declared explicitly, so that test infrastructure could only provide
the needed dependencies instead of all to run a test.
Bug: 222438068
Test: presubmit
Change-Id: Id522fd88ca53b5af338315fc6370d68bdabf403b
Yikeauthored and Yike Zhangcommited 2022-09-06 09:15:07 +00:00
Add back compat config for RUN_NATIVE_NSD_ONLY_IF_LEGACY_APPS, which was
lost when moving NsdManager to framework-connectivity-t.
This causes NsdManager to start mdnsresponder again when used by apps
with target SDK < 31.
The change also changes the compat ID used, to make sure it does not
conflict with the ID already in use in S and below, when the module is
installed on such a platform. This is the only ChangeId used by
framework-t.
Also add a CtsNetTestCasesMaxTargetSdk30 test to verify that behavior.
Bug: 235355681
Test: atest CtsNetTestCasesMaxTargetSdk30
Change-Id: I7ca6051d0a4ba5aff3e44bece2cbac22eb1be32d
Currently, ConnectivityCoverageTests is manually set to target
SDK 31. This is different from CtsNetTestCasesLatestSdk, and
CtsTetheringTestLatestSdk, which are set to 33 and 31
respectively. Set all of them to 33 via a defaults clause.
ConnectivityCoverageTests must have the same target SDK as CTS
because it includes many of the CTS tests (e.g., everything in
common/).
Bug: 236087258
Test: atest ConnectivityCoverageTests
Test: atest CtsNetTestCasesLatestSdk
Test: atest CtsTetheringTestLatestSdk
Change-Id: I88c16dc28d9b73557def25d7f669ed14ae9d360a
Lorenzo Colitticommited 2022-07-22 13:08:39 +09:00
Only depend on a newly created DhcpPacketLib library, which only
contains DhcpPacket classes for test usage purposes.
This avoids including the NetworkStack manifest, and many unnecessary
classes.
Test: atest CtsNetTestCases
Change-Id: I0047826ef8bb56f229b296f0b3c337b2de1fbc93
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
The "current" targets are only necessary in branches that can use
non-stable APIs, and can fail to build otherwise.
Apply ConnectivityNextEnableDefaults so they are disabled on such
branches. Also deprecate NetworkStackNextEnableDefaults, so
ConnectivityNextEnableDefaults is used everywhere.
Bug: 190249673
Test: m
Change-Id: I1b152f3cc22f1bed6444d280f0066e480980e949
Apply NetworkStackNextEnableDefaults to CtsNetTestCases to disable it
in branches where NetworkStackNext and related targets should not be
built.
Test: presubmit
Change-Id: I850b4294aa4c3c01f8871760185ca7fedc0f8584
The preparer does basic checks for device configuration before any test
is run, so that wrong device configuration can be identified at the
module level, rather than fail individual test cases.
If test devices are not properly configured with a wifi configuration
and data-enabled SIM cards, the run will fail before starting the test
module.
As the preparer uses much of CtsNetUtils code for connecting to wifi,
refactor that code out of CtsNetUtils.
Test: atest CtsNetCasesLatestSdk
Change-Id: I1214b6d6916e836bcd68d15c50486092c7fb9a6e
This CL adds a test to verify kernel implementation of AES-XCBC.
Since there is no hardware that first launched with SDK beyond R
at the time of writing this CL, the test for AES-XCBC was manually
enabled and verified on coral (coral-kernel already supports
AES-XCBC)
Bug: 171083832
Test: atest IpSecAlgorithmImplTest
Change-Id: I57e2bbed2954e4c7de906caae20390f7aebac0e3
The tests have been building against hidden APIs to provide additional
coverage.
Test: m TetheringCoverageTests CtsNetTestCases
Bug: 182859030
Ignore-AOSP-First: needs manual cherry-picks
Change-Id: I37d748411a34f25834214a2412c49aed1423e526
Bug: 167645754
Ignore-AOSP-First: test is already enabled in AOSP
Test: atest CtsNetTestCasesLatestSdk passes on R device
Change-Id: I9677518a6a43bf3195e42ba21291a84846e31f14
Lorenzo Colitticommited 2021-03-01 16:44:58 +09:00
This is required for the code to be identical in AOSP and
mainline-prod.
Bug: 167645754
Test: atest CtsNetTestCases passes on AOSP device
Test: atest CtsNetTestCasesLatestSdk passes on AOSP device
Test: atest CtsNetTestCasesLatestSdk passes on R device
Change-Id: I094906e535d710a46a3fa833b6aa48cb007d6b63
Lorenzo Colitticommited 2021-03-01 15:59:40 +09:00
This currently still builds, but it will stop building as soon
as we make it depend on the networkstack current shims. It should
not be used for anything in mainline-prod anyway, everything uses
CtsNetTestCasesLatestSdk.
The Merged-In clause is from unrelated change aosp/1542627 and is
intended to ensure this change does not propagate to any
downstream branches.
Bug: 167645754
Test: mmm packages/modules/Connectivity
Change-Id: Ib47b181902e8e634f419e5544472859760c2ce77
Merged-In: Ib0ac49609e444a53a6fee4575f5078e15f364eef
Lorenzo Colitticommited 2021-03-01 14:02:41 +09:00
This is better than commenting out code because any changes in
AOSP will automerge cleanly. When these tests are fixed by
adding a shim for ConnectivityManager, we can simply revert this
change.
Bug: 167645754
Test: m com.android.tethering
Ignore-AOSP-First: needed to sync mainline-prod with AOSP
Change-Id: I450e2d44870e70ad3b80f1843ff90dbd5cfc4902
Merged-In: Ib0ac49609e444a53a6fee4575f5078e15f364eef
Lorenzo Colitticommited 2021-02-25 20:42:55 +09:00
In AOSP master and downstream branches, this likely works via a
transitive dependency. In mainline-prod, this doesn't work. Add
the dependency explicitly, since it makes things build everywhere
and in general it's also good practice to "include what you use".
Bug: 167645754
Test: m CtsNetTestCasesLatestSdk in mainline-prod has fewer errors
Change-Id: Ie575372415a806deee9996aab7f920d2c15bff80
Lorenzo Colitticommited 2021-02-24 05:43:36 +00:00