Commit graph android_packages_modules_Co.../tests/cts/net/Android.bp
Message SHA1
Add CtsNetTestCases to MTS
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

Remi NGUYEN VAN   commited 2024-02-14 18:13:35 +09:00
4a01ecf7e0
[DON'T BLOCK] Test ownership migration rules
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

Aditya Choudhary   commited 2024-01-31 12:34:50 +00:00
01b5ede2b2
[mdns] add API for discovery with subtype
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

Kangping Dong   commited 2024-01-25 20:15:21 +08:00
97d6aeb3a2
Add mcts tag to MainlineCTS networking test modules which is used for build all the mainline CTS tests.
Bug: 316436957

Change-Id: I0e7ab773075fb0dfd154dde45a710d1c1823c914

Tongbo Liu   commited 2023-12-19 11:03:50 +00:00
199357ba68
Add more powerful CTS for allowedUids
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

Chalard Jean   commited 2023-11-20 12:16:39 +09:00
5301778ad8
Clean up obsolete aliases for Truth.
Bug: 255714762
Test: presubmit
Change-Id: If91e9af5409fed9d5ccdd13749a0f562c545d589

Krzysztof Kosiński   commited 2023-10-07 00:48:10 +00:00
739ed22507
Add test for downstream tethering
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

Yuyang Huang   commited 2023-09-12 17:53:37 +09:00
fca402abed
Connectivity: bump min sdk 29(Q) to 30(R)
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 Żenczykowski   commited 2023-06-15 00:22:48 +00:00
3fa9dceabc
Update ConnectivityCheckTargetPreparer references
Use the new ConnectivityTestTargetPreparer name instead, as the preparer
is being made more generic.

Bug: 263665773
Test: m
Merged-In: I520e92c449f366c51cda2f8b33fe9a354a8c0445
Change-Id: I520e92c449f366c51cda2f8b33fe9a354a8c0445

Remi NGUYEN VAN   commited 2023-05-16 15:15:55 +09:00
89570aca44
Verify the access to the mdnsd socket is blocked from Android U
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

Yuyang Huang   commited 2023-02-27 18:40:44 +09:00
72bc600be2
Revert "Verify the access to the mdnsd socket is blocked from Android U"
This reverts commit a7bc64ffcc.

Reason for revert: breaking tm-mainline-prod testsuit build

Change-Id: I38970fa9281f6f2e884e24680fccc86e269f6d7d

Yuyang Huang   authored and   Gerrit Code Review   commited 2023-02-24 05:19:52 +00:00
5c97d6c987
Verify the access to the mdnsd socket is blocked from Android U
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

Yuyang Huang   commited 2023-02-20 12:03:30 +09:00
a7bc64ffcc
Revert "Verify the access to the mdnsd socket is blocked from Android U"
This reverts commit 7cdfc9099f.

Reason for revert: b/269587343

Change-Id: I8e0fbc7148b14d0df60ecd51cfd83f93986594d1

Yuyang Huang   authored and   Gerrit Code Review   commited 2023-02-17 02:59:39 +00:00
655ef33946
Verify the access to the mdnsd socket is blocked from Android U
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

Yuyang Huang   commited 2023-02-16 11:17:31 +09:00
7cdfc9099f
Improve the dependency declaration for Net tests
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

Yike   authored and   Yike Zhang   commited 2022-09-06 09:15:07 +00:00
68e079183d
Add back compat config for NSD
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

Remi NGUYEN VAN   commited 2022-07-27 19:53:25 +09:00
348bbb0231
Merge "Use the same target SDK in ConnectivityCoverageTests and CTS."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-07-22 09:32:27 +00:00
c8263330f8
Use the same target SDK in ConnectivityCoverageTests and CTS.
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 Colitti   commited 2022-07-22 13:08:39 +09:00
cc5054bfe3
Do not depend on all of NetworkStack in CTS
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

Remi NGUYEN VAN   commited 2022-07-21 18:57:13 +09:00
418199230f
Create CtsNetTestCasesMaxTargetSdk31.
This APK will only run tests that require target SDK 31 or below.

Bug: 233553525
Test: test-only change
Change-Id: Ia86187de50107748d8053194d3f7a55b7947412e

Lorenzo Colitti   commited 2022-05-30 23:36:21 +09:00
9e61b82404
Changing target_sdk for CtsNetTestCasesLatestSdk
Bug: 233553525
Test: Presubmit

Changing target_sdk of or CtsNetTestCasesLatestSdk to 33 to match with apps target_sdk

Change-Id: Id786f64956d52307e15b3cd3feaa02d585e7623e

preranap   commited 2022-05-26 03:00:02 +00:00
7a1639ff5f
Merge "Conditionally disable TetheringApiCurrentLib"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-01-28 05:21:22 +00:00
2be7b1d5fb
Conditionally disable TetheringApiCurrentLib
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

Remi NGUYEN VAN   commited 2022-01-27 18:49:19 +09:00
f826bce37a
Add cts test suite in connectivity/cts deps
Test: atest CtsNetTestCases
Change-Id: Ib82b703145096a0b974aa602c7cdd505c333bca0

William Escande   commited 2022-01-20 17:52:03 +01:00
02fc79437b
Disable CtsNetTestCases if needed
Apply NetworkStackNextEnableDefaults to CtsNetTestCases to disable it
in branches where NetworkStackNext and related targets should not be
built.

Test: presubmit
Change-Id: I850b4294aa4c3c01f8871760185ca7fedc0f8584

Taras Antoshchuk   commited 2021-11-15 17:40:42 +01:00
bc3f86dfa3
Use ConnectivityCheckTargetPreparer in CTS
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

Remi NGUYEN VAN   commited 2021-10-28 15:15:53 +09:00
9c358cd831
Merge "Verify kernel implementation of AES-XCBC" am: ea56397997 am: 6c08a1824b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1503696

Change-Id: If6ce78835779e618678e0304e4a8e88d98fad481

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2021-06-15 09:32:24 +00:00
1082fd5b39
Verify kernel implementation of AES-XCBC
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

Yan Yan   commited 2021-06-11 11:35:12 -07:00
df24620850
Allow connectivity tests to use hidden APIs
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

Remi NGUYEN VAN   commited 2021-04-01 06:37:53 +00:00
eeeed136e0
Merge "Enable networking tests to be included in partial MTS files as well as full mts." am: 6f4d35119f am: 8266302ee7 am: 17eae52145
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1531141

Change-Id: Ic16ee449e5eec1e947ac215d5aa27845c0e2e675

Kimberly Kreider   authored and   Automerger Merge Worker   commited 2021-03-17 03:48:42 +00:00
38e41e4404
Merge "Enable networking tests to be included in partial MTS files as well as full mts." am: 6f4d35119f am: 8266302ee7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1531141

Change-Id: Id1fc29e6bfcc8422a2a2b8b0f609035b6ab9ae09

Kimberly Kreider   authored and   Automerger Merge Worker   commited 2021-03-17 03:07:27 +00:00
17eae52145
Merge "Enable networking tests to be included in partial MTS files as well as full mts."
Kimberly Kreider   authored and   Gerrit Code Review   commited 2021-03-17 02:23:54 +00:00
6f4d35119f
Merge "DO NOT MERGE: re-enable ConnectivityManagerTest in mainline-prod." into mainline-prod
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2021-03-02 00:22:34 +00:00
2d2be033e2
Merge "Make ConnectivityManagerTest use the API shims." am: c8761c98ae am: c7d509804b
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1611323

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib784ca6a840f4a89bb28f4930544ff9c6f37b82e

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-03-01 20:06:09 +00:00
68b7e0e0a4
DO NOT MERGE: re-enable ConnectivityManagerTest in mainline-prod.
Bug: 167645754
Ignore-AOSP-First: test is already enabled in AOSP
Test: atest CtsNetTestCasesLatestSdk passes on R device
Change-Id: I9677518a6a43bf3195e42ba21291a84846e31f14

Lorenzo Colitti   commited 2021-03-01 16:44:58 +09:00
79d2ee0317
Make ConnectivityManagerTest use the API shims.
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 Colitti   commited 2021-03-01 15:59:40 +09:00
8060dfed23
Disable CtsNetTestCases in mainline-prod.
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 Colitti   commited 2021-03-01 14:02:41 +09:00
b34ed63a36
Use unbundled version of BouncyCastle in Ike cts tests
Since BouncyCastle APIs provided by platform vary, use unbundled
BouncyCastle

Fixes: 180870458
Test: atest CtsNetTestCases
Change-Id: I78c053150bb9cf86173f869dd6e13e9a6917ffa7
Merged-In: I78c053150bb9cf86173f869dd6e13e9a6917ffa7

Daulet Zhanguzin   authored and   Lorenzo Colitti   commited 2021-02-25 20:42:59 +09:00
ac80a885b0
Temporarily stop compiling three CTS tests.
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 Colitti   commited 2021-02-25 20:42:55 +09:00
d3d4461f48
Use unbundled version of BouncyCastle in Ike cts tests
Since BouncyCastle APIs provided by platform vary, use unbundled
BouncyCastle

Fixes: 180870458
Test: atest CtsNetTestCases
Change-Id: I78c053150bb9cf86173f869dd6e13e9a6917ffa7

Daulet Zhanguzin   commited 2021-02-24 13:09:36 +00:00
bb540131b7
Make the CTS tests explicitly depend on modules-utils-build.
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 Colitti   commited 2021-02-24 05:43:36 +00:00
2be434ab12
Enable networking tests to be included in partial MTS files as well as
full mts.

Test: built locally and verified contents.
Bug: 170318013
Change-Id: Idea798841c067002d7b1f47da73a34052a8ab32c

Kimberly Kreider   commited 2021-02-22 14:59:54 -08:00
6413dd84cf
[LSC] Add LOCAL_LICENSE_KINDS to packages/modules/Connectivity
Added SPDX-license-identifier-Apache-2.0 to:
  Tethering/Android.bp
  Tethering/apex/Android.bp
  Tethering/bpf_progs/Android.bp
  Tethering/common/TetheringLib/Android.bp
  Tethering/tests/Android.bp
  Tethering/tests/integration/Android.bp
  Tethering/tests/mts/Android.bp
  Tethering/tests/privileged/Android.bp
  Tethering/tests/unit/Android.bp
  tests/cts/hostside/Android.bp
  tests/cts/hostside/aidl/Android.bp
  tests/cts/hostside/app/Android.bp
  tests/cts/hostside/app2/Android.bp
  tests/cts/hostside/certs/Android.bp
  tests/cts/net/Android.bp
  tests/cts/net/api23Test/Android.bp
  tests/cts/net/appForApi23/Android.bp
  tests/cts/net/jni/Android.bp
  tests/cts/net/native/dns/Android.bp
  tests/cts/net/native/qtaguid/Android.bp
  tests/cts/net/util/Android.bp
  tests/cts/tethering/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I8534c580f0e2a17be146300b67b3604817b64507

Bob Badour   commited 2021-02-16 04:09:58 -08:00
97e6be27f6
Merge history of CTS
BUG: 167962976
Test: TH
Merged-In: I30d52c4df571c894b7797300e8f56ddd4b2cc2dd
Change-Id: Id343f5a31604abfe70140343bffab20503cd2705

Baligh Uddin   commited 2020-11-09 02:17:15 +00:00
6a41dd4d8e