by marking programs as optional and providing appropriate stub implementations.
Test: TreeHugger
Bug: 181045068
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I021e7bcbfe4236242f517f067f89777fc08ecd8d
This is just a cut'n'paste reordering of programs.
Goal is to put rawip programs above ether ones.
This will enable next change to be easier to read.
Test: TreeHugger
Bug: 181045068
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Icebf4bf0505136e97b7b6950fb0b790582eb495e
framework-tethering-shared-srcs is named to
framework-connectivity-shared-srcs so update
source section to include correct file group.
Ignore-AOSP-First: changes in topic has conflicts in sc-dev
Bug: 177046265
Test: FrameworksNetTests
Change-Id: I81e2af0cc3b37af16b03c1288eb0591b7ed65cc4
Tests just need a specifier to verify general NetworkSpecifier
functionality. They can use EthernetNetworkSpecifier the same way they
use StringNetworkSpecifier.
To keep the tests passing on Q and R, add a CompatUtil class that will
keep creating StringNetworkSpecifiers (now removed) instead.
Bug: 179329291
Test: atest CtsNetTestCases
Ignore-AOSP-First: Must be merged manually downstream first
Change-Id: Ic6bf611ba36b555e4e0bb1bd3fa0053fe29dc8cf
The tethering code still depends on CONNECTIVITY_ACTION for
upstream selection. Make TestConnectivityManager send these
broadcasts.
Bug: 173068192
Test: atest TetheringTests
Change-Id: I6a32e99fafef9d6d2abec438ffc68164ab4c5bdf
This is required to build in mainline-prod, which does not have
access to in-progress S APIs.
Bug: 167645754
Ignore-AOSP-First: already in AOSP
Test: m NetworkStack CtsNetTestCasesLatestSdk CtsHostsideNetworkTests CtsHostsideNetworkTestsApp
Change-Id: I1f234454e1e5ac4aa4d8828a2fb192c4cd18add9
(cherry picked from commit 7246474dfd)
* changes:
Use TestConnectivityManager in TetheringTest.
Support building different UpstreamNetworkState test objects.
Change TetheringTest's UpstreamNetworkMonitor from mock to spy.
Make TestConnectivityManager usable by other tethering tests.
The changes required are:
- Change all usages of when(mCm.method()).thenReturn(...) to
doReturn(...).when(mCm).method() because spies must use the
latter syntax.
- In setDataSaverEnabled, set the mocked return value before
sending the broadcast. Otherwise, the first time the method is
called, the spy will attempt to send the broadcast, and will
crash because it does not have permission to do so.
This does not do anything useful yet, but it will be used in
future CLs.
Bug: 173068192
Test: atest TetheringTests
Change-Id: I968bfa76ead25b2d45ed1c0e8ede32df81401579
TetheringTest is only able to build UpstreamNetworkState objects
for mobile Internet networks. Support building wifi and dun
versions as well.
Bug: 173068192
Test: atest TetheringTests
Change-Id: Id46f1e5b65dbe04e84a5f56343821af260e2539e
This allows future tests that want to exercise the interactions
between Tethering and UNM to do so.
Also verify what happens when UNM is initialized, and in setUp,
capture the NetworkCallback it files to track the default
network, so tests can send it NetworkCallbacks. (This callback
is only ever filed once.)
Test: test-only change
Change-Id: Iff9b62120cced41cc61263bfd4fa34f575d0ac00
Currently, this class is a static inner class of
UpstreamNetworkMonitorTest. Extract it to its own top-level class
so it can be used by other tests.
Bug: 173068192
Test: atest TetheringTests
Change-Id: I6bdb090a99781ac2530b3924ac5c4cf78de315b0
Accessing @TestApis is only allowed for
debuggable APKs on release builds.
Fixes: 181594072
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Ignore-AOSP-First: Related CL http://ag/13615939 is not in AOSP yet.
Change-Id: I7777d70e3dc4217e7eb931060feb658d8943962a
It will map device ifindex to itself (but note that internally in the
kernel this is optimized into a map from ifindex to direct device
pointer), but only for xdp transmit capable devices (other devices
will not have an entry).
This will allow the use of bpf_redirect_map() from xdp tethering programs.
Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I29684e6761727d1115e9b4d75486eccbca3d5e33
Tests just need a specifier to verify general NetworkSpecifier
functionality. They can use EthernetNetworkSpecifier the same way they
use StringNetworkSpecifier.
To keep the tests passing on Q and R, add a CompatUtil class that will
keep creating StringNetworkSpecifiers (now removed) instead.
Bug: 179329291
Test: atest CtsNetTestCases
(note the merged-in clause is an unrelated change, used to avoid the
branch)
Merged-In: I8a6d7cf41c4bbc61cee1bb5570cee5bbeb85be49
Change-Id: Ic6bf611ba36b555e4e0bb1bd3fa0053fe29dc8cf