Skip to content
Snippets Groups Projects
  1. May 23, 2024
    • Makoto Onuki's avatar
      [Ravenwood] Internal clean up, more PFD APIs, OsConstants, etc · df9cd260
      Makoto Onuki authored
      - Support a few more ParcelFileDescriptor APIs.
      - Support OsConstants and a couple of Os APIs.
      
      - Also clean up f/b/ravenwood. Now we have "runtime-common" library
        that can be used from different components of Ravenwood infra,
        with native code support.
      
      Bug: 292141694
      Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
      Test: CtsOsTestCases (on tree hugger)
      Flag: EXEMPT hostside test change only
      Change-Id: I259a04201e05e615e17da0529cb500a102887ec9
      df9cd260
  2. May 21, 2024
    • Makoto Onuki's avatar
      Update Ravenwood OWNERRS · f0a0f9b7
      Makoto Onuki authored
      Bug: n/a
      Test: n/a
      Change-Id: I3c359283b8efa04d0731018c0d6647586221f8cc
      f0a0f9b7
    • Makoto Onuki's avatar
      Ensure Build is always usable on Ravenwood ... · 8775923a
      Makoto Onuki authored
      ... even without a RavenwoodRule.
      
      There are situation where android APIs are called outside of
      a RavenwoodRule, but some of the APIs require a RavenwoodRule
      to initialize them.
      
      Since Build and SystemProperties are critical and often used by
      the test infra code (e.g. test runner or other junit rules), make sure
      they're always accessible.
      
      Fix: 341735388
      Test: atest CtsOsTestCases
      Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
      Change-Id: Iedcfae7e75c5ee9f2c7fb87c61262c2b33450d04
      8775923a
  3. May 20, 2024
    • Makoto Onuki's avatar
      Revert "[Ravenwood] Internal clean up, more PFD APIs, OsConstant..." · f3c1075a
      Makoto Onuki authored
      Revert submission 27402077-2024-05-17-PFD
      
      Reason for revert: Broke tests
      
      Reverted changes: /q/submissionid:27402077-2024-05-17-PFD
      
      Change-Id: If2b50329dbcaccb5f13f7631f1fa4df532bfcc60
      f3c1075a
    • Makoto Onuki's avatar
      [Ravenwood] Internal clean up, more PFD APIs, OsConstants, etc · 5b1f7008
      Makoto Onuki authored
      - Support a few more ParcelFileDescriptor APIs.
      - Support OsConstants and a couple of Os APIs.
      
      - Also clean up f/b/ravenwood. Now we have "runtime-common" library
        that can be used from different components of Ravenwood infra,
        with native code support.
      
      Bug: 292141694
      Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
      Test: CtsOsTestCases (on tree hugger)
      
      Change-Id: Ia06873114e80e9dd309d2cf077b208aaa7396542
      5b1f7008
  4. May 15, 2024
    • Makoto Onuki's avatar
      Add a hidden API to detect ravenwood environment · 2850813e
      Makoto Onuki authored
      We should minimize uses of it, but once in a while,
      it's useful as a last resort.
      
      Bug: 340556010
      Test: atest FrameworksCoreTestsRavenwood:com.android.internal.ravenwood.RavenwoodEnvironmentTest
      Test: tree hugger for device side tests
      Merged-In: Ice651a55cad092514466dd56940a2cf7b2285e4e
      Change-Id: Ice651a55cad092514466dd56940a2cf7b2285e4e
      2850813e
    • Makoto Onuki's avatar
      [Ravenwood] A few clean-ups · e87aea25
      Makoto Onuki authored
      - Now unsupported Context API will throw with a more useful message.
      - Change all the "stub"s in the policy files to "keep"s. They are the
        same thing (with the current use of hoststubgen) and "keep" matches
        the annotation name better.
      
      Bug: 292141694
      Test:  $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
      
      Change-Id: I56b60543801ebe9a4f1ba253996edc80f1bf3e32
      e87aea25
  5. May 14, 2024
    • Makoto Onuki's avatar
      Support Color and ColorSpace on Ravenwood · 91ab1135
      Makoto Onuki authored
      - Moved Color's JNI methods out of Shader.cpp, so Ravenwood
          can enable it without enabling other shader native methods.
      
      - Also, leaned up the Matrix native methods while I'm here.
      
      Bug: 337110712
      Test: atest CtsGraphicsTestCases
      Test: atest CtsGraphicsTestCasesRavenwood
      Test: Boot the device
      Change-Id: I0e99fb56ef581b4f59944994d07fd5253208dc31
      91ab1135
    • Makoto Onuki's avatar
      Add a hidden API to detect ravenwood environment · 110c3175
      Makoto Onuki authored
      We should minimize uses of it, but once in a while,
      it's useful as a last resort.
      
      Bug: 340556010
      Test: atest FrameworksCoreTestsRavenwood:com.android.internal.ravenwood.RavenwoodEnvironmentTest
      Test: tree hugger for device side tests
      Change-Id: Ice651a55cad092514466dd56940a2cf7b2285e4e
      110c3175
    • Makoto Onuki's avatar
      [Ravenwood] Add support for Android Resource (R) files · e6ee0224
      Makoto Onuki authored
      - Also make ravenwood-stats-collector.sh collect "keep-all" files too.
      
      Bug: 292141694
      Test: atest hoststubgentest tiny-framework-dump-test hoststubgen-invoke-test
      Change-Id: Ib0943c7c2f28c2558ddabe804d692b379fc178ed
      e6ee0224
  6. May 09, 2024
  7. May 07, 2024
    • Makoto Onuki's avatar
      [Ravenwood] Add timestamp to stats CSV · e3cc5d59
      Makoto Onuki authored
      Bug: 292141694
      Test: ravenwood/scripts/ravenwood-stats-collector.sh
        and check the output file
      Change-Id: I4e8e8462248355045e2494aa5e9fd457f85be15a
      e3cc5d59
    • Makoto Onuki's avatar
      [Ravenwood] Tweak build files · dfade847
      Makoto Onuki authored
      ... to allow other modules to refer to the text
      files.
      
      Bug: 292141694
      Test: ./scripts/run-all-tests.sh
      
      Change-Id: I46f0c0e238a6d7f8dc1a30cf111296a529c83664
      dfade847
  8. May 02, 2024
    • Makoto Onuki's avatar
      [Ravenwood] Start using HWUI native methods · e4a54a8e
      Makoto Onuki authored
      Enable Matrix, Path and Interpolator for starters
      
      Bug: 337110712
      Bug: 337329128
      Test: ./ravenwood/scripts/run-ravenwood-tests.sh
      Test: atest CtsGraphicsTestCasesRavenwood
      Test: atest CtsGraphicsTestCases
      Change-Id: Iefa17f91837c5382067bf17fc148b158133a4de5
      e4a54a8e
  9. May 01, 2024
    • Makoto Onuki's avatar
      [Ravenwood] Support NativeAllocationRegistry · aedf30b7
      Makoto Onuki authored
      We don't track native allocation size, but we still need to
      release native allocations.
      
      Bug: 337110712
      Test: atest RavenwoodBivalentTest
      Test: atest RavenwoodBivalentTest_device
      Test: ./ravenwood/scripts/run-ravenwood-tests.sh
      Change-Id: Ia50c963731a26fc951a8040cbf353a5c56505b6a
      aedf30b7
  10. Apr 30, 2024
    • Makoto Onuki's avatar
      [Ravenwood] Update TEST_MAPPINGs · ff419803
      Makoto Onuki authored
      Test: Treehugger
      Bug: 292141694
      Change-Id: I87b14fbac29fdefecd9c503c2c97d16b00151e58
      ff419803
    • Makoto Onuki's avatar
      [Ravenwood] Improve "supported API" CSV · 7c7f4903
      Makoto Onuki authored
      - Now we show all methods including unsupported ones, with actual
        policies.
      - Also show inherited APIs. e.g. Now Object.toString() will always be
        included in every class.
      
      Bug: 292141694
      Test: ./ravenwood/scripts/ravenwood-stats-collector.sh
          and examine the generated files
      Test: ./ravenwood/scripts/run-ravenwood-tests.sh
      
      Change-Id: I43bd40cf5013b0eb8f900dbc2f4b4b3fd158ad3f
      7c7f4903
  11. Apr 25, 2024
  12. Apr 20, 2024
    • Dmitri Plotnikov's avatar
      Introduce PowerStatsCollector for WiFi · 5275ebb8
      Dmitri Plotnikov authored
      Bug: 323970018
      Test: atest PowerStatsTestsRavenwood && atest PowerStatsTests
      Flag: com.android.server.power.optimization.streamlined_connectivity_battery_stats
      Change-Id: Id12cce9c3bb311ff97fcde0f21286cbc761ee48e
      5275ebb8
  13. Apr 09, 2024
  14. Apr 08, 2024
    • Dmitri Plotnikov's avatar
      Add support for power component states to PowerStats · c9dc70ba
      Dmitri Plotnikov authored
      This is done in preparation for adding MobileRadioPowerStatsCollector.
      Mobile radio has multiple different states (3G, LTE, NR etc) and
      multiple different signal levels. The space of all states is vast,
      but sparse. This CL prepares to handle per-state stats without
      wasting too much RAM and disk space.
      
      Bug: 323970018
      Test: atest --host FrameworksCoreTestsRavenwood PowerStatsTestsRavenwood
      
      Change-Id: I76841a59a385f5df0fcc957f5b00116b68d34250
      c9dc70ba
  15. Apr 05, 2024
    • Makoto Onuki's avatar
      Ravenwood reafatoring · c446aa9c
      Makoto Onuki authored
      Move all the tests to the `com.android.ravenwoodtest` package in order
      to tell them part from actual ravenwood code.
      
      This allows various tools to ignore ravenwood code without ignoring
      ravenwood test code.
      
      Test: ./ravenwood/scripts/run-ravenwood-tests.sh
      Bug: 292141694
      
      Change-Id: I48728784e7dd2e5aea3327da793923c8ef3b795d
      c446aa9c
    • Makoto Onuki's avatar
      Ravenwood/HostStubGen refactor and bug fixes · e2f3e57f
      Makoto Onuki authored
      [Fixed the NPE in the sysui test]
      
      
      - Bug fix: Now native substitution methods can handle bytes correctly.
      
      - Spec change: disallow using DisabledOnNonRavenwood on types.
      
      It turned out the device side test runner can't handle it if a class rule
      uses Assume.
      
      We could still support it with a non-class rule, but to avoid confusion,
      let's disallow using it on classes for the time being.
      
      - Add more tests
      
      - Some refactoring for future changes.
      
      Test: ./ravenwood/scripts/run-ravenwood-tests.sh
      Test: v2/sysui/unit_test on ABTD: https://android-build.corp.google.com/abtd/run/L40000030002931752/
      Bug: 292141694
      Bug: 332973325
      Change-Id: I6d8df1e879840b60326e2beeeee2d8ee7b2ff925
      e2f3e57f
  16. Apr 04, 2024
  17. Apr 03, 2024
    • Makoto Onuki's avatar
      Ravenwood/HostStubGen refactor and bug fixe · ec5e313e
      Makoto Onuki authored
      - Bug fix: Now native substitution methods can handle bytes correctly.
      
      - Spec change: disallow using DisabledOnNonRavenwood on types.
      
      It turned out the device side test runner can't handle it if a class rule
      uses Assume.
      
      We could still support it with a non-class rule, but to avoid confusion,
      let's disallow using it on classes for the time being.
      
      - Add more tests
      
      - Some refactoring for future changes.
      
      Test: ./ravenwood/scripts/run-ravenwood-tests.sh
      Bug: 292141694
      Change-Id: I6e2fd389ef63d31472f5eafcd9a58ac9e52e8117
      ec5e313e
  18. Mar 28, 2024
  19. Mar 27, 2024
  20. Mar 21, 2024
  21. Mar 20, 2024
    • sandeepbandaru's avatar
      Adding method to check if a Parcel has any Binders marshalled in it. · 874d8163
      sandeepbandaru authored
      This is an extension to the existing `hasFileDescriptors` method, both of which are "Active Objects" of a sort and allow writes across processes.
      This check would be useful to perform validations on Bundle entries or
      any Parcelable type if it only contains non-active objects and can be
      essentially treated read only without having to inspect the marshalled
      parcel object.
      
      Test: TODO
      Bug: 316589195
      API-Coverage-Bug: 323147058
      Change-Id: I1fd8c8a27e3e7b90df8fefb0fe77bbad908db6b6
      874d8163
  22. Mar 13, 2024
  23. Mar 12, 2024
  24. Mar 04, 2024
    • Michael Hoisie's avatar
      Make system property reading in LayoutlibLoader more DRY · 5b828730
      Michael Hoisie authored
      The system properties can be stored in a std::unordered_map and can be
      read in one fell swoop.
      
      This reduces the amount of JNI boilerplate required to read individual
      system properties.
      
      Also remove the '**n/a**' magic string. LayoutLibLoader system property
      logic is designed to support the empty string value.
      
      This is effectively a cherry-pick of ag/25672148 but modified for
      LayoutlibLoader in `main`.
      
      Test: layoutlib-tests
      Change-Id: I7562dc6eecada3199d8a3b20879b2e1b296cfb32
      5b828730
  25. Feb 29, 2024
    • Jeff Sharkey's avatar
      Offer baseline `RavenwoodFlagsValueProvider`. · 7037e357
      Jeff Sharkey authored
      Many test authors are starting to use `CheckFlagsRule` across suites
      like CTS, so instead of recommending that they use `null` when on
      Ravenwood, offer them a clear behavior that is either "all-on" or
      "all-off".
      
      Eventually we'll explore providing default flag values on Ravenwood,
      but let's get something cleaner available now.
      
      Bug: 318841620
      Test: ./frameworks/base/ravenwood/run-ravenwood-tests.sh
      Change-Id: Id234a375426fad38f64d3a999339bb720eae84bf
      7037e357
    • Jeff Sharkey's avatar
      Support service dependencies on Ravenwood. · 8a922eca
      Jeff Sharkey authored
      Ravenwood test authors should only need to call setServicesRequired()
      for the services they directly interact with, but often those
      services will have indirect dependencies on other OS internals, and
      those dependencies will evolve over time.
      
      To handle this, we add the concept of dependencies to SystemService,
      where a service declares the other services required to run.  (They
      can choose to omit services from their dependencies where they
      gracefully handle a missing service at runtime.)
      
      Bug: 325506297
      Test: atest RavenwoodServicesTest
      Change-Id: I42187b3494fef499d619ad882891e832b0fd6bca
      8a922eca
  26. Feb 27, 2024
    • Jeff Sharkey's avatar
      First pass of "fake" services on Ravenwood. · 16f7cdf2
      Jeff Sharkey authored
      One of our eventual goals with Ravenwood is to support usage of
      system services from test code.  A recent change added support for
      "real" services on Ravenwood, and this change expands that to add
      support for "fake" services.
      
      Some services are so tangled with dependencies it would take a
      long time until we'd be able to run their "real" code.  Also, some
      services with deep hardware dependencies that it can be difficult
      to add new abstraction layers to support Ravenwood.  Finally, we
      want to support service owners that only have resources to meet
      the "Pareto principle", where enabling 20% of their functionality
      on Ravenwood is enough to unblock 80% of test use-cases.
      
      Thus, we're supporting teams bringing either "real" or "fake"
      implementations of their services.  Since all test interactions
      still go through published FooManager and FooManagerInternal-style
      interfaces, teams can start with a "fake" and slowly transition
      to using more of their "real" code over time, without having to
      update test clients.
      
      And as a final reminder, because Ravenwood requires test suites
      like CTS, we're already verifying that "fake" services behave
      similarly to the "real" services on physical devices.
      
      Bug: 325506297
      Test: atest CtsContentTestCasesRavenwood
      Change-Id: I8ed5bd030e03143c15cb9fa945bbdcb0b412611e
      16f7cdf2
  27. Feb 23, 2024
    • Antonio Kantek's avatar
      Enabling ClientControllerTest as hostside test · d9066c30
      Antonio Kantek authored
      Bug: 324438289
      Test: atest --host FrameworksInputMethodSystemServerTests_host:com.android.server.inputmethod.ClientControllerTest
      Test: atest FrameworksInputMethodSystemServerTests:com.android.server.inputmethod.ClientControllerTest
      Change-Id: I176064d24917f12af3f4551aa82cf54f59466fc0
      d9066c30
  28. Feb 20, 2024
    • Jeff Sharkey's avatar
      First pass of "real" services on Ravenwood. · 3e91c2b2
      Jeff Sharkey authored
      One of our eventual goals with Ravenwood is to support usage of
      system services from test code.  Robolectric takes the approach of
      publishing "shadows" which are effectively fakes of the Manager
      objects visible to app processes, and it unfortunately doesn't offer
      a mechanism to run "real" services code.
      
      In contrast, Ravenwood aims to support API owners progressively
      offering their system services either via a "fake" approach, or by
      using various levels of the "real" code that would run on a device.
      
      This change wires up the foundational support and uses the simple
      `SerialManager` example to demonstrate using the same "real" code
      on both Ravenwood and devices.  It also demonstrates the `Internal`
      pattern being used to customize behavior for tests.
      
      To offer as hermetic as a test environment as possible, we start
      new instances of each requested service for each test.  Requiring
      developers to be explicit about the services they need will help
      keep overhead low, especially for tests that don't need services.
      
      Bug: 325506297
      Test: atest RavenwoodServicesTest
      Change-Id: Ie22436b38f2176f91dfce746b899ebab7752bbb8
      3e91c2b2
    • Makoto Onuki's avatar
      Allow run-ravenwood-tests.sh to use atest-dev · 847ba786
      Makoto Onuki authored
      See the Test: line
      
      Test: ATEST=atest-dev ravenwood/run-ravenwood-tests.sh
      Bug: 292141694
      Change-Id: I18851d99f175578ffec78873599e842f72568c57
      847ba786
  29. Feb 16, 2024
Loading