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
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
This is needed due to BpfLoader v0.18 supporting more
functionality and thus bpf code compilation by default using
larger structs than it did during S.
Bug: 218408035
Test: booted on cuttlefish, atest CtsNativeNetTestCases
OBSigned-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0a37e59760fb0b55e6d6a6d12d5fd40106accd55
Maciej Żenczykowskicommited 2022-06-18 19:00:19 -07:00
Make use of new BpfLoader functionality: per-map/program selinux context
to further restrict access to mainline module shipped bpf maps and programs.
Bug: 218408035
Test: booted on cuttlefish, TreeHugger
Change-Id: Iaa33754aaca8bfafef6539abfbdd30b4cdfc4727
Maciej Żenczykowskicommited 2022-06-18 18:59:12 -07:00
This is a temporary thing for testing with framework/libs/net patch
that adds checks for V18 define.
This is very short term and will be reverted in the next topic,
that will make v0.18 the default.
Bug: 218408035
Test: booted on cuttlefish
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I22c414ebc64201db60eb872e0da0fea6c65eaede
Maciej Żenczykowskicommited 2022-06-17 16:13:56 -07:00
This reverts the previous commit.
This is no longer required as v0.18 is now the default.
Test: Treehugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I9331f27cf20e7932f6ef0e3829c27b6684dece59
Maciej Żenczykowskicommited 2022-06-17 16:13:56 -07:00
This commit also
- verifies that during network switch with MOBIKE
enabled, the cleanup task is scheduled upon network loss and
cancelled when new network is available.
- improves the retry tests to avoid waiting for actual timeout
Bug: 192077544
Test: atest VpnTest (new tests)
Change-Id: I5b47ba98116ac4523a36bc495e8788f29a9ecf20
According to the Android CDD, the connectivity bug report can not
include any kind of unser-installed package name. Thus, remove
the package name from PermissionMonitor dump logs.
Before:
2022-06-17T04:12:58.317509 - Package remove: name=com.android.\
frameworks.tests.net, uid=10092, nPerm=(NONE/NETWORK),\
tPerm=UNINSTALLED
2022-06-17T04:11:22.539777 - Package add: name=com.android.\
frameworks.tests.net, uid=10092, nPerm=(NETWORK/NONE),\
tPerm=INTERNET
After:
2022-06-17T12:45:00.430175 - Package remove: uid=10092,\
nPerm=(NONE/NETWORK), tPerm=UNINSTALLED
2022-06-17T12:44:56.144445 - Package add: uid=10092,\
nPerm=(NETWORK/NONE), tPerm=INTERNET
Bug: 235512126
Test: adb shell dumpsys connectivity to see the logs.
Change-Id: I9eb496a1b27575e6b5e84d289280a8e49d212020
* changes:
ethernet: add test that covers link up / down behavior
ethernet: add updateConfiguration support to EthernetManagerTest
ethernet: add support for enable/disableInterface in tests
ethernet: clean up HandlerExecutor usage in test
ethernet: address test review comments
ethernet: get MTU size directly from TestNetworkInterface
Patrick Rohrauthored and Gerrit Code Reviewcommited 2022-06-17 01:54:47 +00:00
Add unit tests for IKEv2 VPN setup and handling network change.
Bug: 192077544
Test: atest VpnTest (new tests)
Change-Id: Idd13a3ae57a521901c576bdd33ca0170e94be048
This eliminates the need for netd_updatable BpfHandler.cpp
to initialize the hash map with a zero.
On startup the map will be freshly initialized and thus zero.
On restart it might not be empty, but it doesn't matter to netd.
Furthermore the mainline component of the system server will
re-initialize it again anyway:
see service/native/TrafficController.cpp initMaps()
This does remove the ability to call deleteValue on a key,
since that would always return -EINVAL, but since we don't
currently do that, that's really a feature.
(It does suggest though that we should have a BpfMapNonNullable
class which is writeable, but without a deleteValue() function)
Additionally BpfMap arrays are more efficient for the kernel bpf jit
compiler, as - on newer kernels - it can optimize the read/write
into a simple memory access (as opposed to a bpf helper call).
Before:
$ adb shell ls -l /sys/fs/bpf/netd_shared/map_netd_configuration_map
-rw-rw---- 1 root net_bw_acct 0 2022-06-11 08:20 /sys/fs/bpf/netd_shared/ map_netd_configuration_map
After:
$ adbz shell ls -l /sys/fs/bpf/netd_shared/map_netd_configuration_map
-r--rw---- 1 root net_bw_acct 0 2022-06-16 15:03 /sys/fs/bpf/netd_shared/map_netd_configuration_map
Bug: 235590615
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I21730e4fa22fbf0c94ab0ca5c5db03aa000b7680
Maciej Żenczykowskicommited 2022-06-16 22:53:42 +00:00
Adds an outcome receiver and wraps the EthernetManager#enableInterface
and EthernetManager#disableInterface APIs.
Test: m -- test only change
Change-Id: I7064edda3ebbdd91e2bf28651fdf85b9a7cf2134