summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-02Merge "Prevent race in NetworkMonitorTest" into rvc-dev am: 6d0b54800fChiachang Wang
Original change: undetermined Change-Id: Iaea25172a5857fa4d2cd2c13536cfe82fa4bdafc
2020-06-02Merge "Fallback if redirect url is not valid for captive portal login" into ↵Chiachang Wang
rvc-dev
2020-06-02Validate test wifi/eth/bluetooth/mobile networks am: d44616a143 am: 8cbcaa644eRemi NGUYEN VAN
Original change: undetermined Change-Id: Id493cfa48ae6612b17580b68d9fdd0d95b3e4ffd
2020-06-02Only allow HTTP capport URLs on test networks am: e443dd652f am: 8a00cc5f03Remi NGUYEN VAN
Original change: undetermined Change-Id: I3b0a070b84f6f2a411c26c9a5685bc5db4d6b61f
2020-06-02Allow localhost HTTP URLs for the capport API am: 6bed0e5941 am: faa4cf0758Remi NGUYEN VAN
Original change: undetermined Change-Id: I947f8205e2ca2de1dc838d2b27fa23faae83051e
2020-06-02Merge "Prevent race in NetworkMonitorTest" into rvc-devChiachang Wang
2020-06-02Validate test wifi/eth/bluetooth/mobile networks am: d44616a143Remi NGUYEN VAN
Original change: undetermined Change-Id: I4e1a089a3e652964603046421a562dc3fab62698
2020-06-02Only allow HTTP capport URLs on test networks am: e443dd652fRemi NGUYEN VAN
Original change: undetermined Change-Id: Id5e7cf81c6b1148f007c66f8bfe8bfd8c4b95e3b
2020-06-02Allow localhost HTTP URLs for the capport API am: 6bed0e5941Remi NGUYEN VAN
Original change: undetermined Change-Id: Idb17f0bdd583cf0dc6a1e6dc006c27c10e31a496
2020-06-02Fix venue info notification not displayingRemi NGUYEN VAN
The venue info notification was never displayed, because querying the notification channel from UserHandle.ALL returns no channel. Channels must be handled from the NetworkStack (owner) user, not the ALL user that is used to send notifications. Bug: 157203874 Test: atest NetworkStackTests; manual: verified showing or disabling the notification as owner or alternate user. Original-Change: https://android-review.googlesource.com/1321357 Merged-In: I9ce908cebdef81bb524353219f7ee9ead2487056 Change-Id: I9ce908cebdef81bb524353219f7ee9ead2487056
2020-06-01Refactor out the IPv4-only provisioning result verification.Xiao Ma
So far the provisioning verification is included inside handleDhcpPacket and follows DHCP handshake, which works for IPv4-only provisioning, but when IPv6 stack is also enabled in some tests, then IPv6 link-local address will be configured automatically when interface is up. Refactor out the IPv4 provisioning function, then it's flexible to verify something else we are interested in (e.g. IPv6 link-local, privacy addresses). Bug: 131781810 Test: atest NetworkStackIntegrationTests NetworkStackNextIntegrationTests Merged-In: I7f5aba2d19de9bdbd0962bc3268d51c19112d9d2 Change-Id: I7f5aba2d19de9bdbd0962bc3268d51c19112d9d2
2020-06-01Validate test wifi/eth/bluetooth/mobile networksRemi NGUYEN VAN
While not all test networks created by TestNetworkManager should be validated (because they can be used in self-contained tests that should not see unexpected traffic, such as data usage tests), allowing NetworkMonitor to validate test networks that intend to replicate actual network management on the device is valuable for proper testing. This change considers that a network that has both TRANSPORT_TEST and another major transport type (wifi, ethernet, bluetooth, mobile) is attempting to replicate actual network management on the device: this is currently the case with EthernetManager#setIncludeTestInterfaces. In such cases, have the system perform validation even if the network does not have CAPABILITY_INTERNET. Because TRANSPORT_TEST networks do not have CAPABILITY_INTERNET (as expected from the network agent and enforced by ConnectivityService), they still cannot become default networks, even if they gain CAPABILITY_VALIDATED. Bug: 156319532 Test: atest NetworkStackTests FrameworksNetTests CaptivePortalApiTest Original-Change: https://android-review.googlesource.com/1317682 Merged-In: Ib5810dc3b589ffddc06507fb8be3066e09063a3c Change-Id: Ib5810dc3b589ffddc06507fb8be3066e09063a3c
2020-06-01Only allow HTTP capport URLs on test networksRemi NGUYEN VAN
HTTP URLs on localhost for the capport API should only be accepted on networks with TRANSPORT_TEST. This change also introduces the first changes to fix thread safety issues in NetworkMonitor, where LinkProperties or NetworkCapabilities are read from the evaluation thread, even though they are updated from the StateMachine thread. The EvaluationThreadDeps class should be augmented in later changes to hold thread-safe copies of what the evaluation thread needs. Bug: 156062304 Bug: 155455470 Test: atest NetworkMonitorTest Original-Change: https://android-review.googlesource.com/1315226 Merged-In: I65bb54c581965159b99d7ac8596304ceb6b5f2cb Change-Id: I65bb54c581965159b99d7ac8596304ceb6b5f2cb
2020-06-01Allow localhost HTTP URLs for the capport APIRemi NGUYEN VAN
Allowing the capport API to be hosted on localhost makes it easy to write fast, stable tests for the feature. This was not possible because: - Pre-validation of the URL used Patterns.WEB_URL, which is over-restrictive and excludes domain names without TLD - NetworkMonitor needs the API to be hosted via HTTPS which is working as intended, however relaxing this requirement only for localhost (for testing) seems reasonable. Bug: 156062304 Test: atest CaptivePortalApiTest in associated change Original-Change: https://android-review.googlesource.com/1309235 Merged-In: I5f2cdd02376785b152e5b9a6e798d797894ea45b Change-Id: I5f2cdd02376785b152e5b9a6e798d797894ea45b
2020-06-01Fallback if redirect url is not valid for captive portal loginChiachang Wang
Wifi AP may send a relative URL or other invalid URL if any network issue or configuration issue happen. In this kind of case, sending a redirect url to captive portal app will fail to open the login page. Thus, fallback to send detection url if the redirect url is a malformed URL. Bug: 157433005 Test: atest NetworkStackTest Merged-In: I6126f5aeb4709a09ec249947b5e59f1310ec7a4b Change-Id: I6126f5aeb4709a09ec249947b5e59f1310ec7a4b
2020-05-29Merge "Implement delete methods" into rvc-dev am: 1e2e741071 am: c71f9fcd2cChalard Jean
Change-Id: I2a317249fca552f59ade78154b64599178cd9bd8
2020-05-29Merge "Implement delete methods" into rvc-dev am: 1e2e741071Chalard Jean
Change-Id: Idc718c8adadf76acb5a6c8157118bc86b1ce559a
2020-05-29Merge "Implement delete methods" into rvc-devChalard Jean
2020-05-29Merge "Allow CTS to include TestNetworkStackLib" into rvc-dev am: 92127893c0 ↵Remi NGUYEN VAN
am: 4ebd0d5cfc Change-Id: I99e4f08f3d0bd3cb7f3fd27bbe05ac99884181f4
2020-05-29Merge "Allow CTS to include TestNetworkStackLib" into rvc-dev am: 92127893c0Remi NGUYEN VAN
Change-Id: Ifa807db193e30db59b5c16dcbb78a8ba761eb746
2020-05-29Merge "Allow CTS to include TestNetworkStackLib" into rvc-devRemi NGUYEN VAN
2020-05-29Implement delete methodsChalard Jean
Test: New tests in this patch, IpMemoryStore*Tests Bug: 146460486 Change-Id: Ibda8eeb917c05876e06e78ae600acd626ca94749 Merged-In: I8680164cf34bae2fac1f5431c03a3369dd6318ab (cherry picked from commit 4f81f357bce66c9fca13242d83267ae89cd43f1d, aosp/1311637)
2020-05-29Add utilities to filter packet am: 89e8dcfdee am: 8585ce7685Remi NGUYEN VAN
Change-Id: Ia2adcfa3d9fe40f1d6de26709227d3c6ac26c456
2020-05-29Add utilities to filter packet am: 89e8dcfdeeRemi NGUYEN VAN
Change-Id: I0a61d0a60e8792680de873032ce8c5f0fbf13480
2020-05-29Rename groupHint to cluster. am: c6ad18a80d am: 3453e859feChalard Jean
Change-Id: I847503a5eb8d4ac5100227771910a764b243ae21
2020-05-29Rename groupHint to cluster. am: c6ad18a80dChalard Jean
Change-Id: Id1a473f8285263ef95586be41c18450a6fcda08d
2020-05-29Add utilities to filter packetRemi NGUYEN VAN
The utilities makes it easier to do simple matching of packets received as byte arrays. This is useful for tests operating on tap interfaces. Test: tests based on this utility Bug: 156062304 Original-Change: https://android-review.googlesource.com/1309234 Merged-In: Ie648c4aee1eae94ae01e3e29234fb432b35c108e Change-Id: Ie648c4aee1eae94ae01e3e29234fb432b35c108e
2020-05-29Prevent race in NetworkMonitorTestChiachang Wang
Move setupTcpDataStall to do before preparing test NM. Bug: 157612829 Test: atest com.android.server.connectivity.NetworkMonitorTest\ #testDataStall_StallTcpSuspectedAndSendMetricsOnWifi\ --iterations 30 Change-Id: I764a97b1007613e7d1c19ec6294faac27bea1fef Merged-In: I764a97b1007613e7d1c19ec6294faac27bea1fef
2020-05-29Allow CTS to include TestNetworkStackLibRemi NGUYEN VAN
This allows CTS tests to verify that the network stack is working properly, for example by using DHCP parsing code. Bug: 156062304 Test: atest CaptivePortalApiTest (clean cherry-pick from AOSP) Merged-In: If52c689f414cc0730226306dae7d84a0283ef273 Change-Id: If52c689f414cc0730226306dae7d84a0283ef273
2020-05-29Rename groupHint to cluster.Chalard Jean
Bug: 146460486 Test: atest android.net.IpMemoryStoreTest Test: atest com.android.server.connectivity.ipmemorystore.IpMemoryStoreServiceTest Change-Id: I493472cb65262b04769192b702178351416c9869 Merged-In: I805733e201aa1286477cfac589cdf4ac18bb7e2b (cherry-picked from aosp/1311636)
2020-05-28Merge "Change stopwatch accuracy from milliseconds to microseconds" into ↵Frank Li
rvc-dev am: 59b66b8f2c am: bd1eb4e698 Change-Id: Iaecdef88adb18df766617786679bd6e851140c46
2020-05-28Merge "Change stopwatch accuracy from milliseconds to microseconds" into ↵Frank Li
rvc-dev am: 59b66b8f2c Change-Id: I07c4df23a6f8b932ce295846f91a9fc89385ce5b
2020-05-28Merge "Change stopwatch accuracy from milliseconds to microseconds" into rvc-devFrank Li
2020-05-28Merge "Enable DHCP INIT-REBOOT state on R." into rvc-dev am: 7b486419f4 am: ↵Xiao Ma
251bbe024d Change-Id: Iafdf1ccafbb123f11d662357246a9298648b12a9
2020-05-28Merge "Enable DHCP INIT-REBOOT state on R." into rvc-dev am: 7b486419f4Xiao Ma
Change-Id: Ica0430391fb73bd3045b2a780568c50f53be9a3a
2020-05-28Merge "Enable DHCP INIT-REBOOT state on R." into rvc-devXiao Ma
2020-05-28Change stopwatch accuracy from milliseconds to microsecondsFrank Li
The microsecond time information needs to be recorded in the NetworkStack Metrics (NetworkIpProvisioningReported). So the unit of stopwatch is converted from millisecond to microsecond. Bug: 151926185 Test: atest com.android.server.connectivity.NetworkMonitorTest Original-Change: https://android-review.googlesource.com/1299376 Merged-In: I5a27a3b1316c67bf076b2e490860385267358ef8 Change-Id: I5a27a3b1316c67bf076b2e490860385267358ef8
2020-05-27Merge "add TCP data stall metrics" into rvc-dev am: 92fbcb262a am: 797bcc347eChiachang Wang
Change-Id: Ib5bedf6daea17d09e10278dc4bb452ff3610e7f1
2020-05-27Merge "add TCP data stall metrics" into rvc-dev am: 92fbcb262aChiachang Wang
Change-Id: Idafdf0649eaf951295aa6b37bbcda51e53093b01
2020-05-27Merge "add TCP data stall metrics" into rvc-devChiachang Wang
2020-05-26Merge "Add an eventuallyExpect call that returns null" into rvc-dev am: ↵TreeHugger Robot
3f0922c166 am: 1df181f831 Change-Id: Id1b91015948a59495df5e7871c46bc34a503fa14
2020-05-26Merge "Add an eventuallyExpect call that returns null" into rvc-dev am: ↵TreeHugger Robot
3f0922c166 Change-Id: I0721dec2ead3fe708a10753efd8b03f2c5bc6410
2020-05-26Merge "Add an eventuallyExpect call that returns null" into rvc-devTreeHugger Robot
2020-05-26Merge "Fix flakes in testMultipleProbes" into rvc-dev am: c0816168ec am: ↵Remi NGUYEN VAN
f9aa3eb628 Change-Id: Ic2a7d85dcf7a52851f8a0870d4ea55adc7950ef9
2020-05-26Merge "Fix flakes in testMultipleProbes" into rvc-dev am: c0816168ecRemi NGUYEN VAN
Change-Id: Iedbfbcc4363c6285da5348c38daa30dafd16d9d3
2020-05-26Merge "Fix flakes in testMultipleProbes" into rvc-devRemi NGUYEN VAN
2020-05-25Add an eventuallyExpect call that returns nullChalard Jean
Test: GtsNetworkStackHostTestCases Bug: 157284669 Change-Id: Ieba523cd6cebce5f5e6d2fd8b9acd28228403540
2020-05-25Enable DHCP INIT-REBOOT state on R.Xiao Ma
Bug: 156575243 Test: atest NetworkStackTests NetworkStackIntegrationTests Test: atest NetworkStackNextIntegrationTests Test: manual test: 1. connect to AP successfully at the first time 2. disconnect wifi 3. reconnect to the same AP 4. checked client broadcasts REQUEST instead of DISCOVER 5. checked client broadcasts DISCOVER if lease has expired Merged-In: I62d1ab6b94be1ee95fbaa2ecce62eaba01e7892d Change-Id: I62d1ab6b94be1ee95fbaa2ecce62eaba01e7892d
2020-05-25Merge "Mock IpConnectivityLog in IpClientTest" into rvc-dev am: 7bfc08f95f ↵Mark Chien
am: c44e086024 Change-Id: Ie770d5a1af46341ccc229a29c19e344d447d79bb
2020-05-25Merge "Support MirrorLink DHCPDECLINE." into rvc-dev am: b664b89668 am: ↵Xiao Ma
a289ff1924 Change-Id: I5c56fa837b9715b725e3563481ea6b3c4fe2f2bd