Skip to content
Snippets Groups Projects
  1. Sep 26, 2023
    • Motomu Utsumi's avatar
      Cleanup existing firewall rule on myUid before the test · 4d8c70c0
      Motomu Utsumi authored
      testFirewallCloseSocketAllowlistChainOtherUid sets the firewall rule on
      myUid + 1 and confirms this does not affect the network access from
      myUid.
      This test failed when there is an existing firewall rule on myUid.
      This CL cleans up the existing rule on myUid before running the test and
      restores the existing state after the test.
      
      Bug: 299898772
      Test: atest CtsNetTestCases
      Change-Id: I9083ac41a64a8b81a8b4616c0d57a25355f5d53c
      4d8c70c0
  2. Sep 14, 2023
    • Remi NGUYEN VAN's avatar
      Add test for partial responses · 08521315
      Remi NGUYEN VAN authored
      Test that when a responder only responds with the exact records that
      were queried, so only reply for PTR in discovery, only send SRV, TXT,
      A, AAAA when asked explicitly, service resolve succeeds.
      
      This ensures that the querier sends followup queries for each record.
      See RFC6763 12., especially the last paragraph.
      
      Bug: 267570781
      Bug: 267371243
      Test: atest NsdManagerTest
      Change-Id: Ia392e80c1e27b479c6177d19f6b4be6032dcb1cd
      08521315
  3. Sep 12, 2023
    • Yuyang Huang's avatar
      Add newApi linter check for mDNS library · fc83170c
      Yuyang Huang authored
      The mDNS library need to be backported to some internal library which
      support minSdk 21. Therefore, updated the build rules to add the linter
      check.
      
      Bug: 296175311
      Test: TH
      Change-Id: Iae0bffa315dc6de2339a05f595b13480fa7385ae
      fc83170c
    • Yuyang Huang's avatar
      Add test for downstream tethering · fca402ab
      Yuyang Huang authored
      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
      fca402ab
    • Paul Hu's avatar
      Fix flaky test: testOnNetworkConnectivityReportedFalse · 326c22ff
      Paul Hu authored
      The test flake is likely caused by a carrier configuration
      update. After the update is complete, the shell permission is
      dropped, which causes the test network setup to fail due to a
      lack of permission. The test network setup should also be
      protected by a synchronized lock to avoid permission lost.
      
      Bug: 296980394
      Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest \
            --iteration 50
      Change-Id: I3c7a0a92cddeb7c0f41a11b929f72714f8b22c05
      326c22ff
    • Paul Hu's avatar
      Correct isLegacy metric data · 508a012b
      Paul Hu authored
      The isLegacy field of Nsd metrics should indicate whether the
      data was collected from the old backend or not. However, it is
      currently only dependent on the ENABLE_PLATFORM_MDNS_BACKEND
      compat change value, which is incorrect. This is because the
      NsdService always uses the new backend since Android U,
      regardless of the compat change value. Therefore, the isLegacy
      data should be obtained from each transaction.
      
      Bug: 287546772
      Bug: 299880473
      Test: atest FrameworksNetTestCases NsdManagerTest
      Change-Id: I156abd656b90578d710696a69ccf7dfca97a2c9c
      508a012b
  4. Sep 11, 2023
    • Mike Yu's avatar
      Add sim card requirement for CtsNativeNetDnsTestCases · a7d02ba6
      Mike Yu authored
      As connectivity pre-check was added to CtsNativeNetDnsTestCases
      recently, this CL is needed as well.
      
      Bug: 298886804
      Test: TreeHugger
      Change-Id: I3c26920e8609256470cd2b8c37fc1f33f56c39fd
      a7d02ba6
    • Chalard Jean's avatar
      Implement ConnectivityStateMetrics sample · f95e2de3
      Chalard Jean authored
      Test: ConnectivitySampleMetricsTest
      Change-Id: I0afdda023208c3f8620cb5b89add66448af596d7
      f95e2de3
    • Chalard Jean's avatar
      Add base classes for common ConnectivityService tests. · 0f5c4fe9
      Chalard Jean authored
      This sets up what is necessary for an instrumented
      ConnectivityService to run. Users of this class are
      meant to inherit CSTest.
      
      This is still relatively basic and does not have all the
      instrumentation in ConnectivityServiceTest. Developers
      looking to extend CSTest may find some instrumentation
      missing ; when they add the missing instrumentation,
      they should consider whether it should be generic for all
      CSTests (and put it in base/), or whether it's local to
      their own test suite. This should enable faster testing
      as each CSTest children will only need to set up the
      instrumentation it actually needs.
      
      This patch also migrates a basic test to have a first user.
      
      Bug: 272685721
      Test: ConnectivityServiceTest
            CSBasicMethodsTest
      Change-Id: I1c47f616af90629c9cb2a6ae89d992b19863e704
      0f5c4fe9
  5. Sep 08, 2023
  6. Sep 07, 2023
  7. Sep 06, 2023
    • Maciej Żenczykowski's avatar
      cts: enforce cubic only on V+ · 9fe823e3
      Maciej Żenczykowski authored
      Test: TreeHugger
      Bug: 291025434
      Bug: 289802481
      Bug: 294510745
      Change-Id: I3c9646468834305e48c531040640e05f80b1c5e7
      9fe823e3
    • Lorenzo Colitti's avatar
      Convert ProcNetTest to JUnit4. · 9ae344b8
      Lorenzo Colitti authored
      This allows using assumptions to skip tests.
      
      Test: atest CtsHostsideNetworkTests
      Change-Id: Ic1fc41c1ca0c30b6b7350c413d710d959b9a5013
      9ae344b8
    • Lorenzo Colitti's avatar
      Fix lint errors in ProcNetTest. · ab5e0c98
      Lorenzo Colitti authored
      Test: test-only change
      Change-Id: If3702cf9c3a36e3b7cb1853784f1a8ff98d7be07
      ab5e0c98
    • Paul Hu's avatar
      Report more advertising metrics data · 043bcd45
      Paul Hu authored
      Report more advertising metrics data below when the service is
      unregistered.
      - Replied request count (sum across interfaces)
      - Sent packet count (including announcements and probes)
      - Number of conflicts during probing
      - Nubmer of conflicts after probing
      
      Bug: 287546772
      Test: atest FrameworksNetTestCases NsdManagerTest
      Merged-In: I50c54a35dc523422e3a7302c059bbbc38eac5631
      Change-Id: I50c54a35dc523422e3a7302c059bbbc38eac5631
      043bcd45
    • Junyu Lai's avatar
      Invoke setDataEnabled instead of setDataEnabledForReason on R device · 59ce1f1f
      Junyu Lai authored
      There was no such method in R release, use SdkLevel to check
      framework version and use different API accordingly.
      
      Test: TH
      Fix: 297768044
      Change-Id: I357c0d56646ffd5eb018b6bb4efe47d4c48e71d3
      59ce1f1f
  8. Sep 05, 2023
    • Paul Hu's avatar
      Disable cache flush bit in existing announcement · 88239ccb
      Paul Hu authored
      Per RFC6762#10.1, the cache flush bit should be false for
      existing announcement. Otherwise, the record will be deleted
      immediately when receiving this response.
      
      Bug: 299054783
      Test: atest FrameworksNetTestCases NsdManagerTest
      Change-Id: I8bf1a5b1914b49720862836abb543b232185f5f5
      88239ccb
    • Yuyang Huang's avatar
      Send rawOffloadPacket to OffloadEngine · 31f6e2ec
      Yuyang Huang authored
      Add the missing logic to send the rawOffloadPacket to OffloadEngine.
      
      Bug: 297314970
      Test: atest CtsNetTestCases FrameworksNetTestCases
      Change-Id: I06d7a9bb84df72808eff4f0c9df60f7e60aa2a2c
      31f6e2ec
    • Remi NGUYEN VAN's avatar
      Add back partial connectivity test to presubmit · a4c543a9
      Remi NGUYEN VAN authored
      Most failures were due to two conflicting wifi configurations being used
      on the test infrastructure. Re-enable the test now that the
      configurations have been updated.
      
      Fixes: 286701510
      Test: TH
      Change-Id: I601c089ed4e9c6b8bfe296e05397e83ac20ff8c1
      a4c543a9
    • Yuyang Huang's avatar
      Update permission check for offloadEngine registration · 8e6fbc8c
      Yuyang Huang authored
      For an app to register itself as an offloadEngine, it must have either
      of the following permissions: NETWORK_STACK,
      PERMISSION_MAINLINE_NETWORK_STACK, NETWORK_SETTINGS,
      REGISTER_NSD_OFFLOAD_ENGINE.
      
      Bug: 294777050
      Test: atest CtsNetTestCases FrameworksNetTests
      Change-Id: I19fe9b996a02b1ae23116c02a1b8406d93b3ecf1
      8e6fbc8c
  9. Sep 04, 2023
    • Junyu Lai's avatar
      Address review followup comments for NetworkStats · 35c69c79
      Junyu Lai authored
      This change includes:
      1. Mark groupedBy*() deprecated and throw after android U.
      2. Modify map() to mapKeysNotNull().
      3. rename clearInterfaces to withoutInterfaces and refactoring.
      4. Modify tests accordingly.
      
      Test: atest FrameworksNetTests:android.net.connectivity.android.net.NetworkStatsTest
      Fix: 296149902
      Fix: 296150018
      Change-Id: I5d97422ba957a212c0c5fbc1eee3f8b174343348
      35c69c79
    • Motomu Utsumi's avatar
      Delay frozen app sockets close until the cellular modem wakes up · 188bfd36
      Motomu Utsumi authored
      Closing TCP sockets sends RST packets. If the cellular modem is idle,
      sending RST packets will wake the modem up and consume battery.
      
      This CL adds delay_destroy_frozen_sockets_version flag.
      When this flag and destroy_frozen_sockets_version is enabled,
      ConnectivityService delays closing socket until the cellular modem wakes up.
      Pending frozen sockets are closed also when cellular network becomes no
      longer the default network.
      
      This CL also adds flag status and pending uids to the dump.
      
      Bug: 284900338
      Test: FrameworksNetTests
      Change-Id: I2562568390dda36d02f72afb3a96f824788964c0
      188bfd36
  10. Sep 03, 2023
  11. Aug 31, 2023
  12. Aug 30, 2023
    • Chalard Jean's avatar
      Address flake in testNetworkCallbackMaximum · 2eb2f799
      Chalard Jean authored
      These flake occasionally because registering a request increases
      the current request count synchronously while unregistering
      decreases it asynchronously, meaning if the test has time to
      call register 100 times before unregister can run it will
      wrongfully flake.
      This could be addressed in production code but as comments in
      the change explain, this isn't worth the complexity. Hence
      just have a pinpoint fix in the test. See aosp/2707373 for
      what a fix in the production code would look like.
      
      Test: manual
      Bug: 289530922
      Change-Id: Iad9a725eda91406f820abe4706bca0a4756352a4
      2eb2f799
    • Chiachang Wang's avatar
      Verify reevaluation triggered when VPN validation fails · 3e1edc23
      Chiachang Wang authored
      Update tests to verify that the underlying network reevaluation
      is triggered when VPN validation status switches to unvalidated.
      
      Bug: 296183603
      Test: atest FrameworksNetTests
      Change-Id: I80934cce6e7f2d56039bdd6ad63c6f7173a597cb
      3e1edc23
  13. Aug 29, 2023
    • Maciej Żenczykowski's avatar
      netd bpf - implement ingress discard based on {dstip,ifindex} · 6109d94e
      Maciej Żenczykowski authored
      
      Test: TreeHugger
      Bug: 295800201
      Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
      Change-Id: I82771644045e0e37f73725730bd0bd2265ac5b77
      6109d94e
    • Patrick Rohr's avatar
      ethernet: Wait on releaseTetheredInterface() to be processed · 524256d4
      Patrick Rohr authored
      There is a race between releaseTetheredInterface() and a new interface
      being created. Calling setEthernetEnabled(true) forces the test to wait
      on a callback that is generated on the ethernet handler thread (and
      therefore guarantees releaseTetheredInterface() has been processed).
      
      Bug: 296012516
      Test: atest EthernetManagerTest
      Change-Id: I7a1a763ba5c1c50274a112b8c1b8c04f35696f12
      524256d4
    • Junyu Lai's avatar
      Split BpfNetMaps constants and utilities into standalone classes · 29b7b638
      Junyu Lai authored
      This is a no-op refactoring that splits constants and utility
      methods into standalone classes which will be shared with
      a bpf reader class in subsequent CLs.
      
      NO_IFTTT=No-op refactoring
      
      Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.BpfNetMapsTest
      Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.net.module.util.StructTest
      
      Bug: 297836825
      Change-Id: I6d7ea044e43180ae001573009a166be74ebe6a5d
      29b7b638
  14. Aug 28, 2023
  15. Aug 24, 2023
  16. Aug 22, 2023
    • Patrick Rohr's avatar
      ethernet: clean up EthernetManagerTest · f454f893
      Patrick Rohr authored
      createChangeEvent is not expected to be called from a test, so make it
      private. Also delete pollOrThrow as polling inline creates a better log
      output.
      
      Test: atest EthernetManagerTest
      Change-Id: I2399960fee2c51fdf340186189ae83a20c4ac6f3
      f454f893
    • Patrick Rohr's avatar
      ethernet: test adding listener after removing server mode iface · f848c6c6
      Patrick Rohr authored
      Tests that registering a EthernetStateListener functions as expected
      after requesting a tethering interface and subsequently removing that
      interface.
      
      Test: atest testCallbacks_afterRemovingServerModeInterface
      Bug: 290971780
      Change-Id: I7b6e1a3b3ac23f4fbdd2d20f63f83d59c4d4999d
      f848c6c6
    • Patrick Rohr's avatar
      Grant prohr ownership of ethernet tests · 88a88f13
      Patrick Rohr authored
      Test: N/A
      Change-Id: I50101f9e5dc4dede5732a31da4ecd53d027adedc
      88a88f13
    • Manidhar's avatar
      Skip tests in CtsNetTestCases module if feature not supported · d41d7b6a
      Manidhar authored
      Test cases are accessing wifi when WiFi feature not enabled.
      This change skips the test from executing based on WiFi feature
      availabiliy.
      
      Bug: 262228635
      Test: Executed all CtsNetTestCases tests on system with and without WiFi
      feature
      
      Change-Id: I97872cf7b73eed12dba064697150f09c81f494b6
      d41d7b6a
    • Paul Hu's avatar
      Report sent query count · bad6fe98
      Paul Hu authored
      Report the sent query count when the discovery is stopped.
      
      Bug: 287546772
      Test: atest FrameworksNetTestCases NsdManagerTest
      Change-Id: I47b91c0c530eee2f00920ee5ea99e8d7b6e2e9ee
      bad6fe98
    • Paul Hu's avatar
      Report service info callback metrics data · ddce5919
      Paul Hu authored
      Bug: 287546772
      Test: atest FrameworksNetTestCases
      Change-Id: I630c0e4921f7acf42bf29812d9790ee5a894d60b
      ddce5919
    • Yuyang Huang's avatar
      Ignore EXCLUDED_ROUTES LinkPropertiesTest up to S_V2 · 7fe61f4c
      Yuyang Huang authored
      The platform doesn't allow overwriting compat flags that have target SDK
      lower than the platform SDK in release build. Ignoring the test cases
      that need compat flag overwrite up to S_V2 makes the MTS pass on S
      device.
      
      Bug: 296248982
      Test: TH
      Change-Id: Iab102725004c39b4dc3c0200c9bc673dd6be1302
      7fe61f4c
  17. Aug 18, 2023
    • Paul Hu's avatar
      Report resolution stop · 60149056
      Paul Hu authored
      Report the nsd metrics event of resolution stop.
      
      Bug: 287546772
      Test: atest FrameworksNetTestCases
      Change-Id: I2e6de22c946d58a3410f16b2f2689fd3ffc635a4
      60149056
Loading