Skip to content
Snippets Groups Projects
  1. Feb 08, 2021
    • junyulai's avatar
      Address comments on aosp/1550755 · 5ceb5c3c
      junyulai authored
      This CL bypass adding NOT_VCN_MANAGED on R device. And add TODOs
      for refactoring and adding test coverage.
      
      Test: atest CtsNetTestCasesLatestSdk:NetworkRequestTest on R device
      Bug: 175662146
      
      Change-Id: Id09b19c13f9a74e25d45689d2211418172dfaec8
      5ceb5c3c
  2. Feb 05, 2021
  3. Jan 29, 2021
  4. Jan 19, 2021
    • Junyu Lai's avatar
      Revert "[VCN06.1] Add CTS for request background network" · 3660b71c
      Junyu Lai authored
      Revert "[VCN06] Support request background network"
      
      Revert submission 1545847-vcn06
      
      Reason for revert: b/177876289 presubmit failure
      Reverted Changes:
      I8042ce197:[VCN06.1] Add CTS for request background network
      If9aaa87b7:[VCN06] Support request background network
      
      Change-Id: Icd01643cae86c4448eb7105ef0f238b1f10ebc19
      3660b71c
  5. Jan 18, 2021
  6. Jan 15, 2021
    • Remi NGUYEN VAN's avatar
      Skip NetworkAgentTest on R- · 4bf203d0
      Remi NGUYEN VAN authored
      NetworkAgent is not updatable on R-, so there is no need to run tests
      compiled against S on older platforms. They are also incompatible
      because NetworkAgent stopped using AsyncChannel in S.
      
      This only affects MTS, and CTS used to test S+ devices. CTS for R-
      devices is already cut in a branch that this change will not merge to.
      
      Bug: 177290955
      Change-Id: I85c137a1b5fd7ef701fba4623566df5a8fb707a3
      Test: atest CtsNetTestCasesLatestSdk
      4bf203d0
  7. Jan 14, 2021
    • David Su's avatar
      Net CTS: move NsdManagerTest from Wifi CTS · cd1851e0
      David Su authored
      NsdManagerTest is not owned by Wifi, so it doesn't
      belong in Wifi CTS.
      
      Bug: 176902925
      Test: atest CtsNetTestCases
      Change-Id: I8eb3cba7a3b2ff24a012cca8d3fdff173e88c69a
      cd1851e0
  8. Jan 11, 2021
  9. Jan 05, 2021
  10. Dec 25, 2020
    • Chalard Jean's avatar
      Migrate away from AsyncChannel in NetworkAgent · 4f896db6
      Chalard Jean authored
      Use two oneway binder interfaces instead.
      The interfaces post messages to handlers as was implemented before, but
      provide a more strictly defined interface, with less hops between
      NetworkAgent, AsyncChannel, and ConnectivityService.
      
      Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
      Merged-In: Ica51d0179bcb3b4e314d2c3e85709aead6ca5657
      
      Change-Id: Ica51d0179bcb3b4e314d2c3e85709aead6ca5657
      4f896db6
  11. Dec 16, 2020
    • Remi NGUYEN VAN's avatar
      Fix timeout on NetworkAgentTest callback · abb46bef
      Remi NGUYEN VAN authored
      All callbacks in the class use the DEFAULT_TIMEOUT_MS, except for this recently
      added test.
      
      The test is currently flaky in various branches.
      Fixes: 174716714
      Fixes: 174691729
      Change-Id: I9f4446bb83eb4402c912292ac31d46e1d2cb6a52
      Test: TH
      abb46bef
  12. Dec 15, 2020
    • Remi NGUYEN VAN's avatar
      Move cts/net/TEST_MAPPING to toplevel · 9b6b353b
      Remi NGUYEN VAN authored
      The tests should just be run on any change in packages/modules/Connectivity,
      not just changes in the CTS package.
      
      Change-Id: I1c86c402f39a8a9b84e7422445df289c3ea7842f
      Test: TEST_MAPPING needs to be verified by TH
      9b6b353b
  13. Dec 12, 2020
    • Lorenzo Colitti's avatar
      Update NetworkAgentTest to support generalized underlying networks. · ed1211d2
      Lorenzo Colitti authored
      Currently, when an agent calls setUnderlyingNetworks, the
      transports of the network are hardcoded to TRANSPORT_VPN only.
      This is being fixed in another CL in this topic. The new code
      reports the same transports sent by the agent.
      
      This test registers an agent with TRANSPORT_TEST|TRANSPORT_VPN.
      Update the test to expect both transports in the callbacks it
      receives.
      
      Bug: 173331190
      Test: passes when run with other CL in topic
      Change-Id: Iede61d74fa02a4fec1f345f6d18835c1acab7337
      ed1211d2
    • Lorenzo Colitti's avatar
      Minor fixes to NetworkAgentTest. · cc3e994f
      Lorenzo Colitti authored
      - Use a more realistic routing config (instead of a LinkAddress
        with prefix length 0, an address with a mask of 32 and a
        default route).
      - Use InetAddresses to parse IP addresses since it's a public API.
      - Import the NET_CAPABILITY_xxx and TRANSPORT_xxx constants for
        readability.
      
      Bug: 173331190
      Test: test-only change
      Change-Id: I9703d7dd5781f60fb3d531267d3f5370cbccd64f
      cc3e994f
  14. Dec 07, 2020
    • Lorenzo Colitti's avatar
      Pass in proper NetworkCapabilities in testSetUnderlyingNetworks. · 977464ef
      Lorenzo Colitti authored
      The CL that introduced testSetUnderlyingNetworks allowed tests to
      pass in NetworkCapabilities when registering an agent, but
      incorrectly always set the agent's capabilities anyway. This
      resulted in testSetUnderlyingNetworks registering an agent with
      TRANSPORT_VPN and NET_CAPABILITY_NOT_VPN.
      
      Fix this by ensuring that createNetworkAgent either uses the
      passed-in capabilities unmodified, or creates its own. Assert
      that the test VPN network does not have NET_CAPABILITY_NOT_VPN.
      
      While I'm at it, remove the manual unregistration of the callback
      by using the registerNetworkCallback helper method.
      
      Also add a little bit of extra test coverage.
      
      Bug: 173331190
      Test: test-only change
      Change-Id: I114d876a1b2bf5344dd7c6fa23862df1c0a412c3
      977464ef
  15. Dec 03, 2020
  16. Nov 27, 2020
  17. Nov 26, 2020
    • Alan Stokes's avatar
      Fix race condition in NetworkWatchListTest · 36529b25
      Alan Stokes authored
      We were running cp to create a file and then running a command to read
      the file. However were weren't waiting for the cp to finish (or,
      indeed, start), so occasionally the read would fail saying the file
      didn't exist.
      
      Also added some logging, because diagnosing failure without it is
      painful. Also simplify & improve file closing logic.
      
      Some of this was previously submitted on internal master as change
      I1c875102f0cce32cbbe2e3b36de913741c9abb92, but I've reverted that in
      favor of this.
      
      Bug: 168216494
      Test: atest CtsNetTestCases:android.net.cts.NetworkWatchlistTest
      Change-Id: I46a9db8b7a1885a9829f00bbd3233b863cfd1f5d
      36529b25
  18. Nov 25, 2020
    • Remi NGUYEN VAN's avatar
      Add TEST_MAPPING config for CTS postsubmit · 1bc62872
      Remi NGUYEN VAN authored
      The new configuration runs tests on physical devices with SIM cards.
      This is only done in postsubmit, as such tests can only run a few (~2) times a day due to
      availability of the devices.
      
      This configuration allows running all tests, so there is no annotation filter.
      
      Change-Id: If95e4deeed8098327023f99e6e610331b8e86a0f
      Test: TH validates TEST_MAPPING configurations
      1bc62872
  19. Nov 20, 2020
  20. Nov 13, 2020
    • Yintang Gu's avatar
      Tune up TIMEOUTs of IPSec CTS for low end devices · 5c39147e
      Yintang Gu authored
      Ikev2VpnTest#testStartStopVpnProfileV4 and testStartStopVpnProfileV6
      contains the IKE sequences and requires the phone to send and receive
      the required packet in 1000ms.
      On some low end devices, the response time may exceeds this TIMEOUT
      sometimes.
      So we need to use larger timeouts.
      
      Bug: 171176723
      Change-Id: I005b83ffecd8ade5063000690bfd4136d82f1a07
      5c39147e
  21. Nov 10, 2020
  22. Nov 09, 2020
  23. Nov 06, 2020
    • Cody Kesting's avatar
      Use READ_PHONE_STATE when checking Carrier Configs. · a9bdde88
      Cody Kesting authored
      This CL Updates ConnectivityDiagnosticsManagerTest to explicitly use
      the READ_PHONE_STATE permission when checking Carrier Configs for the
      specified subId.
      
      Bug: 169739061
      Test: atest ConnectivityDiagnosticsManagerTest
      Change-Id: I2307d7b03bcf9a918904a89be86777872a759293
      a9bdde88
    • Remi NGUYEN VAN's avatar
      Use CONNECTIVITY_INTERNAL on Q for portal URL · 78cb3a9d
      Remi NGUYEN VAN authored
      getCaptivePortalServerUrl requires CONNECTIVITY_INTERNAL or
      MAINLINE_NETWORK_STACK on Q, and NETWORK_SETTINGS or
      MAINLINE_NETWORK_STACK on R+.
      
      Use CONNECTIVITY_INTERNAL on Q instead of NETWORK_SETTINGS to test it.
      
      Bug: 172626873
      Test: atest CtsNetTestCasesLatestSdk:ConnectivityManagerTest
      Change-Id: I03309de945b198ad9b40d51d799d2619bb3179ea
      78cb3a9d
    • Remi NGUYEN VAN's avatar
      Use ACCESS_WIFI_STATE when clearing wifi blacklist · 72c7fe9b
      Remi NGUYEN VAN authored
      Some tests using CtsNetUtils, like tethering CTS tests, do not hold
      ACCESS_WIFI_STATE at install time. Use shell permissions to allow the
      utility to work in such configurations.
      
      Bug: 171621759
      Test: atest CtsTetheringTest:TetheringManagerTest
      Change-Id: I63e76918421e5deb59fe67a64674348fb8d20265
      72c7fe9b
  24. Nov 04, 2020
    • Luke Huang's avatar
      Fix minor bug and deflaky for DnsResolverTest · fcabfc68
      Luke Huang authored
      1. Add the missing countdown() in the test callback
      2. Add ensureWifiConnected() to prevent no available network problem.
      3. Increase the timeout for awaiting private DNS setting because
         current one might not be enough.
      
      Bug: 168027339
      Test atest
      
      Change-Id: I91190d8644ff7a7dfaf4fa3f2d43c17f67dfac11
      fcabfc68
  25. Oct 30, 2020
    • Weilun Du's avatar
      Fix MultinetworkApiTest for instant mode · aa001451
      Weilun Du authored
      
      add AppModeFull@ to MultinetworkApiTest since CHANGE_NETWORK_STATE
      could not be granted in instant mode.
      
      CHANGE_NETWORK_STATE is required to select networks that are up but
      not in the foreground, for example, the mobile network after the linger
      timer has expired.
      
      Bug: 168809106
      Test: atest MultinetworkApiTest
            atest MultinetworkApiTest --instant
      
      Signed-off-by: default avatarWeilun Du <wdu@google.com>
      Change-Id: I37ca1a0f58d1c2ab57f8cd4489c2cfb13b0f2d39
      aa001451
  26. Oct 29, 2020
    • markchien's avatar
      Don't run hotspot related tests if Soft AP is not supported · 8705535e
      markchien authored
      Also explicitly hold ACCESS_WIFI_STATE permission to avoid
      no permission problem when using WifiManager#getScanResults
      without shell identity.
      
      Fix: 169219565
      Test: "atest CtsTetheringTest" in cuttlefish and phyical device
      
      Change-Id: I3d8fa7e8882bf96f61f3316a70efdf991addbcb2
      8705535e
  27. Oct 27, 2020
    • Dan Shi's avatar
      Add all CTS tests to general-tests suite · 98716c5c
      Dan Shi authored
      Exempt-From-Owner-Approval: this change only adds the tests to
      general-tests.zip, doesn't change any test behavior.
      
      Bug: 171481522
      Test: none
      Change-Id: I1711237f00572d57f611dcd16ec9ad345a0b5b3b
      98716c5c
    • Remi NGUYEN VAN's avatar
      Move apache HTTP tests out of tests/net · 438200af
      Remi NGUYEN VAN authored
      The apache HTTP library is part of the platform core APIs, which are
      separate from the core networking APIs.
      
      cts/tests/tests/net is planned to move to a separate git project to put
      it closer to the associated connectivity module code.
      
      Bug: 170371348
      Test: m cts && cts-tradefed run cts -m CtsApacheHttpTestCases
      Change-Id: I49972b21755235e280c75eec40db14f3db974ca1
      438200af
  28. Oct 23, 2020
  29. Oct 22, 2020
    • Remi NGUYEN VAN's avatar
      Wait for connect before dropping permissions · 0c709339
      Remi NGUYEN VAN authored
      WifiManager#connect is implemented with a oneway binder call, so it may
      return before the permission check. The previous code could drop shell
      permissions before the check is performed.
      
      Use WifiManager.ActionListener to wait for the operation to end before
      dropping permissions.
      
      Also refactor current usages of various "run as shell" utilities to use
      TestPermissionUtil.runAsShell, which is the "standard" utility used in
      connectivity tests (both in CTS and in other tests).
      
      Bug: 170371191
      Test: atest CtsNetTestCasesLatestSdk:CaptivePortalTest
      Change-Id: I0f47c455f2c1596a887abab7d35146d8557d736a
      0c709339
  30. Oct 16, 2020
  31. Oct 14, 2020
  32. Oct 12, 2020
Loading