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
Markauthored and Mark Chiencommited 2022-06-28 10:31:02 +00:00
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
Markauthored and Mark Chiencommited 2022-06-28 06:46:27 +00:00
- 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
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
This commit adds ConnectivityManager#getFirewallChainEnabled to read the
current firewall chain status
Bug: 208371987
Test: m
Change-Id: I1eadb69f953af5d031cd8dabde3e1f098cf0f4df
The test verifies arguments used to start the daemon
Bug: 201660636
Test: atest VpnTest
Change-Id: I0854fbeaf1a3e3554c157fde227a7bfa187b1013
Merged-In: I0854fbeaf1a3e3554c157fde227a7bfa187b1013
Remi NGUYEN VANauthored and chiachangwangcommited 2022-06-24 03:33:30 +00:00
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
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
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
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
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
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)
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)
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)
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)
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)
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
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