Commit graph

56,871 commits

Message SHA1
Merge "Ignore BPF tethering offload test if tether config is disabled"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-06-29 07:57:56 +00:00
dd9a89c2f2
Merge "Fix metrics doesn't work if multiple tethering requested"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-06-29 03:39:03 +00:00
b7c368c27f
Merge "Use import for testAndCleanup"
Chiachang Wang   authored and   Gerrit Code Review   commited 2022-06-29 00:53:47 +00:00
1108b129df
Merge "Increase max delay for Admin UID propogation"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-06-28 23:43:43 +00:00
07cadf26fa
Merge "Tethering: remove dead code"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-06-28 13:00:01 +00:00
abc0246c4f
Use import for testAndCleanup
Follow up work to remove the TODO since it's available in all
branches.

Test: ates VpnTest
Change-Id: I0830148e8577f98616f24d9ee4224496f51bd692

chiachangwang   authored and   Chiachang Wang   commited 2022-06-28 10:57:25 +00:00
337726529b
Fix metrics doesn't work if multiple tethering requested
There is a bug in TetheringMetrics that the on-going builders would be
cleared when creating new builder. This means if multiple tethering
created at the same time, only latest tethering would have metrics.

Bug: 153942334
Test: atest TetheringTests
Change-Id: I16a66790bc19072d8ffe570348bcbafa91263573

Mark   authored and   Mark Chien   commited 2022-06-28 10:31:02 +00:00
26cf9b6728
Tethering: remove dead code
changeInterfaceState only used in enableIpServing which always
pass STATE_TETHERED or STATE_LOCAL_ONLY state. Move it into
enableIpServing directly and remove unused code.

Test: m
Change-Id: I2d91115e588a153ddcb9d61f8e2bc09a09c52d48

Mark   authored and   Mark Chien   commited 2022-06-28 06:46:27 +00:00
133299a9b8
Merge "Add mdns files and unit tests"
Paul Hu   authored and   Gerrit Code Review   commited 2022-06-28 05:43:58 +00:00
57852487b8
Add mdns files and unit tests
- Put mdns code to service/mdns because we don't want to impact
  coverage for code that's not yet in use.
- Also fix some lint errors
  - Common typo errors
  - Lines longer than 100 characters
- Update IgnoreUpTo from S to SC_V2 because the tests should be
  ignored until T.

Bug: 232766079
Test: atest FrameworksNetTests
Change-Id: I19af3bf7ae004bd37960f2ad9014cf0c6a804c8d

Paul Hu   commited 2022-06-28 09:54:39 +08:00
3e1f4489bf
Merge "TestNetworkManager: add note on kernel version expectation"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-06-27 18:45:29 +00:00
21be776580
Merge "ethernet: skip test that uses TUNSETCARRIER on old kernels"
Patrick Rohr   authored and   Gerrit Code Review   commited 2022-06-27 18:04:37 +00:00
71de950b75
Merge "Removing automotive networking tests"
Filip Zakrzewski   authored and   Gerrit Code Review   commited 2022-06-27 13:43:00 +00:00
c57b60c2db
Ignore BPF tethering offload test if tether config is disabled
Needed because OEM can disable BPF offload by PRO.

Bug: 237144191
Bug: 236925089
Test: atest EthernetTetheringTest
Change-Id: Idf965caa44aeaae1f084d2c4fcd516a352c1b138

Hungming Chen   commited 2022-06-27 15:11:23 +08:00
b37f76f28e
Merge "Remove unused codes that was used in setChildChain"
Motomu Utsumi   authored and   Gerrit Code Review   commited 2022-06-27 05:44:50 +00:00
fd6a2d7c8c
Merge "Use java BpfMap in BpfNetMaps#setChildChain"
Motomu Utsumi   authored and   Gerrit Code Review   commited 2022-06-27 05:44:38 +00:00
bccf9df50e
Merge "Add API to get current firewall chain status"
Motomu Utsumi   authored and   Gerrit Code Review   commited 2022-06-27 05:43:46 +00:00
6421d8456c
Removing automotive networking tests
Bug: 235717579
Test: manual build
Change-Id: I084343c36d6e370c308994a8de230b07e628f10e

Filip   authored and   Filip Zakrzewski   commited 2022-06-25 02:59:18 +00:00
e6b2a04439
Remove unused codes that was used in setChildChain
Previous commit update BpfNetMaps#setChildChain to use Java BpfMap.
This commit remove the code that is no longer used due to the previous
commit.

Bug: 217624062
Test: atest BpfNetMapsTest android.net.cts.ConnectivityManagerTest#testFirewallBlocking
Change-Id: I02656096c8752daf20d3578f209778c5adae9b0c

Motomu Utsumi   commited 2022-06-24 09:11:58 +00:00
b1144d7671
Use java BpfMap in BpfNetMaps#setChildChain
Bug: 217624062
Test: atest BpfNetMapsTest android.net.cts.ConnectivityManagerTest#testFirewallBlocking

Change-Id: I13e96911eccd7d1d0545a156ddc2859bcaac09eb

Motomu Utsumi   commited 2022-06-24 09:11:58 +00:00
18b287d285
Add API to get current firewall chain status
This commit adds ConnectivityManager#getFirewallChainEnabled to read the
current firewall chain status

Bug: 208371987
Test: m
Change-Id: I1eadb69f953af5d031cd8dabde3e1f098cf0f4df

Motomu Utsumi   commited 2022-06-24 09:11:53 +00:00
be3ff1e923
Add test for startPptp
The test verifies arguments used to start the daemon

Bug: 201660636
Test: atest VpnTest
Change-Id: I0854fbeaf1a3e3554c157fde227a7bfa187b1013
Merged-In: I0854fbeaf1a3e3554c157fde227a7bfa187b1013

Remi NGUYEN VAN   authored and   chiachangwang   commited 2022-06-24 03:33:30 +00:00
522cea7d4e
TestNetworkManager: add note on kernel version expectation
Both setting the carrier up / down and creating an tun / tap interface
without carrier need TUNSETCARRIER to be present in the kernel.

Bug: 236783925
Test: documentation only change
Change-Id: Ie7f7d2c81c926adbc10b29b4b1748e47edaa4cb7

Patrick Rohr   commited 2022-06-23 09:30:25 -07:00
c924307408
ethernet: skip test that uses TUNSETCARRIER on old kernels
This change wraps the assumption in a function for better readability
and raises the minimum kernel version to 5.0 (that is when TUNSETCARRIER
was added).

Bug: 236783925
Test: atest EthernetManagerTest
Change-Id: Id84c793ccf2d02f77b3b398ae1ba717e6d12e7c9

Patrick Rohr   commited 2022-06-23 09:29:43 -07:00
e2e40d1379
Merge "Validate or set the eth specifier on update Iface"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-06-23 16:16:05 +00:00
85694dc277
Validate or set the eth specifier on update Iface
When a calling the updateInterface API, if no eth specifier was set it
would be removed not allowing follow-up network requests to request by
ethernet specifier.

This CL makes sure that the eth specifier is always set as expected when
updateInterface is called by either validating the input or setting the
specifier if the passed one is null.

Bug: 236294399
Bug: 229207021
Test: atest FrameworksNetTests
:com.android.server.ethernet.EthernetNetworkFactoryTest

Change-Id: Ic05ca7fe4adaa94f79e59758569f7595ab4c4f54

James Mattis   commited 2022-06-23 07:51:20 -07:00
59d98c07a7
Merge "Fix pro-guard rules for service-nearby"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-06-23 10:50:38 +00:00
f2ac559aa3
Fix pro-guard rules for service-nearby
(clean cherry-pick of downstream change)

Test: build and check classes in service-connectivity.jar.
Bug: 217115866
Merged-In: I9f7db4509bf8fe736f5d9fc08b164a20b2274aa8
Change-Id: Ia97b7ab645e3425780b335c699b57a6dc7589f2a

Chun Zhang   authored and   Remi NGUYEN VAN   commited 2022-06-23 16:31:56 +09:00
193797326e
Merge "Add wipeOnError flag to NetworkStatsRecorder"
Aaron Huang   authored and   Gerrit Code Review   commited 2022-06-23 06:14:42 +00:00
1934a82b52
Merge "Revert "connectivity_native_test: remove retries""
Steven Moreland   authored and   Gerrit Code Review   commited 2022-06-22 20:32:25 +00:00
749fd994f8
Revert "connectivity_native_test: remove retries"
This reverts commit ccde0db174.

Reason for revert: fails in mainline prod branch

Change-Id: Id26c44b9e9c68a259d3c82d67a5f4cea27569432

Steven Moreland   commited 2022-06-22 20:27:15 +00:00
5d0843b7f2
Merge "Skip testNetworkRequest_forInterfaceWhileTogglingCarrier on lower kernel version."
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-06-22 13:47:54 +00:00
198bea7f24
Skip testNetworkRequest_forInterfaceWhileTogglingCarrier on lower kernel version.
Notice this test case fails on device such as coral running with an
older kernel version(e.g. 4.14) that might not support ioctl new
argument. Run this test only with 4.19 kernel or above instead.

Bug: 236783925
Test: atest EthernetManagerTest on cf
Test: atest EthernetManagerTest on flame
Change-Id: I82c99ff4378868c7cbcef72632b06fb918d07a70

Xiao Ma   commited 2022-06-22 19:52:59 +09:00
1e34a57c28
Add wipeOnError flag to NetworkStatsRecorder
If reading data happens exception while doing data migration,
the file will be deleted by legacy recorders. This would cause
legacy persistent data being lost and cannot be retrieved by
any method. To avoid the files being deleted, add a wipeOnError
flag to recorder which indicates this recorder will wipe on
error or not . If the flag is set to true then deletes all files
when it throws, otherwise keeps all files.

(cherry-picked from ag/18910973)
Bug: 233828210
Test: FrameworksNetTests:NetworkStatsRecorderTest

Change-Id: Id7a3d8bebf8a00d814f9e84bf4c10d927e6ff749
Merged-In: Id7a3d8bebf8a00d814f9e84bf4c10d927e6ff749

Aaron Huang   commited 2022-06-22 17:37:51 +08:00
80767e64ef
Merge "Remove the package name from PermissionMonitor dump logs"
Paul Hu   authored and   Gerrit Code Review   commited 2022-06-22 08:36:23 +00:00
61abd8e56f
Merge "Fix linker error with upstream llvm"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-06-22 07:53:28 +00:00
ce11dc9a2d
Merge "Skip cts testFirewallBlocking in instant mode."
Motomu Utsumi   authored and   Gerrit Code Review   commited 2022-06-22 07:21:34 +00:00
172fae10d7
Increase fallbacks counter when comparison result is different
In current code, the fallbacks counter does not increase
when comparison result is different. This will not impact
how we print log.wtf but will impact the dry run process
for debugging in next every later boots.

Test: 1. NetworkStatsServiceTest
      2. manual test with script
Bug: 233752318
Change-Id: Ib152cec2ee0f21d59ccfe4669b31f26b3db71a97
Merged-In: Ib152cec2ee0f21d59ccfe4669b31f26b3db71a97
  (cherry-picked from ag/19005472)

Junyu Lai   commited 2022-06-22 11:01:13 +08:00
239b67a3cb
Disable comparison in user release builds
This CL disable the comparison mechanism introduced
in previous beta releases to stop receiving log.wtf signals
from beta users.

This CL only affects logging on user release builds.

Test: 1. NetworkStatsServiceTest
      2. manual test with script
Bug: 233752318
Change-Id: I7047106b1019c29460d6633b148f501ffa62f139
Merged-In: I7047106b1019c29460d6633b148f501ffa62f139
  (cherry-picked from ag/18869740)

Junyu Lai   commited 2022-06-22 11:00:17 +08:00
11e9887fa8
Disable fallback when comparison result is different
Follow-up from ag/18452103, where we add fallback code that runs
with the importer to make sure they are identical.
When the result is different, we'll take the result from fallback
code to minimize the rollout risk. However, since the OEMs might
change the importer implementation. The fallback code would no
longer valid and that makes OEM modified code not working. Hence
the fallback code must be disabled before release.

This change keeps comparison enabled for all cases to keep getting
signals from beta users. And will switch it to read overlay value
for OEM to debug their solution.

Test: 1. NetworkStatsServiceTest
      2. Test all datasets with script
Bug: 233752318
Change-Id: I869ff05297149bde6e13a204bd8c5a4fece75de0
Merged-In: I869ff05297149bde6e13a204bd8c5a4fece75de0
  (cherry-picked from ag/18849946)

Junyu Lai   commited 2022-06-22 10:59:10 +08:00
e72c849a61
Address comment at ag/18491259 and ag/18486388
Test: TH
Bug: 230289468
Change-Id: Id91fabb47b542d8526d6aa787b5947238c3934fb
Merged-In: Id91fabb47b542d8526d6aa787b5947238c3934fb
  (cherry-picked from ag/18579048)

Junyu Lai   commited 2022-06-22 10:57:38 +08:00
dbe8ddca71
Run comparison code if the data migration finished with fallback
If the data migration process runs finished with fallback,
that means we might get some unknown data that cannot be handled
by importing code.

If that happens, the CL runs the problematic code whenever device
boot-up but doesn't do the actual import process. This improves the
debuggability since the current log disappears after device reboot,
which will show up in every boot-up log after this CL.

Test: manual
Bug: 230289468
Change-Id: I6d117032d47f21c7cb49bbab916668058060f2f8
Merged-In: I6d117032d47f21c7cb49bbab916668058060f2f8
  (cherry-picked from ag/18491259)

Junyu Lai   commited 2022-06-22 10:36:22 +08:00
d451fdbb25
Persisting status int on the device if fallback happened
This CL also stop from incresing "successes" counter if the
importer finishes with fallback.

Test: manual
Bug: 230289468
Change-Id: I88fce1b2d0dea3772a8b31df8f8fa93bf13bffad
Merged-In: I88fce1b2d0dea3772a8b31df8f8fa93bf13bffad
  (cherry-picked from ag/18486388)

Junyu Lai   commited 2022-06-22 10:35:25 +08:00
079717052c
Merge "connectivity_native_test: remove retries"
Steven Moreland   authored and   Gerrit Code Review   commited 2022-06-21 23:03:09 +00:00
e1ae9fd469
Fix linker error with upstream llvm
https://reviews.llvm.org/rGd07ff995917 changed behaviour of lld and is
no longer accepting single dash `-error-limit`. Update to the new flag
format.

Test: presubmit
Change-Id: I7a78128c56157414411d085086091b9d25be0186

Yi Kong   commited 2022-06-21 19:45:01 +00:00
20a996e1e1
Merge "Verify VPN can handle network loss"
Yan Yan   authored and   Gerrit Code Review   commited 2022-06-21 17:36:22 +00:00
b3cfcc5c18
Skip cts testFirewallBlocking in instant mode.
Bug: 236662581
Test: aest  android.net.cts.ConnectivityManagerTest#testFirewallBlocking --instant
Change-Id: Ib8752439593dcd285146746b06b29f364e66ab85

Motomu Utsumi   commited 2022-06-21 06:02:01 +00:00
c4e6fcb6bc
Merge "Mark EthernetManagerTest as @ConnectivityModuleTest"
Treehugger Robot   authored and   Gerrit Code Review   commited 2022-06-20 11:38:00 +00:00
c2cbabf590
Merge "Fix validation URL flakes with DeviceConfigRule"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2022-06-20 08:29:10 +00:00
39e121cc88
Mark EthernetManagerTest as @ConnectivityModuleTest
The test will fail on T without an updated connectivity module, as it
uses new behavior implemented by a newer module version, such as
TestNetworkManager#createTapInterface(boolean, boolean).

Bug: 236558929
Change-Id: Ia74a31c8f7aabb4aae8eead5bba9f31cb7f2dd8d
Test: atest EthernetManagerTest

Remi NGUYEN VAN   commited 2022-06-20 06:55:56 +00:00
63ce27dd8d