(mostly autogenerated, with minor tweaks to make it build)
Test: TreeHugger
Flag: EXEMPT mainline
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5a5ba231cb38886b9b681b4c08d89a18ad418f23
Maciej Żenczykowskicommited 2025-08-07 15:48:28 -07:00
EthernetTethering tests on auto devices are flaky waiting for RA. Increased timeout will give a more generous window to receive RA.
Flag: EXEMPT bugfix
Bug: 418010532
Test: atest android.net.EthernetTetheringTest#testLocalOnlyTethering --iterations 50
Test: atest android.net.EthernetTetheringTest --iterations 20
Change-Id: I6092ee805267a6d50fa2842d3131eeae544c3443
The failure is caused by a RA packet read race condition. The test
receives a callback that local-only tethering has started and
immediately begins listening for an RA. However, the system's RA daemon
may not have finished initializing.
The test's packet reader times out waiting for an RA and returns a null
packet. The waitForRouterAdvertisement then uses the null packet
checking for RA, causing NPE. Change modifies waitForRouterAdvertisement
to check if a packet is null before processing it.
Flag: EXEMPT bugfix
Bug: 418010532
Test: atest android.net.EthernetTetheringTest#testLocalOnlyTethering
Change-Id: Ic534c53766958ae48a82687a9bd6d09297f074f2
This class doesn't actually serve a purpose, it only makes
TestableNetworkCallbck more complex.
Test: CtsNetTestCases ConnectivityCoverageTests
Flag: EXEMPT test-only
Change-Id: I39a598b82a3215384bdfe04980f4b280ab2c2716
Currently, apps targeting V can see thread local network.
This change introduces a mechanism to make existing
apps unable to see non-thread local networks to ensure minimal
impact on existing devices and applications while adopting this
behavior. Apps targeting B+ Sdk and run on V+ devices can see
non-thread local networks.
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.CSLocalAgentTests \
--update-device
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server --update-device
(on next/trunk_staging release config)
Bug: 349487600
Change-Id: I6aa43cebc20a9017c2d8a8a90ebb1d53040a27bb
* 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
modules should specify the submodule of java_sdk_library that the module
actually depends on
Test: CI
Bug: 358613520
Change-Id: I0367068c901df98483f6cf95160d3e7801881b0a
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
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
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
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
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
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
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
* 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
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
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
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
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
Markauthored and Mark Chiencommited 2023-12-27 08:57:57 +00:00
Before making enableEthernetTethering a static function, make its
dependency variable static.
Bug: 254183718
Test: atest CtsTetheringTest
Change-Id: Id3781d67b3abc69b146fa704d4795bcfb2431a2a
Markauthored and Mark Chiencommited 2023-12-27 03:50:32 +00:00
The test doesn't explicitly call adoptShellPermissionIdentity anymore. Instead it use runAsShell everywhere. Remove the dead code.
Bug: 254183718
Change-Id: Ia949e0e315a3b3ae915752e95ef9fe896fdc0f5b
Test: TH
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
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
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
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
Markauthored and Mark Chiencommited 2023-07-27 16:04:28 +00:00
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 Chenauthored and Markcommited 2023-06-26 15:51:25 +00:00
Move all EthernetTetheringTest buildXXXPacket util into TetheringTester
and make them static public.
Bug: 259888307
Test: atest EthernetTetheringTest
Change-Id: Ice5252c1adfdb98dfaf815f48ac4603711317f65
Markauthored and Mark Chiencommited 2023-06-22 07:12:49 +00:00
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
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
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
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
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