Skip to content

[RuntimeAsync] Moving tests from runtimelabs. #115169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

VSadov
Copy link
Member

@VSadov VSadov commented Apr 29, 2025

This is a test-only change.

  • The tests are currently disabled.
    The easiest way to enable is by removing src\tests\async\Directory.Build.targets, but the build will need to use experimental compiler that understands async2 syntax.
  • Benchmarks are included.
    We may still need them in the near future. Will remove later.
  • The tests use the old async2 syntax as in the experiment.
    We will have to adjust the syntax once switching to the actual Roslyn prototype compiler with runtime async support.

(see syntax switch Draft PR for details - dotnet/runtimelab#3062)

@VSadov VSadov added test-enhancement Improvements of test source code runtime-async labels Apr 29, 2025
@Copilot Copilot AI review requested due to automatic review settings April 29, 2025 23:29
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 29, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR moves tests from runtimelabs and introduces a suite of experimental tests using the async2 syntax alongside traditional async usage. Key changes include:

  • New test implementations for async method behavior and benchmarks.
  • Integration tests covering recursive async calls, Fibonacci benchmarks, and collectible assembly load contexts.
  • Mixed usage of async and async2 to validate experimental compiler behavior.

Reviewed Changes

Copilot reviewed 55 out of 66 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tests/async/implement.cs Introduces async method implementations with mixed async/async2 usage
src/tests/async/gc-roots-scan.cs Adds recursive async tests and GC scanning benchmarks
src/tests/async/fibonacci-without-yields.cs Adds Fibonacci test without yield calls
src/tests/async/fibonacci-without-yields-config-await.cs Adds Fibonacci test using AsyncHelpers for await configuration
src/tests/async/fibonacci-with-yields_struct_return.cs Adds Fibonacci test with struct returns (note an apparent naming typo)
src/tests/async/fibonacci-with-yields.cs Adds Fibonacci test incorporating yield calls
src/tests/async/cse-array-index-byref.cs Adds test for array index mutation within async methods
src/tests/async/collectible-alc.cs Adds test for unloading collectible assembly load contexts
src/tests/async/awaitingnotasync.cs Adds test for intermixing await with non-async methods
Files not reviewed (11)
  • src/tests/async/Directory.Build.targets: Language not supported
  • src/tests/async/asynctests.csproj: Language not supported
  • src/tests/async/awaitingnotasync.csproj: Language not supported
  • src/tests/async/collectible-alc.csproj: Language not supported
  • src/tests/async/cse-array-index-byref.csproj: Language not supported
  • src/tests/async/eh-microbench.csproj: Language not supported
  • src/tests/async/fibonacci-with-yields.csproj: Language not supported
  • src/tests/async/fibonacci-with-yields_struct_return.csproj: Language not supported
  • src/tests/async/fibonacci-without-yields-config-await.csproj: Language not supported
  • src/tests/async/fibonacci-without-yields.csproj: Language not supported
  • src/tests/async/gc-roots-scan.csproj: Language not supported
Comments suppressed due to low confidence (1)

src/tests/async/fibonacci-with-yields_struct_return.cs:11

  • The class name 'Async2FibonacceWithYields' appears to contain a typo. Consider renaming it to 'Async2FibonacciWithYields' for clarity.
public class Async2FibonacceWithYields

@VSadov
Copy link
Member Author

VSadov commented Apr 30, 2025

CC: @agocke

The goal is mostly to have everything in one repo.
We can still test the syntax/compiler switching in runtimelabs, if more convenient, and then port over.

@VSadov
Copy link
Member Author

VSadov commented Apr 30, 2025

CC: @jakobbotsch

@VSadov
Copy link
Member Author

VSadov commented Apr 30, 2025

/ba-g the wasm failures could not be related

@VSadov VSadov requested a review from jakobbotsch April 30, 2025 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners runtime-async test-enhancement Improvements of test source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant