Commit graph android_packages_modules_Co.../tests/unit/Android.bp
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 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
Merge "Add test for EthernetNetworkUpdateRequest"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-03-09 09:16:29 +00:00
6758a5dfff
Add test for EthernetNetworkUpdateRequest
Test: atest EthernetNetworkUpdateRequest
Change-Id: I2aeacca81f07cf2d73814d20fc9e63e9f1a65843

Patrick Rohr   commited 2022-03-08 16:29:43 +01:00
30d33f4ee3
Merge "Remove unused libraries" am: e4848734a9
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2005450

Change-Id: I831ada348828d28c4abcd961932bdbb7c0c4ec07

Jean Chalard   authored and   Automerger Merge Worker   commited 2022-03-02 08:21:36 +00:00
fb73190bd6
Merge "Remove unused libraries"
Jean Chalard   authored and   Gerrit Code Review   commited 2022-03-02 07:48:51 +00:00
e4848734a9
Remove unused libraries
Test: m, TH
Change-Id: I59c0f8ecc94837635758c7667ea6413a5e6a7e81

Chalard Jean   commited 2022-03-02 14:32:38 +09:00
1f3e110ae6
Add JNI stats libraries to connectivity am: d95048929c
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1987449

Change-Id: Ibae3c96be03017135b9aff4caf6f3f5f1a86075a

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2022-02-28 06:26:45 +00:00
97edc959c2
Add JNI stats libraries to connectivity
Add new symbols to libservice-connectivity loaded on T only, and the
framework libraries to apex and tests.

Bug: 197717846
Test: atest FrameworksNetTests
  (cherry-picked and splitting apex Android.bp to aosp/1994130)
Change-Id: Iae44344701a3267110e5cbf271120201134d59e5
Merged-In: Iae44344701a3267110e5cbf271120201134d59e5

Remi NGUYEN VAN   authored and   Junyu Lai   commited 2022-02-28 04:16:17 +00:00
d95048929c
Merge sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I5894450f3089b2ea105722a18ddf8f1eed1c28a0
Change-Id: If2045705da821c90705f7dd1e6944c0bb92e3289

Xin Li   commited 2022-02-11 06:57:49 +00:00
a459e6a12d
remove unneeded inclusions of libbpf_android
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I6aedf507e09effd9076de85a0acc7aaf1b8e4a1e

Maciej Å»enczykowski   commited 2022-02-09 22:10:22 -08:00
11ab996252
Split out connectivity-t-pre-jarjar and tests
The pre-jarjar variant is necessary so that service-t can depend on
hidden symbols in framework-t that reference (for example as parameter)
classes that are jarjared.
Without this, when depending on framework-connectivity-tiramisu.impl,
service-connectivity-t would see post-jarjar symbols that do not match
the classnames it uses in its code.

Also split FrameworksNetTestsLib so that the same jarjar rules can be
applied between the tests and the module, avoiding different errors
between FrameworksNetTests and ConnectivityCoverageTests.

Ignore-AOSP-First: Avoiding conflicts; cherry-pick will follow
Bug: 204830222
Test: m
Change-Id: I3d0c081c4a7422e128beee11c0156f01b0377c96
Merged-In: I3d0c081c4a7422e128beee11c0156f01b0377c96

Remi NGUYEN VAN   authored and   junyulai   commited 2022-02-09 18:29:30 +08:00
2ba9dbe163
Allow using BpfMap and TcUtils in unit tests.
Create a Java library that allows the BpfMap class and the
TcUtils class to find their JNI code when they are jarjard to the
package name we use in our unit tests.

Test: atest ConnectivityServiceTest
Change-Id: I2f17b1c366b2b8164eac34b94c9659bc7c0f68e0

Lorenzo Colitti   commited 2022-01-27 10:18:35 +00:00
0c26c9ed37
Merge "[MS59.2] Add unit test for NetworkStatsDataMigrationUtils"
Junyu Lai   authored and   Gerrit Code Review   commited 2022-01-27 09:20:10 +00:00
bfdd0f3c3c
Set exclude_kotlinc_generated_files to false explicitly since kotlin reflection is used in some Connectivity test cases kotlin code.
Property "exclude_kotlinc_generated_files" is recently added to exclude some kotlinc generated files that are not needed if kotlin reflection is not used. Currently it defaults to false since there are test failures(b/213966211) which is in FullScoreTest#testToString and FullScoreTest#testMinMaxPolicyConstants that uses kotlin reflection and fails if exclude_kotlinc_generated_files defaults to true. By setting explicitly exclude_kotlinc_generated_files to false on tests like FullScoreTest#testToString, we will be able to finally default this property to true so the kotlinc generated files can be removed for most modules that don't need them.
Bug: 204888276
Bug: 213966211
Test: atest
FrameworksNetTests: com.android.server.connectivity.FullScoreTest
Change-Id: I4ed2d27c27841cb7127f669c8db34c90b4a41b1f

Wei Li   commited 2022-01-26 18:25:23 +00:00
8a177f694a
[MS59.2] Add unit test for NetworkStatsDataMigrationUtils
Test: atest NetworkStatsDataMigrationUtilsTest
Bug: 204830222
Change-Id: Ia6e8aec9a828072a2a1e63bec600c2e20d3699b3

junyulai   authored and   Junyu Lai   commited 2022-01-26 16:53:06 +00:00
a1bb3a36cd
Merge changes from topic "libnetworkstats"
* changes:
  Rename libnetdbpf to libnetworkstats
  Copy libnetdbpf from system/net to tethering module

Maciej Å»enczykowski   authored and   Gerrit Code Review   commited 2022-01-25 23:52:06 +00:00
e1f8ad4d59
Merge "[MS67.2] Modify tests for registerUsageCallback"
Junyu Lai   authored and   Gerrit Code Review   commited 2022-01-25 01:23:45 +00:00
3f9584bfda
[MS67.2] Modify tests for registerUsageCallback
Test: atest FrameworksNetTests
Bug: 204830222
Change-Id: Ia4ff535cd703807516d65b582727684cbb670360

junyulai   commited 2022-01-24 18:59:23 +08:00
f8a1d3e5e6
Rename libnetdbpf to libnetworkstats
Two reason for renaming:
1. Avoid module name collision in sc-mainline-prod branch.
2. The libnetdbpf was misnamed before.

Bug: 202086915
Test: atest libnetworkstats_test FrameworksNetTests
      ConnectivityCoverageTests FrameworksNetSmokeTests
      CtsAppOpsTestCases
Change-Id: I87fcf4b1a9d58780a45743a9aa91b9b936e54266

Ken Chen   commited 2022-01-24 11:53:59 +08:00
f426b2b287
Add unit test for BpfInterfaceMapUpdate
Bug: 215095957
Test: atest FrameworkNetTests

Change-Id: I92d45e5a606f466ce42504629cb3f87fd9e25d22

markchien   commited 2022-01-21 23:34:25 +08:00
adf119a8ed
Merge "Build framework-connectivity-tiramisu library"
Paul Hu   authored and   Gerrit Code Review   commited 2022-01-20 03:02:56 +00:00
a77cad355b
Merge "Rename libbpf to libbpf_bcc" am: e44ea016e1 am: 7bf5e61c37 am: 05d00b50fd
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1906032

Change-Id: Ia0bba1c182fe43b01126e88f86f97c9c09163e59

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-12-17 01:30:27 +00:00
e48a86422a
Merge "Rename libbpf to libbpf_bcc"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-12-17 00:37:05 +00:00
e44ea016e1
Build framework-connectivity-tiramisu library
- Move nsd APIs and build framework-connectivity-tiramisu library
- Add nsd associated hidden apis
- Build service-connectivity-tiramisu-pre-jarjar library for
  T+ services.
- Move ConnectivityServiceInitialiizer to service-t directory
  to create S+ service instances which can avoid dependency on
  lower sdk library.

Bug: 206893064
Test: atest FrameworksNetTests CtsNetTestCases
CTS-Coverage-Bug: 207804007
Merged-In: I9628716f5c38047ff4ea2346b27589077259c436
Change-Id: I9628716f5c38047ff4ea2346b27589077259c436

paulhu   commited 2021-12-17 00:04:24 +08:00
802ab9760f
Merge "[MS07.2] Move NetworkStatsCollection/IdentitySet into frameworks" am: 7577131341 am: a9656625d2 am: bb49fe4bef
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1895330

Change-Id: Id03f0efb4d052fd2da6bfd3d50bbb9a94cd299da

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-12-10 19:35:17 +00:00
23ec69be0f
[MS07.2] Move NetworkStatsCollection/IdentitySet into frameworks
These files are needed for the data migration util system Api
interfaces. Thus, they need to be moved into frameworks folder.

This change also set the @IgnoreUpTo annotation to S, since
these tests are testing purely platform code on S- devices which
is not really necessary for MTS. Also the tests are still covered
by the unit tests, since they are always verifying HEAD.

Test: TH
Bug: 197717846
Change-Id: I93c19b4860864c724be9f9f889ee2173f4605198

Junyu Lai   commited 2021-12-09 08:43:16 +00:00
e9710f0918
Rename libbpf to libbpf_bcc
This is to prevent a name collision with "upstream"
libbpf (external/libbpf) which is built using the same name.

Bug: 203823368
Test: m FrameworksNetTests
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I9a009493fe0482967ab1f92516514715cfd457d6

Connor O'Brien   commited 2021-12-07 23:05:24 +00:00
e0a64bb50c
Remove unused service and test dependencies am: f96ecf2708 am: e03f77170a am: 7d865f3e10
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1895317

Change-Id: I22260179985637d82e20b346786bed44148e5dc2

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-11-19 16:27:47 +00:00
d1ed21007a
Remove unused service and test dependencies
Nothing uses StateMachine in service-connectivity, and
FrameworksNetTestsLib pulled a lot of unused dependencies with
services.core and services.net.

Remove unused dependencies. This helps measure code coverage more
accurately.

Bug: 207020032
Test: atest ConnectivityCoverageTests
Change-Id: I39857865594a3263c4b1deeda23312c8e4f86a77

Remi NGUYEN VAN   commited 2021-11-19 21:14:39 +09:00
f96ecf2708
Merge "Enable/disable FrameworksNetTests" am: d1ed1cb8b7 am: 045f47bc31 am: 3820c8b69c am: c502fa51d4
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1843117

Change-Id: Ic342b4ecb4541c1e58200112dc5bc092b9ab8f2f

Aaron Huang   authored and   Automerger Merge Worker   commited 2021-10-04 08:46:40 +00:00
e75927b122
Merge "Enable/disable FrameworksNetTests" am: d1ed1cb8b7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1843117

Change-Id: Ida093c6792bed45d5f65e3ea0e567eb30de74807

Aaron Huang   authored and   Automerger Merge Worker   commited 2021-10-04 08:07:21 +00:00
045f47bc31
Merge "Enable/disable FrameworksNetTests"
Aaron Huang   authored and   Gerrit Code Review   commited 2021-10-04 07:53:09 +00:00
d1ed1cb8b7
Enable/disable FrameworksNetTests
Currently, there are some test for classes that are not in
connectivity module. If the platform code has a new change
that the test depends on it, then the test cannot verify the
behavior since the change does not exist in module branch.

This change moves the test for non-module classes out of
FrameworksNetTestsLib so that it doesn't go into coverage tests.
Then add those tests to FrameworksNetTests and use a variable
to enable/disable FrameworksNetTests which could minimize merge
conflicts.

Bug: 201265286
Test: make FrameworksNetTests

Change-Id: Ia9669da2c4d79054710e7f4173bc960e3f77f45a

Aaron Huang   commited 2021-10-01 19:29:50 +08:00
1ed8affa72
Modify Nsd{Service,Manager}Test to conform to its change
(clean cherry-pick from downstream branch)
Test: atest NsdManagerTest NsdServiceTest
Bug: 191844585
Merged-In: I3cf658498bef5755dcb01127a94fff913b6e6298

Change-Id: I3cf658498bef5755dcb01127a94fff913b6e6298

Luke Huang   authored and   Remi NGUYEN VAN   commited 2021-09-13 10:18:04 +09:00
df75378ad4
Merge "Remove unused libbacktrace library." am: f7e6b7f424 am: 341de04dee am: 1b8a6843d6 am: d577354b20
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1807719

Change-Id: I60ae26b6754657709c9acb1969640becb3707a5b

Christopher Ferris   authored and   Automerger Merge Worker   commited 2021-09-02 22:21:22 +00:00
a0d72de861
Merge "Remove unused libbacktrace library." am: f7e6b7f424
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1807719

Change-Id: I7781fb81bfe78760334c5cc9301da505b9202d8b

Christopher Ferris   authored and   Automerger Merge Worker   commited 2021-09-02 21:38:38 +00:00
341de04dee
Remove unused libbacktrace library.
Bug: 120606663

Test: Builds.
Change-Id: I733defd03670b01a30c4be5742498d62db7a9b6b

Christopher Ferris   commited 2021-08-24 15:57:29 -07:00
2b63a2f92a
Merge "Add overlay options for no internet notifications" am: 4f39cacbc3 am: aca228c07a am: f51a0ded84
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1782433

Change-Id: I77ab8f2aa7ae9a18d4f619c3905bc13084ab557f

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-08-04 08:08:43 +00:00
fdfa1572ff
Merge "Add overlay options for no internet notifications" am: 4f39cacbc3 am: aca228c07a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1782433

Change-Id: I87238b54c517a4efb11bca6e23cc2484b66f217e

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-08-04 08:08:20 +00:00
f51a0ded84
Add overlay options for no internet notifications
Add an option to display the no internet dialog directly instead of
showing a notification when the notification would have been high
priority (typically when the network was explicitly selected). This is
disabled by default, but allows device manufacturers to use a slightly
more disruptive UX to ensure that the user is aware that the network has
no connectivity, and can take action.

Also add an option to show the same notification as "no internet"
instead of the "partial connectivity" notification. This is also
disabled by default, but allows device manufacturers to use the "no
internet" text if they feel that "partial connectivity" text is hard
to understand for the user.

Bug: 193847396
Test: atest NetworkNotificationManagerTest
Change-Id: Ib5bd74d8cf973bf70d373dd63648c178fae0ebae

Remi NGUYEN VAN   commited 2021-08-04 11:23:03 +09:00
5dc6ca0318
Merge "Modify Nsd{Service,Manager}Test to conform to its change" into sc-dev am: 3c20df39d0 am: c504df3890
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15320525

Change-Id: I9cf3cc5a4cf661f9a4571934d3e26b15c7a96837

Luke Huang   authored and   Automerger Merge Worker   commited 2021-07-22 03:31:07 +00:00
37834ab195
Modify Nsd{Service,Manager}Test to conform to its change
Test: atest NsdManagerTest NsdServiceTest
Bug: 191844585
Change-Id: I3cf658498bef5755dcb01127a94fff913b6e6298
Ignore-AOSP-First: To avoid the side effect caused by automerger.

Luke Huang   commited 2021-07-21 08:02:26 +00:00
952a55c62d
Add connectivity coverage tests
The coverage tests will allow measuring code coverage for all
Connectivity+Tethering code.

This is a combination of the current TetheringCoverageTests, and
FrameworksNetTests.

Adding min_sdk_version to the test prevents it from using deprecated
IoUtils utilities. Replace it with the non-deprecated alternative.

Bug: 187935317
Test: atest ConnectivityCoverageTests
Original-Change: https://android-review.googlesource.com/1731232
Merged-In: I5366e1cc9cd6ddb41f24718246381cc2b1cc1383
Change-Id: I5366e1cc9cd6ddb41f24718246381cc2b1cc1383

Remi NGUYEN VAN   commited 2021-07-05 05:00:36 +00:00
168b3d19f1
Merge "Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests" into sc-dev
Victor Chang   authored and   Android (Google) Code Review   commited 2021-06-29 08:12:04 +00:00
e4132c8ca0
Partial cherry-pick to remove IoUtils#deleteContents usage in FrameworksNetTests
It's a partial cherry-pick of https://r.android.com/1731232

Bug: 154796679
eest: atest ConnectivityCoverageTests
Merged-In: I5366e1cc9cd6ddb41f24718246381cc2b1cc1383
Change-Id: I23565c4144e665130585a86ce66cee6c2da07b60

Remi NGUYEN VAN   authored and   Victor Chang   commited 2021-06-28 16:53:15 +01:00
819045fc60
Remove ConnectivityServiceTest signature perms use
To allow unit tests to run without platform certificates, remove
signature permission usage in ConnectivityServiceTest.

This mocks permission checks done in ConnectivityService for which the
test assumed that the permission was held, and mocks calls to
BatteryStatsManager. Calls to ActivityManagerService (through
PendingIntent) are done with shell permissions as the test uses real
PendingIntent mechanics.

Bug: 187935317
Test: atest FrameworksNetTests
Merged-In: If309d653ac2e9bbcf1b94bcee6336367289df359
Change-Id: If309d653ac2e9bbcf1b94bcee6336367289df359

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1736615

(cherry picked from commit 595dda3604)

Change-Id: Idb19b0f7cb87bb4d9de7a0b1a0e4128c2d6b9c6d

Remi NGUYEN VAN   authored and   Chiachang Wang   commited 2021-06-23 08:39:38 +00:00
ff55aeb916
Merge "Add connectivity coverage tests" am: cc79d7c0f8 am: 68114fe408 am: 3d25f6e8a7
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1731232

Change-Id: Ie9549d26fc4f1246e8959e326d2bd6f834bf222c

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-06-21 16:23:57 +00:00
b6bf25b91a
Merge "Add connectivity coverage tests" am: cc79d7c0f8 am: 68114fe408
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1731232

Change-Id: I6cc7f3a3abe97fccc59e14e77e99a0843f3363bb

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-06-21 13:56:37 +00:00
3d25f6e8a7
Merge "Remove ConnectivityServiceTest signature perms use" am: 54c7434f0d am: 96ad425c5e am: 595dda3604
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1736615

Change-Id: I7dd3c5e7da9097ebedd7f4a836d4e78ef9bf08e5

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-06-16 11:49:54 +00:00
4ca7a11543