Commit graph android_packages_modules_Co.../Tethering/tests/integration
Message SHA1
testTetherBpfOffloadUdpV4: disable on S/Sv2 with old DnsResolver
This mirrors the bpf_existence_test check:

https://source.corp.google.com/h/android/platform/superproject/main/+/main:packages/modules/Connectivity/bpf/tests/mts/bpf_existence_test.cpp;drc=0b477491fb95c04d908ef83d683c42db9102cf40;l=203


Bug: 401312619
Test: TreeHugger, atest EthernetTetheringTest
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I95020580655f8ff6b1e8c26bc3f26b4823716dd5

Maciej Żenczykowski   commited 2025-03-10 15:53:48 -07:00
bf2c498642
Introduce interfaceName field into TetheringRequestParcel
Bug: 340376953
API-Coverage-Bug: 365678805
Test: Presubmit
Test: atest EthernetTetheringTest
Test: atest TetheringTest
Test: atest NsdManagerDownstreamTetheringTest -b
Test: atest TetheringManagerTest -b

Change-Id: I8025cc2e238b8f9516bf18d8ea0253f1c58a05e6

Seungjae Yoo   authored and   Quang Anh Luong   commited 2024-12-05 08:14:10 +09:00
eab1de47f4
Rename TapPacketReader to PollPacketReader for broader applicability
* Renamed TapPacketReader to PollPacketReader to better reflect its
  functionality beyond TAP interface interaction.
* The class includes general logic for polling and sending packets to
  file descriptors, making it suitable for wider use cases.

Test: TH
Change-Id: Icdf9a9d7ef6f49b589ed9cdbd05159ab95e7e5d9

Yuyang Huang   commited 2024-10-15 13:42:05 +09:00
eb3c631b89
Make java_sdk_library dependencies explicit
modules should specify the submodule of java_sdk_library that the module
actually depends on

Test: CI
Bug: 358613520
Change-Id: I0367068c901df98483f6cf95160d3e7801881b0a

Jihoon Kang   commited 2024-09-10 00:01:31 +00:00
8401b6a9f0
Fix typo in EthernetTetheringTestBase
Bug: 361219545
Test: atest EthernetTetheringTest#testTetherClatBpfOffloadUdp
Change-Id: Ib1e48799f37b19390d304822ec55d5ad3615eaa5

KH Shi   commited 2024-09-06 06:33:32 +00:00
77f6a52083
Fix testTetherClatBpfOffloadUdp test failure
In some cases, the test device may already have an existing CLAT
interface, causing the test to fail because it assumes no CLAT
interface exists before running the test. This change fixes the issue
by retrieving the correct test CLAT interface by its name.

Bug: 361219545
Test: atest EthernetTetheringTest#testTetherClatBpfOffloadUdp
Change-Id: Ie2cdd9c9a6fd143c8419636a448297b36f3c1c40

KH Shi   commited 2024-09-05 07:08:16 +00:00
cf7e5cbf93
Add Fragmented Packet Test to testTetherClatBpfOffloadUdp
Extend testTetherClatBpfOffloadUdp to support fragmented IPv6 packets.
This verifies that downstream fragmented IPv6 UDP packets are
correctly processed by Clatd's BPF offload.

Bug: 285124667
Test: atest TetheringIntegrationTests
Change-Id: Id9c6cfac6fcedbc3615a5502e36851bff62e4dcc

KH Shi   commited 2024-07-08 09:58:08 +00:00
4add163b0c
Add testTetherClatBpfOffloadUdp to TetheringTest
Add a new test case to TetheringTest. It verifies upstream and
downstream UDP packets are actually processed by Clatd's BPF offload.

Bug: 285124667
Test: atest TetheringIntegrationTests
Change-Id: I2f0c3953499af7a701c1b7e72830d502efbd31a1

KH Shi   commited 2024-07-08 09:57:36 +00:00
2ab2a1b0b0
Move MtsEthernetTetheringTest back into TetheringTest
These were originally split in two, so low-level BPF could be changed
more easily. With the introduction of MCTS, updatability of CTS tests is
not a concern anymore, so these tests can be merged back together.

Test: atest TetheringIntegrationTests
Change-Id: Ia0bd91470d445e90230f7a9546de1cb56deef9cc

Patrick Rohr   commited 2024-07-03 14:30:54 +00:00
247e44b2ef
Remove unused import from EthernetTetheringTestBase
Bug: 285124667
Test: m
Change-Id: I9d89ae70ec7d4b52431f8bc992a7cdc1df85d202

KH Shi   commited 2024-06-21 01:57:14 +00:00
f093d22fcc
Increase timeout for waiting for physical interfaces to show up
200ms does not seem to be enough for our test infra. There have been test failures where tethering test was started on devices with physical interfaces that were available for tethering (i.e. cuttlefish on Android R and S).

This change increases the timeout to 1000ms, which unfortunately means the tests will take a bit longer.

Test: TH
Bug: 348044867
Change-Id: I5fe541cf1db1097040066baa73ba949533718ef6

Patrick Rohr   commited 2024-06-19 03:43:33 +00:00
88be5a3a3a
Inline runUdp4Test
runUdp4Test is only used from testTetherUdpV4, so it should be inlined.

Test: TH
Change-Id: I54451c4a707f576d3c5266d7ea8149a831c7cb07

Patrick Rohr   commited 2024-06-10 14:59:39 -07:00
462bd7efe9
Create a tethered interface request in setUp
This CL makes the TetheredInterfaceRequester a class member that gets
initialized (and therefore creates a tethered interface request) in
setup, and releases it again in tearDown. This ensures that when a test
interface is created, ethernet never puts said interface in client mode.

In a previous iteration of this test, there was a race where test
interfaces were briefly put in client mode, which started an IpClient on
the interface. One of the first things the IpClient startup code does is
enable IPv6 which causes RS and MLD packets to be transmitted. This
caused a lot of flaky test failures as the tests were not expecting to
see these packets (and they did not drain the interface appropriately).

Making the tethered interface request permanent during the runtime of
this test solves this issue. As a follow up, the test interfaces should
also be drained when first being passed to TetheringTester.

Test: atest EthernetTetheringTest --iterations 50 (-> there was one
flaky failure that is still being investigated).
Bug: 341800184

Change-Id: Ib0a2518b89d8cc05bb800db6ec5e31f527ba2daa

Patrick Rohr   commited 2024-06-10 14:59:39 -07:00
c06761b877
Merge "Move setupOnce from EthernetTetheringTestBase to EthernetTetheringTest" into main
Mark Chien   authored and   Gerrit Code Review   commited 2024-04-09 07:42:11 +00:00
01e091b1fb
Move setupOnce from EthernetTetheringTestBase to EthernetTetheringTest
If we want to get rid of the flakiness, we may need to change the
production code. You can find a more detailed analysis in
b/318121782/comment#4.

Here's a quick and easy alternative fix: just move setupOnce from
EthernetTetheringTestBase to EthernetTetheringTest. The flakiness
started when I added setupOnce into EthernetTetheringTestBase to
fix flakiness in EthernetTetheringTest.

Bug: 318121782
Test: TH
Change-Id: I0a6fb25773aa60872f71fe4b34e42a0b745a767f

Mark Chien   commited 2024-04-02 05:39:51 +00:00
54fa56def5
Merge "Separate Struct.java into its own lib." into main
Yang Sun   authored and   Gerrit Code Review   commited 2024-03-28 06:23:57 +00:00
68d68d82ed
Separate Struct.java into its own lib.
* Struct.java is removed from net-utils-device-common-bpf and
  net-utils-device-common-struct's source list
* Created a lib net-utils-device-common-struct-base for Struct.java
* Updated libs that require Struct.java to include
  net-utils-device-common-struct-base.
* Replaced net-utils-multicast-forwarding-structs with
  net-utils-device-common-struct in service-connectivity

Bug: 323503345

Test: build tethering module.
Change-Id: I3f60715c3d8043b7569db7612dee9d4fa1ccba59

Yang Sun   commited 2024-03-27 20:15:17 +08:00
3aa62e6773
[EthernetTetheringTest] Don't run setupOnce() if Ethernet is not
supported.

BUG: 323896172
Test: atest CtsTetheringTest

Change-Id: Ibb01d9783a480f0c4acc9385a04527b95ae15fbb
Signed-off-by: Weilun Du <wdu@google.com>

Weilun Du   commited 2024-03-19 21:24:46 +00:00
2881157a6d
Merge "Do not crash on failures in callbacks" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2024-03-15 09:17:09 +00:00
028bf79c22
Drop platform_apis from android_library
This property is a no-op for this module type.

Test: m nothing
Bug: 215379393
Change-Id: Ib13007e83c0a6263f36f009ba07407d6ccb50e00

Spandan Das   commited 2024-02-21 15:27:22 +00:00
e84353eaf3
Do not crash on failures in callbacks
Calling fail() in a callback not running in the test thread will crash
the test process, instead of failing the test.

This affects other tests as the whole process dies.

Avoid that by adding errors to a list, which is verified in tearDown().

Test: atest
Change-Id: I354352b61fb1909bcac519bf58d49b36e81c710f

Remi NGUYEN VAN   commited 2024-02-01 14:46:22 +09:00
62b3efbaf9
[DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5
Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5

Aditya Choudhary   commited 2024-01-31 12:34:50 +00:00
01b5ede2b2
Add reconnectCell util, refactor reconnectWifi
Add a utility to reconnect mobile data, and refactor toggleWifi to match
it.

The new reconnectWifi utils do not support turning wifi on and back off
anymore, but this was dead code as no test was using it (wifi is
supposed to be connected before starting tests).

Bug: 253698734
Test: atest
Change-Id: I2b8b8d186d05bb57c6a45d872febc54def8c6d59

Remi NGUYEN VAN   commited 2024-01-24 17:49:06 +09:00
4d4664d207
Start Ethernet tethering test once before testing
The first tethering test case might have a tethering restart when
handling IP conflicts. Currently, we start a hotspot once before
tethering, but the test is still flaky in Cuttlefish because it
doesn't support hotspots. Instead, we'll start ethernet tethering.

Bug: 254183718
Test: atest CtsTetheringTest
Change-Id: I695d4e1b3f961893bc30b3144faf7ad7d2d70574

Mark   authored and   Mark Chien   commited 2023-12-27 08:57:57 +00:00
2d0652a465
Make isInterfaceForTetheringAvailable and enableEthernetTethering static
Bug: 254183718
Test: atest CtsTetheringTest
Change-Id: Ie8bf908fc926a0b8b58559c8827951cbeaedc2c6

Mark   authored and   Mark Chien   commited 2023-12-27 08:57:48 +00:00
28b3ea4e06
EthernetTetheringTest: make some global variables static
Before making enableEthernetTethering a static function, make its
dependency variable static.

Bug: 254183718
Test: atest CtsTetheringTest
Change-Id: Id3781d67b3abc69b146fa704d4795bcfb2431a2a

Mark   authored and   Mark Chien   commited 2023-12-27 03:50:32 +00:00
1e6e272014
Remove unnecessary dropShellPermissionIdentity
The test doesn't explicitly call adoptShellPermissionIdentity anymore. Instead it use runAsShell everywhere. Remove the dead code.

Bug: 254183718
Change-Id: Ia949e0e315a3b3ae915752e95ef9fe896fdc0f5b
Test: TH

Mark Chien   commited 2023-11-07 08:25:53 +00:00
f05b4475cd
Extend tethering enable/disable timeout to 30 seconds
The dnsmasq in R might block netd for 20 seconds, which can also
block tethering enable/disable for 20 seconds. To fix this, changing
the timeouts from 5 seconds to 30

Bug: 289881008
Test: TH
Change-Id: Ibed5895b2831465d454854d7250fcc44183596e2

Mark   commited 2023-10-17 06:09:45 +00:00
bb6ecfcd58
Merge "Fix EthernetTetheringTest#testLocalOnlyTethering flaky" into main
Treehugger Robot   authored and   Gerrit Code Review   commited 2023-09-14 17:40:06 +00:00
47158c98b5
Add test for downstream tethering
Add end-to-end testing for testing NsdManager advertising and
discovering works fine with downstream tethering interfaces.

Bug: 281639507
Test: atest NsdManagerTest
Change-Id: I5a66423f216cfe0c82db5128502c885980ab264b

Yuyang Huang   commited 2023-09-12 17:53:37 +09:00
fca402abed
Fix EthernetTetheringTest#testLocalOnlyTethering flaky
The testLocalOnlyTethering only verifies whether an IPv6 RA
with a ULA prefix is sent out. If the test interface is killed
after the RA is sent out while the DHCP server is starting,
the error callback with exception is raised. RunDhcp
verification is used to ensure that DHCP server is started.

Bug: 286701571
Test: TH

Change-Id: Iccebcedbba7b2f9cd28bb1cc06af928ff8dfaaca

Mark   commited 2023-09-05 06:14:21 +00:00
801079f25a
Move ArpPacket.java to frameworks/libs/net
Bug: 281639507
Test: TH
Change-Id: I754c3581438d716d2156b80e4ce29b3f2adf76d4

Yuyang Huang   commited 2023-08-23 18:24:35 +09:00
5c2126ed38
Fix EtherentTetheringTest flaky
The first tethering test case may experience tethering restart
with IP conflict handling. Tethering would cache the last
upstreams so that the next enabled tethering avoids
picking up the address that is in conflict with the upstreams.
To protect subsequent tests, turn tethering on and off before
running them.

Bug: 254183718
Test: atest CtsTetheringTest
      atest MtsTetheringTestLatestSdk
Change-Id: I03729d3212a03bd9fcfe2c09cf327840f13b250c

Mark   authored and   Mark Chien   commited 2023-07-27 16:04:28 +00:00
f5e4b90ae2
Merge "Don't run EthernetTetheringTest if Ethernet is not supported"
Mark Chien   authored and   Gerrit Code Review   commited 2023-07-04 09:12:34 +00:00
df41b36fc9
Don't run EthernetTetheringTest if Ethernet is not supported
Bug: 288844185
Test: atest CtsTetheringTest
Change-Id: Ie918a0657ab17900437918f7ae99f7aa2539052c

Mark   commited 2023-07-03 09:25:18 +00:00
dc581e6c8f
EthernetTetheringTest: test RFC 7050 prefix64 discovery
Reply ipv4only.arpa AAAA query with Pref64::WKA for applying test
prefix64 to LinkProperties of test network.
See Nat464Xlat#setNat64PrefixFromDns.

Currently, the test prefix64 is applied directly in test network
initialization. In order to increase the NAT64 test coverage,
the integration test starts to reply prefix64 discovery DNS query
for testing the RFC 7050 prefix discovery.

These clat related tests are still expected to pass since this
prefix64 source change:
- testTetherClatIcmp
- testTetherClatUdp
- testTetherClatTcp

Bug: 259888307
Test: atest EthernetTetheringTest
Change-Id: Ic94ce997dd0b1d718a1074850c01ea90298cc1c3

Hungming Chen   authored and   Mark   commited 2023-06-26 15:51:25 +00:00
05ecb5c19e
Move buildXXXPacket methods into TetheringTester
Move all EthernetTetheringTest buildXXXPacket util into TetheringTester
and make them static public.

Bug: 259888307
Test: atest EthernetTetheringTest
Change-Id: Ice5252c1adfdb98dfaf815f48ac4603711317f65

Mark   authored and   Mark Chien   commited 2023-06-22 07:12:49 +00:00
4845823f48
Add NetworkStackModuleTest annotation on the specific test case.
EthernetTetheringTest#testTetherZeroLengthDhcpPacket requires the latest
NetworkStack module, otherwise, the test will fail due to the loss of
the fix. Apply @NetworkStackModuleTest to exclude this testcase from
target test suite CtsTetheringTestLatestSdk.

Bug: 283200648
Test: atest CtsTetheringTestLatestSdk
Change-Id: Iebfb043e2b71427a6feaf90788fe79b6ab6b678d

Xiao Ma   commited 2023-06-01 18:16:24 +09:00
161b70c587
Update the integration test to verify zero-length DHCP packet.
DHCP packet listener doesn't close socket any more upon receiving a
zero-length DHCP packet with a fix, instead, just ignore the zero-length
packet and continue reading. Also update the integration test logic to
verify the new behavior, i.e. we can send DHCPDISCOVER from a second device
with different mac address to verify the upstream DHCP server doesn't close
the listening socket, and then we will receive the response from server e.g.
DHCPOFFER packet.

Bug: 269692093
Test: atest TetheringIntegrationTests
Change-Id: I183da43ce5a6511714d293318fe6c60ea55999c0

Xiao Ma   commited 2023-05-15 13:27:16 +00:00
d5020111ce
Add an integration test to verify zero-length DHCP packet.
DHCP packet listener closes the listening socket and stops reading
packet upon receiving a zero-length DHCP packet, which will break
the following DHCP handshake. Add an integration test to verify the
current behavior. A follow-up fix will verify if DHCP server will
accept the zero-length DHCP packet and continue reading packet on
that socket.

Bug: 269692093
Test: atest TetheringIntegrationTests
Change-Id: I5990e37cdfad4e8e4337b0bb1a74632286884baf

Xiao Ma   commited 2023-04-28 10:06:54 +08:00
29e92df3f2
Fix testPhysicalEthernet failure for physical ethernet device
Other virtual interface ethernet test cases stop ethernet tethering
by deleting the virtual interface. To disable ethernet tethering for
testPhysicalEthernet, call stopTethering explicitly.

Bug: 271380398
Test: atest EtherentTetheringTest
Change-Id: I19a73f63227bab6a60d57d38b17a20a3f3f6c1d4

Mark   commited 2023-03-30 09:16:47 +00:00
2040551d18
EthernetTetheringTest: join handler thread after calling quitSafely
Somewhat surprisingly, HandlerThread#quitSafely is *not* a synchronous
method, so the tearDown() method still needs to wait for the thread to
join.

Test: TH
Change-Id: I4297ba057b3d4e67c7b462b6995da637f2479d42

Patrick Rohr   commited 2023-03-14 20:24:01 +00:00
68454864fc
Test: move getClatIpv6Address to common function
Share with EthernetTetheringTest and MtsEthernetTetheringTest

Bug: 258637850
Test: atest ConnectivityCoverageTests
Change-Id: I41daef082c30fdaafab44426ccaab4cb8b3297f3

Hungming Chen   commited 2023-02-21 23:00:51 +08:00
2adba0f717
Test: separate BPF tethering offload tests to MTS
Needed because CTS release interval is longer than mainline module
release. Newer mainline module release may change low level BPF
offload related code (struct, path, ..). The existing CTS will be
broken. This situation blocks that we want to change low level BPF
offload code after Android CTS has been public released.

The test targets have been changed as follows.
1. CTS/TetheringTests verifies high level tethering functions.
   No matter what data path is.
2. MTS verifies low level tethering functions. It can always test the
   latest BPF codes.

Change list:
1. Add class MtsEthernetTetheringTest for MTS.

Before:
  [base class]                      [derived class]

  EthernetTetheringTestBase +--+--+ EthernetTetheringTest

After:
  [base class]                      [derived class]

                               +--+ EthernetTetheringTest
  EthernetTetheringTestBase +--+
                               +--+ MtsEthernetTetheringTest (new)

2. Separate BPF tethering offload tests to MTS.
Before:
  - TetheringTests (19 tests)
  EthernetTetheringTest#testIcmpv4Echo
  EthernetTetheringTest#testIcmpv6Echo
  EthernetTetheringTest#testVirtualEthernet
  EthernetTetheringTest#testLocalOnlyTethering
  EthernetTetheringTest#testTetherConfigBpfOffloadEnabled
  EthernetTetheringTest#testTetherClatTcp
  EthernetTetheringTest#testTetherClatUdp
  EthernetTetheringTest#testIsUdpOffloadSupportedByKernel
  EthernetTetheringTest#testTetherClatIcmp
  EthernetTetheringTest#testTetherTcpV4
  EthernetTetheringTest#testTetherTcpV6
  EthernetTetheringTest#testTetherUdpV4
  EthernetTetheringTest#testTetherUdpV6
  EthernetTetheringTest#testStaticIpv4
  EthernetTetheringTest#testKernelSupportBpfOffloadUdpV4
  EthernetTetheringTest#testVirtualEthernetAlreadyExists
  EthernetTetheringTest#testPhysicalEthernet
  EthernetTetheringTest#testTetherUdpV4_VerifyBpf
  EthernetTetheringTest#testTetherUdpV4Dns

After:
  - TetheringTests (15 tests)
  EthernetTetheringTest#testIcmpv4Echo
  EthernetTetheringTest#testIcmpv6Echo
  EthernetTetheringTest#testVirtualEthernet
  EthernetTetheringTest#testLocalOnlyTethering
  EthernetTetheringTest#testTetherClatTcp
  EthernetTetheringTest#testTetherClatUdp
  EthernetTetheringTest#testTetherClatIcmp
  EthernetTetheringTest#testTetherTcpV4
  EthernetTetheringTest#testTetherTcpV6
  EthernetTetheringTest#testTetherUdpV4
  EthernetTetheringTest#testTetherUdpV6
  EthernetTetheringTest#testStaticIpv4
  EthernetTetheringTest#testVirtualEthernetAlreadyExists
  EthernetTetheringTest#testPhysicalEthernet
  EthernetTetheringTest#testTetherUdpV4Dns

  - MTS (4 tests)
  MtsEthernetTetheringTest#testTetherConfigBpfOffloadEnabled
  MtsEthernetTetheringTest#testIsUdpOffloadSupportedByKernel
  MtsEthernetTetheringTest#testTetherBpfOffloadUdpV4
  MtsEthernetTetheringTest#testKernelSupportBpfOffloadUdpV4

  Note that MtsEthernetTetheringTest#testTetherBpfOffloadUdpV4 is
  renamed from EthernetTetheringTest#testTetherUdpV4_VerifyBpf

Bug: 250552545
Bug: 258637850
Test: atest ConnectivityCoverageTests
Test: atest CtsTetheringTest
Test: atest CtsTetheringTestLatestSdk
Test: atest MtsTetheringTestLatestSdk
Test: atest TetheringIntegrationTests
Change-Id: Ica3b7008b33b1a0ddc5789d8ef12122a38544d57

Hungming Chen   commited 2023-02-15 18:37:17 +08:00
31eab2fd76
Test: rename CtsEthernetTetheringTest to EthernetTetheringTest
"Cts" prefix of test name may be confused in some test profiles
which are non-CTS tests. Ex: TetheringCoverageTests.

Bug: 250552545
Bug: 258637850
Test: atest EthernetTetheringTest
Change-Id: Ieacfa58f8ccc8de87fea2481801844acaf3f99d9

Hungming Chen   commited 2023-02-15 18:37:17 +08:00
2c4373f9b3
Test: rename EthernetTetheringTest to CtsEthernetTetheringTest
Bug: 250552545
Bug: 258637850
Test: atest CtsEthernetTetheringTest
Change-Id: I76e687fc46f89fcfce9049ac6736bb078df06ecc

Hungming Chen   commited 2022-12-06 15:46:23 +08:00
b58191dee8
Test: separate common methods to EthernetTetheringTestBase
This is a preparation for breaking down EthernetTetheringTest into
CTS and MTS tests.

Changes:
1. Separate common methods from EthernetTetheringTest
   to EthernetTetheringTestBase.
Before:
  EthernetTetheringTest

After:
  [base class]                   [derived class]

  EthernetTetheringTestBase +--+ EthernetTetheringTest

2. No test operation is changed.

Bug: 250552545
Bug: 258637850
Test atest EthernetTetheringTest

Change-Id: I36d205bf6f2a8145d5ac63c620af7528765b22ab

Hungming Chen   authored and   Nucca Chen   commited 2022-12-02 09:23:03 +00:00
40c9fe1165
Test: separate common variables to EthernetTetheringTestBase
This is a preparation for breaking down EthernetTetheringTest into
CTS and MTS tests.

Changes:
1. Separate common variables from EthernetTetheringTest
   to EthernetTetheringTestBase.
Before:
  EthernetTetheringTest

After:
  [base class]                   [derived class]

  EthernetTetheringTestBase +--+ EthernetTetheringTest

2. Separate EthernetTetheringTest from aosp/2319857

Bug: 250552545
Bug: 258637850
Test atest EthernetTetheringTest

Change-Id: I9bccc558dc8b955055a2927a1a600afd399b264f

Hungming Chen   authored and   Nucca Chen   commited 2022-12-02 07:18:43 +00:00
21308b5b2d
Test: decouple the tests which access class member variables directly
This is a preparation for breaking down EthernetTetheringTest into
CTS and MTS tests.

EthernetTetheringTest is going to separate test base class and
derived class. In order to encapsulate base class better, decouple
the following tests which access member variables directly.
- testStaticIpv4
- testLocalOnlyTethering
- testPhysicalEthernet
- testVirtualEthernet
- testVirtualEthernetAlreadyExists

Above tests change to use local veriables instead of class member
variables: mDownstreamReader, mDownstreamIface,
mTetheringEventCallback, mTetheredInterfaceRequester.

This can help to decouple the tests with class member variables and
these class member variables can be private in the
base class EthernetTetheringTestBase since the following commit.

Bug: 250552545
Bug: 258637850
Test atest EthernetTetheringTest

Change-Id: Ifd855571337b34c1dfee5cb2791369de754bc94d

Hungming Chen   commited 2022-12-01 18:54:23 +08:00
1dbc674e13
EthernetTetheringTest: remove isEthernetTetheringSupported
isEthernetTetheringSupported() has been not used since
using TetheringManager#isTetheringSupported in aosp/2143272.

Bug: 258637850
Test: EthernetTetheringTest
Change-Id: Ifc560613301393eeadb6df11688944b2dc629c35

Hungming Chen   commited 2022-11-17 10:59:33 +08:00
e28d70804d