Commit graph android_packages_modules_Co.../tests
Message SHA1
Remove NativeDaemonConnector relevant files
NsdService is using binder call to communicate with
mdnsresponder, so there is no one to use NativeDaemonConnector
now. Thus, remove NativeDaemonConnector relevant files.

Bug: 209894875
Test: atest FrameworksNetTests
Change-Id: Ic70d9417dc85c04c537e09d8f8586a762ac9a97b

paulhu   authored and   Paul Hu   commited 2022-04-12 07:35:31 +00:00
cee953bd09
Merge changes from topic "MDns_AIDL"
* changes:
  Use MDns aidl on NsdService
  Add MDnsManager

Paul Hu   authored and   Gerrit Code Review   commited 2022-04-07 02:06:35 +00:00
09475308b7
Merge "ConnectivityCoverageTests refactoring"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2022-04-07 01:22:17 +00:00
1ae9c4ad07
add OWNERS for connectivity_native_test
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibb7bcf272a2ff258d2518b60589ecb8e16823777

Maciej Żenczykowski   commited 2022-04-06 23:25:10 +00:00
189577cd8b
ConnectivityCoverageTests refactoring
ConnectivityCoverageTests is a combination of several test libs, which
are jarjared differently. It causes duplicated classes not to be counted
for coverage properly. Build the test suite directly and apply jarjar
only once on top of everything.

Bug: 227694415
Test: atest ConnectivityCoverageTests

Change-Id: I4350ebdbf98030944ec3857e1ef67d76f26c3b16

markchien   authored and   Remi NGUYEN VAN   commited 2022-04-06 19:35:28 +09:00
e59f5e36e5
Merge "Add test for Ikev2VpnProfile.getIkeTunnelConnectionParams"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-04-06 05:28:56 +00:00
ed714f4d17
Merge "data saver test exception for wear"
Andriy Naborskyy   authored and   Gerrit Code Review   commited 2022-04-05 23:46:28 +00:00
f900a64af4
Merge "Increase the temp-allowlist duration in tests"
Sudheer Shanka   authored and   Gerrit Code Review   commited 2022-04-04 21:39:03 +00:00
63ef37647e
Use MDns aidl on NsdService
- Use MDns aidl to communicate with mdns service and register
  event listener to receive callback.
- Remove all NDC relevant code on NsdService.
- Use MDns aidl on NsdServiceTest.

Bug: 209894875
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I65929dee3838fef753396e86c665abd66b6fec81

paulhu   commited 2022-04-04 15:18:27 +00:00
2b9ed95ae5
Merge "Merge EthernetServiceTests into FrameworksNetTests"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2022-04-04 08:02:04 +00:00
82ef475266
Increase the temp-allowlist duration in tests
It is possible there is a delay in app getting to
the background state and then initiating network
activity. We need the app to stay in the
temp allowlist until then.

Fixes: 227418169
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I6a98cc17a40cfb54bf3e12f51b5584159e69be0c

Sudheer Shanka   commited 2022-04-02 21:05:51 +00:00
5b63b6c107
Merge changes from topic "block_port"
* changes:
  Add connectivity_native_test to Presubmit
  Vendor AIDL interface for port blocking via eBPF

Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-04-01 21:46:37 +00:00
6de87582c1
Merge EthernetServiceTests into FrameworksNetTests
As per the TODO, merge EthernetServiceTests into the larger
FrameworksNetTests suite.

Similarly to NetworkStats, NSD or IpSec tests, the tests are also marked
as "non-connectivity-module-test", where "module" actually refers to
modules being built for release (from an S-based branch) today. This is
necessary as the tests and associated code cannot build without T APIs.

Also add FrameworksNetTests to presubmit as non-connectivity-module
tests are not run in presubmit without this.

Test: TH
Merged-In: Id533cdb4ac184b963f570af299dea04754ba88e9
Change-Id: I9950fcb49fdc2217134a59e993941cbe5da0b556

Remi NGUYEN VAN   commited 2022-04-01 15:12:18 +09:00
40da62da48
Remove connectivity-tiramisu-updatable-sources
The filegroup is now unnecessary as files are all in the service-t/src
directory.

This change allows building all sources including ethernet by
referencing src/**. This is done by using a general filegroup
service-connectivity-tiramisu-sources, so that branches that cannot
build the T+ code can change its contents without introducing merge
conflicts in the rest of the build rules.

Also change visibility rules to allow building the moved ethernet code,
and add a filegroup to allow building its tests.

Bug: 222234190
Test: TH
Merged-In: I770bf8db3f4c18467934eb2184f5dc2408fc28ec
Merged-In: I3e5df1bd44defbb9dd0c382c625a21e176368f2a
Change-Id: I8f23a45800b1086cc5a765fd24d734ca82c339a8

Remi NGUYEN VAN   commited 2022-03-31 15:14:39 +09:00
86bbfe9271
Merge history of opt/net/ethernet
Renamed files/directories:
java/ --> service-t/src/
tests/ --> tests/ethernet/
Android.bp --> (removed)
OWNERS --> (removed)
.gitignore --> (removed)

BUG: 222234190
TEST: TH
Merged-In: I770bf8db3f4c18467934eb2184f5dc2408fc28ec
Merged-In: I3e5df1bd44defbb9dd0c382c625a21e176368f2a
Change-Id: Ifc02784499d114e12d8ad64ba011dd23b97fb78b

Remi NGUYEN VAN   commited 2022-03-31 15:14:28 +09:00
e99dcfd4dd
Merge "Revert "Use RECEIVER_NOT_EXPORTED in CarrierPrivilegeAuthenticator.""
Michael Groover   authored and   Gerrit Code Review   commited 2022-03-31 01:39:28 +00:00
3e712761a4
Add test for Ikev2VpnProfile.getIkeTunnelConnectionParams
Bug: 226628416
Test: atest ctsNetTestCases
Test: atest CtsNetTestCasesLatestSdk in R/Q
Change-Id: Ie8f589f687946c863e1c2fd2afdf6665c719e581

Chiachang Wang   commited 2022-03-30 13:39:51 +08:00
1703c97098
Merge "Add @AppModeFull for those tests which will bind socket"
Lucas Lin   authored and   Gerrit Code Review   commited 2022-03-29 15:35:30 +00:00
fda6032eae
Add @AppModeFull for those tests which will bind socket
In instant mode, the test doesn't have permission to bind socket.
Add @AppModeFull to stop them running in the instant mode.

Bug: 225937472
Test: atest --instant CtsNetTestCases:NetworkAgentTest
Change-Id: Iccd3f3b1c8e8173eead12e4d0c6e3a9189d3746a

lucaslin   authored and   Lucas Lin   commited 2022-03-29 12:15:28 +00:00
0451366cd5
Merge "Don't throw in FullScore#policyNameOf."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-03-29 08:38:21 +00:00
644fe232cd
Don't throw in FullScore#policyNameOf.
This code is correct on userdebug builds, but it is dangerous on
user builds because proguard might strip out the POLICY_*
constants and that would lead to crashes.

For now just log a wtf if an invalid policy name is found. A
better solution would be to make MessageUtils robust to this
problem, e.g., by having it store the SparseArray internally and
providing getters that do not throw, instead of the current
behaviour that returns the SparseArray. That is left to a future
CL.

Fix: 227161413
Test: atest FullScoreTest
Change-Id: I68b69ee9dd84773018e62c9a8f43e754ae04c486

Lorenzo Colitti   commited 2022-03-29 08:38:06 +00:00
1727d9f1f2
data saver test exception for wear
WearOs should not be treated  as supporting Data Saver mode. Users
can not enable or disable the mode.

Data Saver is used on WearOs for battery improvements with LTE enabled
devices but should not block WiFi or Bluetooth PROXY networks.

Bug: 222086830
Test: run cts CtsHostsideNetworkTests
Change-Id: I8e76f7f9574c1ef2c1bd04ff0be652a74cd241f9
(cherry picked from commit cf709bbae312ad7cd0ffdf64af0a8ce23d8b1610)

Andriy Naborskyy   commited 2022-03-28 19:15:00 +00:00
1b35da1ccb
Merge "Add tests for VPN validation in NetworkMonitor"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-03-28 13:51:34 +00:00
59e6e2b730
Vendor AIDL interface for port blocking via eBPF
New Connectivity Service exposed to vendor for
restricting certain ports for use only in vendor.

Bug: 179733303

Change-Id: Iad9aff6924498ede5a08cfa5482082f094c0a90b

Tyler Wear   commited 2022-03-25 09:14:48 -07:00
b37f551287
Use Sources.bp for building
Reference Sources.bp from Android.bp, so that they are used as build
files.

Sources.bp is separate from Android.bp as it was migrated from the
Android.bp files in the old code location. They can be merged into the
main Android.bp file (or removed by removing the filegroups) after the
migration is done.

Also remove references to the AIDL filegroups, as files are now merged
into the common framework/aidl-export directory which is used as include
directory for aidl source generation already, so they do not need to be
referenced separately. framework/aidl-export can contain AIDLs for S-
API classes that became updatable API in T (the contents of
framework-t), as they are the same as any other API class for the
purposes of AIDL code generation: it's OK for any S+ code to reference
S+ API classes.

Finally, fix reference to mByteStream in IpConfigStoreTest. It was
already wrong but did not break the build because the test was not being
built in the old location.

Bug: 222234190
Test: TH
Merged-In: I81893df9f327abb84f1561b2b33027a2d23a4d65
Merged-In: I67c703e3f7aa9d5787f032a79ed62e45412baf4f
Change-Id: I9093f9ae2f9d76e597f20de48680e459891755b4

Remi NGUYEN VAN   commited 2022-03-25 14:58:43 +00:00
0395b70000
Merge history of ConnectivityT
Renamed files/directories:
ConnectivityT/service/Android.bp --> service-t/Sources.bp
ConnectivityT/framework-t/Android.bp --> framework-t/Sources.bp
ConnectivityT/framework-t/aidl-export --> framework/aidl-export
ConnectivityT/service --> service-t
ConnectivityT/framework-t --> framework-t
ConnectivityT/tests --> tests
ConnectivityT/OWNERS --> (removed)

BUG: 222234190
TEST: TH
Ignore-AOSP-First: Move with history done per-branch
Merged-In: I81893df9f327abb84f1561b2b33027a2d23a4d65
Merged-In: I67c703e3f7aa9d5787f032a79ed62e45412baf4f
Change-Id: I27a91f1a94f9d807f92762436f533c4b0d0114d5

Remi NGUYEN VAN   commited 2022-03-25 11:02:45 +00:00
700ffc994f
Merge "Move the DscpPolicy status constants and IntDef to NetworkAgent."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-03-25 08:03:38 +00:00
697c18376b
Move the DscpPolicy status constants and IntDef to NetworkAgent.
As requested by API council.

Also fix lint errors in the test.

Fix: 217366078
Test: existing tests modified in this CL
Change-Id: I8f7cd0e78bf29aeb52ec6a08a5d635d25fa2205d

Lorenzo Colitti   commited 2022-03-25 01:06:46 +09:00
fbe1576139
Merge "Rename destroyAndAwaitReplacement to unregisterAfterReplacement."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2022-03-24 14:45:09 +00:00
544226f701
Merge "Fixing multithreading issues in Ethernet Factory"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-24 14:06:39 +00:00
3ed2059b2d
Rename destroyAndAwaitReplacement to unregisterAfterReplacement.
Rename requested by API council.

Fix: 224764301
Test: existing CTS tests updated
Change-Id: Ibab9c9cd64bf0dde1e22705e81cff11d356fc719

Lorenzo Colitti   commited 2022-03-24 01:12:26 +09:00
a63e2341d6
Add cts for EthernetManager#getInterfaceList api.
Bug: 171872016
Test: atest android.net.cts.EthernetManagerTest --iterations
Merged-In: I95a21777689fd100ccf94982d3398418036b674f
Change-Id: I46a2b26ca1a5846523aed94bc9744e11daa39859

Xiao Ma   commited 2022-03-23 15:18:54 +00:00
715c8dba6e
Add global change ethernet state API
Provide a new API to enable or disable ethernet. Also have a listener
for call to check whether enable state is sucessful.

Bug: 171872016
Test: atest EthernetServiceTests

Change-Id: Iee4b48511ff668a2a7df90fd9bfe563d7ff23940
Merged-In: Iee4b48511ff668a2a7df90fd9bfe563d7ff23940

markchien   authored and   Mark Chien   commited 2022-03-23 13:43:38 +00:00
c0939b76f0
Add tests for VPN validation in NetworkMonitor
Test: New tests in this patch
      also FrameworksNetTests
Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk
Change-Id: I68aa5201ad94531e5a40999816844faef5531525

Chalard Jean   authored and   Chiachang Wang   commited 2022-03-23 11:19:44 +00:00
2f23fa51d8
Revert "Use RECEIVER_NOT_EXPORTED in CarrierPrivilegeAuthenticator."
This reverts commit 7569d51446.

Reason for revert: ag/17318348 moved the declaration of the protected-broadcasts from the telephony package to the platform's manifest, so a flag is no longer required when registering for these. In addition, ag/17307852 is syncing the behavior of unexported runtime receivers with that of manifest receivers by limiting the UIDs that can broadcast to these receivers to the root and system UIDs; with the RECEIVER_NOT_EXPORTED flag from this commit, these receivers would no longer be able to receive these broadcasts when sent from the telephony UID.

Bug: 225999840
Change-Id: Ifb15506434edabdfacf84c302881d0cf97d3add8

Michael Groover   commited 2022-03-23 02:04:57 +00:00
eef36c8917
Fixing multithreading issues in Ethernet Factory
IP client callbacks could be executed updating the state of an
ethernet interface even if they were no longer the callbacks for the
currently active interface. This can happen as IP client callbacks
were being called from a thread separate from ethernet.

Bug: 224890356
Test: atest EthernetServiceTests
atest CtsNetTestCasesLatestSdk
:android.net.cts.EthernetManagerTest --iterations 30

Change-Id: I238cb75caa01472bccc79db5bafa82bccdaeba52

James Mattis   commited 2022-03-22 07:41:27 -07:00
de503c5a44
Merge "Revert "Revert "Change network management listener to outcome re...""
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-22 10:00:08 +00:00
641bc0c4dc
Merge "ClatCoordinator: wrap clatd information"
Nucca Chen   authored and   Gerrit Code Review   commited 2022-03-22 08:40:15 +00:00
a59eec920c
Merge "Add executors to NsdManager"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2022-03-22 08:33:48 +00:00
b58df4bf13
ClatCoordinator: wrap clatd information
This is a preparation for accessing BPF program and map from existing
Java class. The new class ClatdTracker stores the clatd information
for forking clatd, accessing BPF maps and attaching BPF programs.
Using an object is easier to pass all required parameters and reuse
known resource.

Also refactor existing function and rename existing variables for this
commit.

Bug: 221213090
Test: atest FrameworksNetTests
Change-Id: I02ea889de89329c52710726fbcf1d2eac61707d7

Hungming Chen   commited 2022-03-22 15:20:17 +08:00
328d15271b
Merge "Extend timeout to deflake test"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-03-22 00:43:36 +00:00
f7c071b1c4
Merge "Fix OWNERS issues"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-03-21 10:51:57 +00:00
dc1832cd83
Extend timeout to deflake test
CaptivePortalLoginActivity may load the page slowly in lower
performance devices. Test expects the login page to be loaded
within 10s. The flaky happened sometimes since loading page
took 10+ seconds and failed the test.

Extend the timeout from 10s to 20s to deflake the test.

Bug: 225800341
Test: atest CaptivePortalTest
Change-Id: I98ab3dbc78cb95eeee95d1c86ab286600c98390b

Chiachang Wang   commited 2022-03-21 15:50:39 +08:00
81c2d99a77
Merge "Cleaning EthernetNetworkFactoryTest Unprovisioned"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-03-19 03:33:36 +00:00
d1bbbac0b2
Merge "Allow sending of Administrator UIDs for *NETWORK_STACK"
Benedict Wong   authored and   Gerrit Code Review   commited 2022-03-19 01:33:27 +00:00
0e75662808
Merge changes from topic "QosCallbackException"
* changes:
  CTS test for QosCallbackException
  Expose constructor of Exceptions.

Sewook Seo   authored and   Gerrit Code Review   commited 2022-03-19 00:35:28 +00:00
7a4fcf4ed1
Allow sending of Administrator UIDs for *NETWORK_STACK
This change allows callers with the NETWORK_STACK or
PERMISSION_NETWORK_STACK to receive administrator UIDs. This will be
used by the VCN to ensure that administrator UIDs are accurately
populated, ensuring that the ConnectivityDiagnostics are triggered for
the VCN.

Bug: 193204385
Test: atest ConnectivityServiceTest
Change-Id: I3ecfbef6847dcc78adac05d0229719c97e3a220c

Benedict Wong   commited 2022-03-18 21:52:57 +00:00
a5604ea50f
Merge "Setup permissions for SDK sandbox UIDs."
Martijn Coenen   authored and   Gerrit Code Review   commited 2022-03-18 13:35:51 +00:00
b643f2a356
Fix OWNERS issues
Switch to a bug template that assigns the correct group.

Consolidate into one file to make it easier for humans as well as
machines to figure out the ownership.

Remove me from per-file ownership; no longer relevant, causes
confusion.

Bug: 224454753
Test: Presubmit
Change-Id: I84bf472fe56fe3f5927a626bde06cdd8cee8353a

Alan Stokes   commited 2022-03-18 10:52:02 +00:00
eae2ff9831
CTS test for QosCallbackException
Adding CTS test coverage for Exceptions realted to QosCallback

Bug: 224059548
Test: atest CtsNetTestCases
Change-Id: Iccd1d3259961a6e4a841395175e215724895786e

sewookseo   authored and   Sewook Seo   commited 2022-03-18 10:44:31 +00:00
27447c526a