- Feb 14, 2024
-
-
Remi NGUYEN VAN authored
CtsNetTestCasesLatestSdk was originally used for MTS to prevent installation issues with CUR_DEVELOPMENT target SDK modules (as is the case for CtsNetTestCases) not installing on released devices. However setting the min_sdk to a given value should be enough for that purpose. While there may have been other blockers requiring separation of CtsNetTestCases and CtsNetTestCasesLatestSdk at the time (in the Q/R timeframe), more recent modules like CtsAdServicesDeviceTestCases seem to be using CUR_DEVELOPMENT target SDK in MTS just fine. Not specifying a target SDK means that the branch default will be used, depending on the release configuration. So for example trunk_staging would typically be CUR_DEVELOPMENT=10000, and "next" may use the SDK version of that release. This makes sense as a test suite targeting CUR_DEVELOPMENT is necessary to verify a development build, while a production "next" configuration should generally use the latest released SDK. But in any case, for CtsNetTestCases purposes, this would cause the exercised connectivity APIs to use their latest non-compatibility behavior, which is what tests expect. Considering this, add CtsNetTestCases to MTS, so that CtsNetTestCasesLatestSdk can be removed. This will allow having one test suite for both CTS and MTS, which in turns allows marking CtsNetTestCases as MCTS, so that the version of the test to run is autodetected based on installed modules. Note this change also removes the unnecessary "platform_api" statement and comment as this is already handled in framework-connectivity-test-defaults. Bug: 317913702 Test: m, aapt dump badging, verify (min)sdkVersion=30, targetSdk=10000 Change-Id: I2267e5c9219f059872928cc681547c3bd5fbc394
-
- Feb 08, 2024
-
-
Xiao Ma authored
* changes: Make RtNetlinkRouteMessage constructor visible for testing. Make StructRtMsg constructor visible for testing. Make NduseroptMessage constructor visible for testing.
-
Maciej Żenczykowski authored
-
Maciej Żenczykowski authored
-
Treehugger Robot authored
-
Cole Faust authored
-
Maciej Żenczykowski authored
Bug: 324338494 Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: Ied391f3366c87ffb1010ec6e5ece6604a72a7c9b
-
Maciej Żenczykowski authored
This is a follow up to: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2954728 as a result of taking a close look at all netd.c bpf_get_socket_uid() calls. Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I59b08a531a344bdab33a6c35aed210ef9356530c
-
- Feb 07, 2024
-
-
Yuyang Huang authored
-
Ying Xu authored
Bug: 315835605 Test: atest android.net.cts.NetworkRequestTest Change-Id: Ie4ed844d59a20bfd1a222fb6a85ad14c08f2efbd
-
Nagendra Prasad Nagarle Basavaraju authored
- Implement handleSetSatelliteNetworkPreference() at ConnectivityService to create multi layer request with preference order PREFERENCE_ORDER_SATELLITE_FALLBACK. - unit test coverage Bug: 320514105 Test: m and atest FrameworksNetTests Change-Id: I3f71104f8c3c998599eaab71ae4076985f4bed77
-
Nagendra Prasad Nagarle Basavaraju authored
- create SatelliteAccessController class to identify role sms and satellite communication enabled uid's, to keep track of role changes through OnRoleHoldersChangedListener and to request to create multi layer request to ConnectivityService. - unit test coverage Bug: 320514105 Test: m and atest FrameworksNetTests Change-Id: I95086f7a4fd6fe1261f432e605d792204ff5310b
-
Nagendra Prasad Nagarle Basavaraju authored
This commit also updates to use V14 dnsresolver APIs which was V13. Bug: 320514105 Test: m & atest FrameworksNetTests Change-Id: I6e92f4d99e0eba3b5d1d5e45bf11e5e945ea43f1
-
Ying Xu authored
This CL allows the Carrier Config app to request restricted WiFi nework by setting the correspoding subscription ID in the network request. Bug: 315835605 Test: atest android.net.cts.NetworkRequestTest atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.connectivity.CarrierPrivilegeAuthenticatorTest atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.ConnectivityServiceTest Change-Id: I237e692d092ff5f969ce4b7962f6d58099a6f3a9
-
Motomu Utsumi authored
-
Yuyang Huang authored
-
Handa Wang authored
Apps that target an SDK before {@link Build.VERSION_CODES.VANILLA_ICE_CREAM} will not see networks with this capability unless they explicitly set the NET_CAPABILITY_LOCAL_NETWORK in their NetworkRequests. In this way, `NET_CAPABILITY_LOCAL_NETWORK` should be public. Bug: 313000440 Test: None Change-Id: I44d9cf3ecf5da471a627696f3d2680f35d4b122d
-
Maciej Żenczykowski authored
Linux kernel implementation is: sock* sk_to_full_sk(sk): return (sk && sk->sk_state == TCP_NEW_SYN_RECV) ? inet_reqsk(sk)->rsk_listener : sk; bool sk_fullsock(sk): return (1 << sk->sk_state) & ~(TCPF_TIME_WAIT | TCPF_NEW_SYN_RECV) u32 bpf_get_socket_uid(skb): sk = sk_to_full_sk(skb->sk); if (!sk || !sk_fullsock(sk)) return overflowuid; kuid = sock_net_uid(sock_net(sk), sk); return from_kuid_munged(sock_net(sk)->user_ns, kuid); u64 bpf_get_socket_cookie(skb): return skb->sk ? __sock_gen_cookie(skb->sk) : 0 Test: TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I0f9c2ffc24821068ebd2e5712789ff68aa196c48
-
- Feb 06, 2024
-
-
Jeffrey Vander Stoep authored
-
Oriol Prieto Gascó authored
-
- Feb 05, 2024
-
-
Kangping Dong authored
Per CTS review comment in aosp/2949385: ``` You might want to make this a bit larger, otherwise if some new error codes are added in the future in a mainline update, already released CTS test packages will start to fail. That should be fixed by mCTS, but since mCTS is not in place yet, it's best to be safe ``` This commit moves the too-large error code check into unit test to avoid potential CTS compatibility issues. Bug: 323791003 Change-Id: If99191630e1044cb8f5ed189bf79567cd51c3905
-
Jeff Vander Stoep authored
This is needed to upgrade the android_logger crate from 0.12.0 to 0.13.3. with_max_level provides the same functionality as with_min_level. The renaming is admittedly confusing, but the new name is accurate and it makes sense that they deprecated and then removed the previously poorly named with_min_level. See crate documentation [1] and code [2]. [1]: https://docs.rs/android_logger/0.12.0/android_logger/struct.Config.html#method.with_min_level [2]: https://docs.rs/android_logger/0.12.0/src/android_logger/lib.rs.html#227 Bug: 322718401 Test: build and run CF with the change. Test: m aosp_cf_x86_64_phone Change-Id: Icbfe09b864ce3d52953bf93ca98b7a2db0990e68
-
- Feb 04, 2024
-
-
Kangping Dong authored
-
Handa Wang authored
-
Kangping Dong authored
Bug: 323464130 Test: presubmit Change-Id: I67bde1506e99b42ff3806254aa8bbc6c98792e3e
-
Handa Wang authored
For ot-daemon to perform mDNS operations, we need to implement an AIDL service NsdPublisher. MdnsPublisher forwards the calls to NsdManager. For now, only register & unregster a service without a custom host is supported. Bug: 320211657 Bug: 318323473 Test: atest CtsThreadNetworkTestCases Change-Id: Ia392a0f57046f53973ac6bd6043dec915d170666
-
- Feb 03, 2024
-
-
Oriol Prieto Gasco authored
Test: m Bug: 312769710 Change-Id: I1eed7982b40d28947aa3f9575c568eac325dc832
-
- Feb 02, 2024
-
-
Yuyang Huang authored
Bug: 323464655 Bug: 323464223 Test: TH Change-Id: I23e8fb702b569869f0fa76807fb689873de13e54
-
Cole Faust authored
The android framework has android.annotation.RequiresApi, which is a copy of androidx.annotation.RequiresApi. However it was added with source retention instead of class retention like androidx's version has. This causes it to be missed if you compiled a library and then used that library to compile something else, that library's public methods won't have @RequiresApi on them when using that library's compiled jar file. To make @RequiresApi have class retention, we need to baseline the NewApi issues that it would cause. These baselines also require us to disable strict_updatability_linting in some places. Bug: 323366771 Test: m lint-check Change-Id: I0c984e3ba39e357ce102be442568f2d77a4f9034
-
Cole Faust authored
-
Junyu Lai authored
-
Hansen Kurli authored
-
Xiao Ma authored
Refactor IpClientTest by parsing the netlink message directly instead of netd callbacks, so we have to initialize a RtNetlinkRouteMessage instance to trigger IPv4/v6 route updates in the unit test. Bug: 318764217 Test: atest NetworkStackTests Change-Id: Icfcc7ade636c89a63d897f4e9246410f6387b3c9
-
Xiao Ma authored
Refactor IpClientTest by parsing the netlink message directly instead of netd callbacks, so we have to initialize a StructRtMsg instance to fill in the RtNetlinkRouteMessage constructor. Bug: 318764217 Test: atest NetworkStackTests Change-Id: I1481cb8fab29ae94d48fa342ecf2b303a9701a31
-
Xiao Ma authored
Refactor IpClientTest by parsing the netlink message directly instead of netd callbacks, so we have to initialize an NduseroptMessage instance to trigger IPv6 RDNSS option update in the unit test. Bug: 318764217 Test: atest NetworkStackTests Change-Id: Ic2e8ca0d5e71b73c0dbdc3311e72486af371c899
-
- Feb 01, 2024
-
-
Kangping Dong authored
-
Kangping Dong authored
This commit handles the ot-daemon crash by automatically restarting it and rejoin the network if ever joined. This also fixes the address not deleted issue in TunInterfaceContorller. Bug: 321540728 Bug: 309792480 Change-Id: I3ed466eb70818974a1e57f01456363bdf82915d5
-
Remi NGUYEN VAN authored
-
Remi NGUYEN VAN authored
The comment that "The very first posted task is to initialize the service cache, so it will be always set in other tasks running on the handler" did not consider that if the looper was provided by the caller, it is possible for other tasks to run on it before the serviceCache is initialized. In particular, if the caller calls registerListener on the looper thread right after calling the constructor, this would be executed before the posted initialization task. In practice this does not happen as MdnsDiscoveryManager is created in the NsdService constructor, and any usage of it is on messages posted to the NsdService handler thread after the constructor has been called; so the service cache initialization does happen before any other MdnsDiscoveryManager task. As this is error-prone, just initialize the service cache before first use on the handler thread, as it is only used for createServiceTypeClient, which runs on the handler thread. Test: atest Change-Id: Ie341bb71ef327dceb4f0aa6fc2d241d6e9cbb900
-
Remi NGUYEN VAN authored
-