Commit Graph

4429 Commits

Author SHA1 Message Date
Nucca Chen
f8ed984e9c Merge changes Ie826477d,I5125a3ac
* changes:
  [CLATJ#26] ClatCoordinator: reword clatd starting failure logging
  [CLATJ#25] ClatCoordinator: stop clatd process gracefully
2022-01-26 14:50:11 +00:00
Hungming Chen
6fb21144b8 [CLATJ#26] ClatCoordinator: reword clatd starting failure logging
Bug: 212345928
Test: build
Change-Id: Ie826477d27db26cc49d113ec8bfacaaa3006e26e
2022-01-26 12:23:45 +00:00
Junyu Lai
30f06afda3 [MS78.2] Fix NetworkIdentity#Builder crashing on 5G NSA networks
Test: atest NetworkIdentityTest
Fix: 216193400
Change-Id: I00abc97a98dfdf17d5f0c2e6b45d28be9899c5c3
2022-01-26 07:53:57 +00:00
Maciej Żenczykowski
43f9729e90 Merge changes from topic "preparation_fork_clatd_from_system_server"
* changes:
  [CLATJ#24] ClatCoordinatorTest: add basic unit tests
  [CLATJ#23] Close the file descriptor manually
  [CLATJ#22] ClatCoordinator: stop clatd
  [CLATJ#21] ClatCoordinator: start clatd
2022-01-26 00:26:48 +00:00
Maciej Żenczykowski
e1f8ad4d59 Merge changes from topic "libnetworkstats"
* changes:
  Rename libnetdbpf to libnetworkstats
  Copy libnetdbpf from system/net to tethering module
2022-01-25 23:52:06 +00:00
Sooraj Sasindran
d8645e27c7 Merge "Add low latency and high bandwidth network capabilities" 2022-01-25 21:06:16 +00:00
Maciej Żenczykowski
e0904b5a12 Merge "adjust BpfCompatTest now that clatd & netd bpf program have been mainlined" 2022-01-25 19:07:13 +00:00
Maciej Żenczykowski
45f940a9ee adjust BpfCompatTest now that clatd & netd bpf program have been mainlined
The purpose of this test is to verify that the bpfloader related
stuff in the platform is compatible with mainline module bpf .o's.

To be more precise: the test is trying to check that platform/OEM
BPF programs (and, by implication, the platform/OEM bpfloader) have
a struct layout that is known, and thus that BPF programs shipped
in mainline modules will be compatible (with the OEM bpfloader).

(ie. basically this is trying to make sure that the vendor/oem
haven't made incompatible changes to the bpfloader parsed structs,
these can only be extended safely in aosp master)

Since clatd/netd.o have been moved to mainline they are no longer
a useful representation of the state of the platform side of things.
(we'd simply be testing that mainline is compatible with mainline,
which of course it is...)

As such we pick two other bpf .o files that are still shipped
as part of the platform.

Verified on cuttlefish via 'atest CtsNativeNetTestCases':
  x86 CtsNativeNetTestCases
  -------------------------
  CtsNativeNetTestCases (2 Test(s))
  [1/2] BpfTest#bpfStructSizeTestPreT: IGNORED (0ms)
  [2/2] BpfTest#bpfStructSizeTest: PASSED (0ms)

  Summary (Test executed with 1 device(s).)
  -------
  x86 CtsNativeNetTestCases: Passed: 1, Failed: 0, Ignored: 1, Assumption Failed: 0,

  All tests passed!

Note: it's not clear to me if this code can even ever be run on pre-T devices...
but I guess it shouldn't hurt.

Bug: 215718693
Test: atest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1b2d76e5ef95d8e4b94068f5525263653879d1f4
2022-01-25 19:06:51 +00:00
Sooraj Sasindran
f8eb713874 Add low latency and high bandwidth network capabilities
Bug: 194332512
Test: build
Change-Id: I415ca1ba90ea54c4106f806fe855bcb84d3e38ba
2022-01-25 09:35:30 -08:00
Junyu Lai
41483efa02 Merge "[DU09-1]Adding the NetworkStatsCollection Builder" 2022-01-25 16:44:16 +00:00
Junyu Lai
bc8328bda4 Merge "[MS68.2] Adapt NetworkPolicyManagerService to use registerUsageCallback" 2022-01-25 13:30:57 +00:00
Lorenzo Colitti
4e9ab4dde0 Merge "Add a simple test for ConnectivityService#dump." 2022-01-25 13:30:17 +00:00
Hungming Chen
358d582730 [CLATJ#24] ClatCoordinatorTest: add basic unit tests
Introduce ClatCoordinatorTest for unit tests of class ClatCoordinator.
Add the tests:
- testStartStopClatd
- testGetFwmark
- testAdjustMtu

Bug: 212345928
Test: atest FrameworksNetTests
Change-Id: I6908eac05b14077b450d51e1432d340c8a247eb1
2022-01-25 20:32:25 +08:00
Frank
c8856596c5 [DU09-1]Adding the NetworkStatsCollection Builder
The purpose is provide NetworkStatsCollection.Builder as
public API for adding the stats {@link NetworkStatsHistory}

Bug: 215862801
Test: atest NetworkStatsCollectionTest
Change-Id: Id83c6fa67880ba361b8e0e15c4d86b90e44ac879
2022-01-25 19:43:23 +08:00
Mark Chien
7586d33f22 Merge "Replace some netd calls in NetworkManagementService" 2022-01-25 03:34:54 +00:00
Mark Chien
f3cf7c00a6 Merge "Replace INetd#trafficSwapActiveStatsMap with ConnectivityManager API" 2022-01-25 03:34:14 +00:00
Junyu Lai
3f9584bfda Merge "[MS67.2] Modify tests for registerUsageCallback" 2022-01-25 01:23:45 +00:00
Maciej Żenczykowski
d512ec646c Merge "Add unit test for BpfInterfaceMapUpdate" 2022-01-24 19:05:28 +00:00
Sooraj Sasindran
0311ea0bc6 Merge "Add support for Multiple enterprise slice" 2022-01-24 16:26:03 +00:00
junyulai
0a007c248c [MS68.2] Adapt NetworkPolicyManagerService to use registerUsageCallback
This change also address comments at aosp/1958145.

Test: atest FrameworksNetTests
Bug: 204830222
Change-Id: I415d74df34caa91b1e1160478ebff30fbd1c7b6f
2022-01-24 22:12:42 +08:00
junyulai
f8a1d3e5e6 [MS67.2] Modify tests for registerUsageCallback
Test: atest FrameworksNetTests
Bug: 204830222
Change-Id: Ia4ff535cd703807516d65b582727684cbb670360
2022-01-24 18:59:23 +08:00
Ken Chen
f426b2b287 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
2022-01-24 11:53:59 +08:00
Junyu Lai
6d95db48d0 [MS56.2] Add unit test for NetworkStatsHistory#Builder
Test: atest NetworkStatsHistoryTest#testBuilder
Bug: 204830222
Change-Id: Id876340bcab7290d5e191dbdfcce7fb4d8ecf96c
2022-01-23 20:52:31 +08:00
Junyu Lai
84413a92c3 [MS65.4] Address comments at aosp/1954383
Test: atest NetworkIdentityTest#testBuilder
Bug: 204830222
Change-Id: I3d0f8175ee782c76839cbbdb5eb8a1219a61d874
2022-01-23 20:52:31 +08:00
Sooraj Sasindran
f4a58dcd45 Add support for Multiple enterprise slice
Bug: 194332512
Test: unit test
CTS-Coverage-Bug: 211133973
Change-Id: Ie8be08a7cfa9155168d1da146d02fd1643248bdc
2022-01-22 14:39:40 -08:00
Les Lee
c71f2d7425 wifi data usage: Update calling API name
Bug: 213387087
Test: atest -c NetworkTemplateTest
Test: atest -c NetworkStatsServiceTest
Test: atest -c FrameworksWifiApiTests
Test: atest -c NetworkPolicyManagerServiceTest
Change-Id: I6f65af5e2ff121a2fe5b2429d3eead01e434f8be
Merged-In: I6f65af5e2ff121a2fe5b2429d3eead01e434f8be
2022-01-23 00:07:02 +08:00
Sooraj Sasindran
a2e98bdc1a Merge "Ability to specify which all applications fall under enterprise slice." 2022-01-21 16:01:44 +00:00
markchien
adf119a8ed Add unit test for BpfInterfaceMapUpdate
Bug: 215095957
Test: atest FrameworkNetTests

Change-Id: I92d45e5a606f466ce42504629cb3f87fd9e25d22
2022-01-21 23:34:25 +08:00
markchien
f243be2267 Replace some netd calls in NetworkManagementService
This is the corresponding test change with netd usage replacement
in NetworkManagementService.

Bug: 209935649
Test: atest NetworkManagementServiceTest

Change-Id: Id25f2d7d291eef7c8bb12a7fcf67b1619cce6da5
2022-01-21 17:49:29 +08:00
Junyu Lai
7f3f9c1be0 Merge "[MS65.2] Add unit test of NetworkIdentity#Builder" 2022-01-21 09:36:08 +00:00
Sooraj Sasindran
499117f279 Ability to specify which all applications fall under enterprise slice.
Bug: 194332512
Test: unit test
Change-Id: I94549a41aaa717add22b0a3e5035beacf6f1b8f2
2022-01-21 01:05:12 -08:00
Frank Li
413a3b1306 Merge "[DU03-2]Remove INetworkStatsService from BatteryStatsImpl" 2022-01-21 08:15:25 +00:00
markchien
daf30ef9a8 Replace INetd#trafficSwapActiveStatsMap with ConnectivityManager API
This is the corresponding test change with INetd#trafficSwapActiveStatsMap
usage replacement.

Bug: 209935649
Test: atest NetworkStatsFactoryTest
Change-Id: Ic5e29f6a928c4230322ed658fe8ddbd71d7ea56a
2022-01-21 16:02:26 +08:00
Treehugger Robot
38276f1b9c Merge "Add cts test suite in connectivity/cts deps" 2022-01-21 07:36:08 +00:00
Lorenzo Colitti
513180aae8 Merge changes from topic "connectivity-mainline-presubmit-defaults"
* changes:
  Add java defaults for mainline-presubmit as well.
  Run bpf_existence_test in mainline-postsubmit.
2022-01-21 07:07:41 +00:00
Chiachang Wang
b04664d7a6 Merge "Update the SDK for the tests with intended target in T+" 2022-01-21 06:34:29 +00:00
William Escande
02fc79437b Add cts test suite in connectivity/cts deps
Test: atest CtsNetTestCases
Change-Id: Ib82b703145096a0b974aa602c7cdd505c333bca0
2022-01-20 17:52:03 +01:00
Junyu Lai
e9c4988632 [MS65.2] Add unit test of NetworkIdentity#Builder
Test: atest NetworkIdentityTest#testBuilder
Bug: 204830222
Change-Id: Ie0d56821608c881c3bffe224cfe240fa900c6f39
2022-01-20 15:58:30 +00:00
Junyu Lai
56f4a9c3d1 [MS57.2] Prepare APIs for data migration utility
Test: atest NetworkStatsHistoryTest#testBuilder
Bug: 204830222
Change-Id: I938c3ed50eea0f2349ea92c3824c637eaa77d328
2022-01-20 15:06:50 +00:00
Junyu Lai
7372824eca [MS41.2] Add unit test for query history APIs
Test: atest NetworkStatsServiceTest NetworkStatsManagerTest
Bug: 204830222
Bug: 200768422
Change-Id: I1dce7d671c5524496e0451665f62447ef6e454ae
2022-01-20 15:06:50 +00:00
Lorenzo Colitti
ab4c64329b Merge "Move LocalSocketTest out of packages/modules/Connectivity." 2022-01-20 09:43:04 +00:00
Aaron Huang
ccdf2a5838 Merge "Add unit test for NetworkStats iterator" 2022-01-20 04:09:00 +00:00
Paul Hu
a77cad355b Merge "Build framework-connectivity-tiramisu library" 2022-01-20 03:02:56 +00:00
Chiachang Wang
7212fbee14 Update the SDK for the tests with intended target in T+
Correct the SDK for those tests are expected running in T+
device. Check @IgnoreUpTo(S) may be incorrect after receiving
patches before T release.

Refer to temporary constant definition in DevSdkIgnoreRule until
the SDK constant being pushed into AOSP and synced with branch
used for mainline.

BUg: 215294242
Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk
Change-Id: Ide6a241f7944dd1e75bc33b21aa29471a5df94c6
2022-01-20 10:30:19 +08:00
Frank
9ef027c2f5 [DU03-2]Remove INetworkStatsService from BatteryStatsImpl
Correct the NetworkStatsServiceTest

BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.

Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
            MobileRadioPowerCalculatorTest NetworkStatsServiceTest
CTS-Coverage-Bug: 213437796
Change-Id: I47dc377a5cce7d8a0029dc808ad0f46e651764b1
2022-01-20 00:15:55 +08:00
Aaron Huang
2ae5921bc8 Add unit test for NetworkStats iterator
Bug: 210073043
Test: this
Change-Id: I2bcd80627c31e94ac040dbb4e7d38561d8f4c229
2022-01-19 17:10:44 +08:00
Remi NGUYEN VAN
6c232e9b49 Merge "Mark connectivity module tests as such" 2022-01-19 06:49:39 +00:00
Remi NGUYEN VAN
0ac9163620 Merge "Do not verify field count in tests used in CTS" 2022-01-19 06:49:28 +00:00
William Escande
5fd2c7033a Move LocalSocketTest out of packages/modules/Connectivity.
This test is testing non-updatable code in frameworks/base, so it should
not live in packages/modules/Connectivity.

Test: treehugger
Change-Id: Ifdefeeca0190d27e98f687446f984dcc711a8c55
2022-01-19 04:03:26 +00:00
Chiachang Wang
af7c44cc4e Add missing DevSdkIgnoreRule rule variable
DevSdkIgnoreRule.IgnoreUpTo() will not work as expected without
the rule defined.

Bug: 184750836
Test: atest android.net.Ikev2VpnProfileTest#\
      testBuildExcludeLocalRoutesSet works as expected with ignore
      rule
Change-Id: I03a5b28963cd6feebe4358d57c070d941cd114e5
2022-01-18 11:25:03 +00:00