- Feb 21, 2024
-
-
Spandan Das authored
This property is a no-op for this module type. Test: m nothing Bug: 215379393 Change-Id: Ib13007e83c0a6263f36f009ba07407d6ccb50e00
-
- Jan 31, 2024
-
-
Aditya Choudhary authored
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 (cherry picked from https://android-review.googlesource.com/q/commit:a8ac702eb268d687d089ba218926ae6b17cda33c) Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5 Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5
-
Aditya Choudhary authored
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 (cherry picked from https://android-review.googlesource.com/q/commit:a8ac702eb268d687d089ba218926ae6b17cda33c) Change-Id: I243f17b3f0ad7af9ffa15ca242456e36688733f5 Merged-In: I243f17b3f0ad7af9ffa15ca242456e36688733f5
-
Aditya Choudhary authored
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
-
- Jan 24, 2024
-
-
Remi NGUYEN VAN authored
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
-
Maciej Żenczykowski authored
Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I7cef2b19f55e6e056b46bb1b28f85c7f7376f6f4
-
- Jan 23, 2024
-
-
Mark authored
The logic is currently disabled by default, adding a flag so that we can compare result with A/B rollout. Tethering only read this flag once when it is created. Bug: 319212113 Test: atest TetheringTests Change-Id: I656b0389e56d29dd691738ee3abfa6418746846f
-
- Jan 22, 2024
-
-
Mark Chien authored
This reverts commit cf11be9e. Reason for revert: avoid some IpServer(s) running the new sync state machine while others use the async state machine. Bug: 319212113 Change-Id: Ib086a7ccd102f38e579c79f94aceae9971f1853a
-
- Jan 10, 2024
-
-
Junyu Lai authored
This change includes: 1. Refactor the logic in Tethering#dump into utils class. 2. Move the utils class to a common place which could be referenced from other sub-modules. 3. Add @MonitorThreadLeak annotation to enforce there is no thread leak problem. Test: atest FrameworksNetTests NetworkStaticLibTests Test: atest ConnectivityCoverageTests:com.android.networkstack.tethering.TetheringTest#testDumpTetheringLog Test: adb shell dumpsys tethering (with hardcoded exception) Fix: 312669345 Change-Id: Ia6fdfeeec2110afa0ec9e056e9db3843748845c3
-
- Dec 27, 2023
-
-
Mark authored
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
Bug: 254183718 Test: atest CtsTetheringTest Change-Id: Ie8bf908fc926a0b8b58559c8827951cbeaedc2c6
-
Mark authored
Before making enableEthernetTethering a static function, make its dependency variable static. Bug: 254183718 Test: atest CtsTetheringTest Change-Id: Id3781d67b3abc69b146fa704d4795bcfb2431a2a
-
- Dec 12, 2023
-
-
Mark authored
The logic is currently disabled by default, adding a flag so that we can compare result with A/B rollout. Test: atest TetheringTests Change-Id: If640b9a172b97aa67c49b2976cdef118218f1e0f
-
- Dec 08, 2023
-
-
Mark Chien authored
Calling resets at the beginning of setUp is unnecessary. Bug: 315368147 Test: TH Change-Id: I87030bc867d90752e745fd4a274581d1f3230f85
-
- Dec 04, 2023
-
-
Mark authored
This fix the code review comment from aosp/2319853 that getXXX functions should be renamed to makeXXX because it's actually creating the object. Test: TH Change-Id: Ife8e1cc3a90b835764a2dd9731388b05d8a5c964
-
- Nov 28, 2023
-
-
Mark authored
Currently, PrivateAddressCoordinator always selects the /24 prefix from the 192.168.x.x/16 range first. If the upstream is also a /24 prefix in the 192.168.x.x/16 range, there's a 1/256 chance of a conflict (192.168.0.x/24 ~ 192.168.255.x/24). Since 192.168.x.x/16 is a popular range for home and small business networks, we should randomize the starting prefix range to reduce the chance of a conflict. The /8, /12, and /16 range selection rates are 0.39%, 5.86%, and 93.7%, respectively (see the inline comments for how the rates are calculated). The chance of selecting a /24 prefix is: - 10.0.0.0/8: 1/(256*256) * 93.7% = 0.001429% - 172.16.0.0/12: 1/(16*256) * 5.86% = 0.00143% - 192.168.0.0/16: 1/256 * 0.39% = 0.001523% Note: This change is currently turned off by the tether_force_random_prefix_base_selection flag. We'll run experiments to make sure tethering stays reliable with this change enabled. Bug: 312647670 Test: atest TetheringTests Change-Id: Iea03fdcf0fccad95410e79ae87fcb046d75da457
-
- Nov 21, 2023
-
-
Mark authored
Instead of passing state machine to UpstreamNetworkMonitor, wrapped it by an interface would have two benefits: 1. Easier for testing. 2. Isolate state machine operation in callback. Test: atest TetheringTests Change-Id: I2a97fd5cbc8c49df8c3c98428c6570916ab31ea5
-
- Nov 20, 2023
-
-
KH Shi authored
1. assertEquals syntax is (expected, actual) and not the other way around 2. use assertArrayEquals to compare arrays Test: atest TetheringTests Bug: 312072637 Change-Id: I5eb0c270323253f648d3a8fd488506b9ad1ca6a1
-
KH Shi authored
TetherUpstream6Key#src64 should be stored in network order. Use a big-endian ByteBuffer to retrieve a value stored in network order is actually converts it into native order, which is little-endian in Android. In this CL, we changed it to use byte[] instead of long to store the top 64-bits of the source prefix. Test: atest TetheringTests manual test with IPv6-only tethering upstream, check BPF stats. Bug: 312072637 Change-Id: I79f9282d5eda28328aa6a764ea92b086d6285133
-
- Nov 13, 2023
-
-
KH Shi authored
ArraySet is designed to be more memory afficient than HashSet. It is suitable to store small numbers of items. Test: atest TetheringPrivilegedTests TetheringIntegrationTests \ TetheringTests Bug: 261923493 Change-Id: I2bd2eded801cc05ce53ef9f9486b13faf1772d22
-
- Nov 07, 2023
-
-
Mark Chien authored
The test doesn't explicitly call adoptShellPermissionIdentity anymore. Instead it use runAsShell everywhere. Remove the dead code. Bug: 254183718 Change-Id: Ia949e0e315a3b3ae915752e95ef9fe896fdc0f5b Test: TH
-
KH Shi authored
Preparing for refactor of IpServer and BpfCoordinator. All BPF related code are planned to migrate from IpServer to BpfCoordinator. This CL moves BPF related tests from IpServerTest to BpfCoordinatorTest first. Test: atest TetheringTests Bug: 294025403 Change-Id: I000f27c463368202dbbe2ace188c8c5146669096
-
- Nov 02, 2023
-
-
Chalard Jean authored
Test: RoutingCoordinatorServiceTest TetheringTest Change-Id: I2fa6250875d517c3452c85a3678d3feb0c0354d8
-
- Oct 28, 2023
-
-
Maciej Żenczykowski authored
This reverts commit 55ccfe19. Reason for revert: this must be introducing some sort of race it appears to cause atest EthernetTetheringTest 'NetdBinderTest#TetherForwardAddRemove' to no longer reliably pass. Change-Id: I5281ab3f42c5ce268d97a12db24a6768db3f4354
-
- Oct 26, 2023
-
-
KH Shi authored
BPF needs upstream prefixes information to filter spoofing IPv6 source addresses carried in downstream traffic. We retrieve prefixes from upstream interface's LinkProperties and pass it to the BpfCoordinator. Forwarding rules will also be updated when upstream interface's IPv6 link addresses change. Test: atest TetheringTests Bug: 261923493 Change-Id: If8cfc3b191e520ca838654d1b5211ab9e9ec021d
-
Chalard Jean authored
Test: RoutingCoordinatorServiceTest TetheringTest Change-Id: Ic3b36ddc236e8615e7d931b6e526556bbd2dac17
-
Mark authored
After this change, IpServer could switch to use syncSM. Test: atest TetheringTests Change-Id: I2d7fa47cd020f3e76e7a8beaefb98852e93545f8
-
Mark authored
As state transitions always occur after a message has been processed, calling transitionTo only under processMessage makes the flow easier to understand and less error-prone. The risk of this change is very minimal since it is only about handling the error, but tethering will stop regardless. Test: atest TetheringTests Change-Id: I56c6cf6cc989464ee84a8333ac131afc808a3d95
-
Mark authored
This can make it easier to adopt SM shim replacement in follow up change, as both SyncSM and AsyncSM will process the same message without any difference. This change also fix a problem that bring up downstream before it's IpServer completely disabled. Previous: CMD_NOTIFY_PREFIX_CONFLICT -> requestEnableTethering(false) -> requestEnableTethering(true) -> IpServer stopped -> reportTetherStateChanged(downstream inactive) -> IpServer started -> reportTetherStateChanged(downstream active) New: CMD_NOTIFY_PREFIX_CONFLICT -> requestEnableTethering(false) -> IpServer stopped -> reportTetherStateChanged(downstream inactive) -> requestEnableTethering(true) -> IpServer started -> reportTetherStateChanged(downstream active) Test: atest MtsTetheringTestLatestSdk Change-Id: Ibe22b300c56125359f4fa452bd01a0a2381fda23
-
Mark authored
When tethering restarts due to an IP conflict, it starts to bring up downstream before its IpServer is completely disabled. Test: atest TetheringTests Change-Id: I0b0f0bf1bb9ac8421c05fe512d5082d095fa7180
-
Mark authored
A simple replacement without changing any behavior. Test: atest TetheringTests Change-Id: I34903b57df68081e974163edec82a851ee4ccc98
-
Mark authored
Test: atest StateMachineShimTest Change-Id: Ic818aa55e7e0fd7a62dfce50a6ad719e6e1c44ec
-
- Oct 24, 2023
-
-
Chalard Jean authored
Test: In followup changes : RoutingCoordinatorManagerTest Change-Id: Ia6811d614e02123a072c7638291828745abae051
-
Mark Chien authored
The problem is that the test releases mHotspotIpServer’s prefix before testing mUsbIpServer, which means that mUsbIpServer might choose the same address as mHotspotIpServer’s. To fix this, we need to test that mUsbIpServer and mHotspotIpServer have different addresses before calling releaseDownstream(mHotspotIpServer). Change-Id: Id7f7bbfeda841ec9b97e24c0f11893fa37b9ef54 Test: TH Bug: 300127195
-
- Oct 23, 2023
- Oct 18, 2023
-
-
Chalard Jean authored
This reverts commit 316346be. Change-Id: I86977f6e7a5451d037c7ea6fee5c4bc7082935ff
-
- Oct 17, 2023
-
-
Mark authored
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
-
- Oct 13, 2023
-
-
Anton Kulakov authored
Revert submission 2777667 Reason for revert: DroidMonitor-triggered revert due to breakage, bug b/305187495 Reverted changes: /q/submissionid:2777667 Bug: 305187495 Change-Id: I516d40b20d775e9c61b2f825bc094329d016d0c3
-
Chalard Jean authored
There are only three calls to this method, and two of them are with a list of 1 address which means it's simpler inlined. The last call will be replaced with calls to RouteController in a followup, meaning we addRoutesToLocalNetwork can be removed. Test: RouterAdvertisementDaemonTest NetdUtilsTest Change-Id: I3b6ee1db40f09954b336321000735a66306bf000
-