From 77253219e52643903f3829cad0c57377e80c200c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 21:49:30 +0000 Subject: [PATCH 1/5] Initial plan From 160f5a386114054f38c772fb52551939c81330ff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 22:07:45 +0000 Subject: [PATCH 2/5] Sync run.sh and run.cmd options with run.py - Fix bug in run.sh: passes '--tieringtest' to run.py but run.py expects '--tiering_test' - Add '--parallel=' option to run.sh (was in run.cmd but missing from run.sh) - Add 'verbose' option to run.cmd (was in run.sh but missing from run.cmd) - Add 'limitedDumpGeneration' option to run.cmd (was in run.sh but missing from run.cmd) Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com> --- src/tests/run.cmd | 14 ++++++++++++++ src/tests/run.sh | 11 ++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/tests/run.cmd b/src/tests/run.cmd index 56666656a7bf5e..fe943752d130dd 100644 --- a/src/tests/run.cmd +++ b/src/tests/run.cmd @@ -29,6 +29,8 @@ set __LongGCTests= set __GCSimulatorTests= set __IlasmRoundTrip= set __PrintLastResultsOnly= +set __Verbose= +set __LimitedCoreDumps= set LogsDirArg= set RunInUnloadableContext= set TieringTest= @@ -79,6 +81,8 @@ if /i "%1" == "tieringtest" (set TieringTest=1&shift if /i "%1" == "runnativeaottests" (set RunNativeAot=1&shift&goto Arg_Loop) if /i "%1" == "interpreter" (set RunInterpreter=1&shift&goto Arg_Loop) if /i "%1" == "node" (set RunWithNodeJS=1&shift&goto Arg_Loop) +if /i "%1" == "verbose" (set __Verbose=1&shift&goto Arg_Loop) +if /i "%1" == "limiteddumpgeneration" (set __LimitedCoreDumps=1&shift&goto Arg_Loop) if /i not "%1" == "msbuildargs" goto SkipMsbuildArgs :: All the rest of the args will be collected and passed directly to msbuild. @@ -195,6 +199,14 @@ if defined RunWithNodeJS ( set __RuntestPyArgs=%__RuntestPyArgs% --node ) +if defined __Verbose ( + set __RuntestPyArgs=%__RuntestPyArgs% --verbose +) + +if defined __LimitedCoreDumps ( + set __RuntestPyArgs=%__RuntestPyArgs% --limited_core_dumps +) + REM Find python and set it to the variable PYTHON set _C=-c "import sys; sys.stdout.write(sys.executable)" (py -3 %_C% || py -2 %_C% || python3 %_C% || python2 %_C% || python %_C%) > %TEMP%\pythonlocation.txt 2> NUL @@ -261,6 +273,8 @@ echo msbuildargs ^ - Pass all subsequent args directly to msbuild echo ^ - Path to the runtime to test ^(if specified^). echo interpreter - Runs the tests with the interpreter enabled. echo node - Runs the tests with NodeJS ^(wasm only^). +echo verbose - Enable verbose output ^(show output from each test^). +echo limitedDumpGeneration - Generates a limited number of core dumps if tests crash, avoiding excessive dump storage. echo. echo Note that arguments are not case-sensitive. echo. diff --git a/src/tests/run.sh b/src/tests/run.sh index 5c3d2b53b991c1..ad36f48754bde1 100755 --- a/src/tests/run.sh +++ b/src/tests/run.sh @@ -20,6 +20,7 @@ function print_usage { echo ' --coreRootDir= : Directory to the CORE_ROOT location.' echo ' --enableEventLogging : Enable event logging through LTTNG.' echo ' --sequential : Run tests sequentially (default is to run in parallel).' + echo ' --parallel= : Run tests in parallel (none, collections, assemblies, all) (default: collections).' echo ' --runcrossgen2tests : Runs the ReadyToRun tests compiled with Crossgen2' echo ' --synthesizepgo : Runs the tests allowing crossgen2 to synthesize PGO data' echo ' --jitstress= : Runs the tests with DOTNET_JitStress=n' @@ -70,6 +71,7 @@ verbose=0 ilasmroundtrip= printLastResultsOnly= runSequential=0 +parallelType= runincontext=0 tieringtest=0 nativeaottest=0 @@ -159,6 +161,9 @@ do --sequential) runSequential=1 ;; + --parallel=*) + parallelType=${i#*=} + ;; --useServerGC) export DOTNET_gcServer=1 ;; @@ -275,6 +280,10 @@ if [ "$runSequential" -ne 0 ]; then runtestPyArguments+=("--sequential") fi +if [[ -n "$parallelType" ]]; then + runtestPyArguments+=("-parallel" "$parallelType") +fi + if [[ -n "$printLastResultsOnly" ]]; then runtestPyArguments+=("--analyze_results_only") fi @@ -298,7 +307,7 @@ fi if [[ "$tieringtest" -ne 0 ]]; then echo "Running to encourage tier1 rejitting" - runtestPyArguments+=("--tieringtest") + runtestPyArguments+=("--tiering_test") fi if [[ "$nativeaottest" -ne 0 ]]; then From b79eb42e8fce846897601d4bce4e3511ed340711 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 22:40:25 +0000 Subject: [PATCH 3/5] Fix help menus: add missing tieringtest, runnativeaottests to run.cmd; fix empty description in run.sh Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com> --- src/tests/run.cmd | 8 +++++--- src/tests/run.sh | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tests/run.cmd b/src/tests/run.cmd index fe943752d130dd..58761dc4aed4d9 100644 --- a/src/tests/run.cmd +++ b/src/tests/run.cmd @@ -271,10 +271,12 @@ echo Note: some options override this ^(gcstressleve echo logsdir ^ - Specify the logs directory ^(default: artifacts/log^) echo msbuildargs ^ - Pass all subsequent args directly to msbuild invocations. echo ^ - Path to the runtime to test ^(if specified^). +echo tieringtest - Run each test to encourage tier1 rejitting. +echo runnativeaottests - Run NativeAOT compiled tests. echo interpreter - Runs the tests with the interpreter enabled. -echo node - Runs the tests with NodeJS ^(wasm only^). -echo verbose - Enable verbose output ^(show output from each test^). -echo limitedDumpGeneration - Generates a limited number of core dumps if tests crash, avoiding excessive dump storage. +echo node - Runs the tests with NodeJS ^(wasm only^). +echo verbose - Enable verbose output ^(show output from each test^). +echo limitedDumpGeneration - Limits the number of core dumps generated for this test run. echo. echo Note that arguments are not case-sensitive. echo. diff --git a/src/tests/run.sh b/src/tests/run.sh index ad36f48754bde1..017f97b7bc52c5 100755 --- a/src/tests/run.sh +++ b/src/tests/run.sh @@ -44,7 +44,7 @@ function print_usage { echo ' --runnativeaottests : Run NativeAOT compiled tests' echo ' --interpreter : Runs the tests with the interpreter enabled' echo ' --node : Runs the tests with NodeJS (wasm only)' - echo ' --limitedDumpGeneration : ' + echo ' --limitedDumpGeneration : Limits the number of core dumps generated for this test run' } # Exit code constants From 2c43f5eb0467f352adab0ef7045fda39991ab38f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 23:25:39 +0000 Subject: [PATCH 4/5] Document runlargeversionbubblecrossgen2tests option and remove hidden comment Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com> --- src/tests/run.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/run.cmd b/src/tests/run.cmd index 58761dc4aed4d9..e232e2288c5bff 100644 --- a/src/tests/run.cmd +++ b/src/tests/run.cmd @@ -67,7 +67,6 @@ if /i "%1" == "jitforcerelocs" (set DOTNET_ForceRelocs= if /i "%1" == "printlastresultsonly" (set __PrintLastResultsOnly=1&shift&goto Arg_Loop) if /i "%1" == "logsdir" (set LogsDirArg=%2&shift&shift&goto Arg_Loop) if /i "%1" == "runcrossgen2tests" (set RunCrossGen2=1&shift&goto Arg_Loop) -REM This test feature is currently intentionally undocumented if /i "%1" == "runlargeversionbubblecrossgen2tests" (set RunCrossGen2=1&set CrossgenLargeVersionBubble=1&shift&goto Arg_Loop) if /i "%1" == "synthesizepgo" (set CrossGen2SynthesizePgo=1&shift&goto Arg_Loop) if /i "%1" == "gcname" (set DOTNET_GCName=%2&shift&shift&goto Arg_Loop) @@ -247,6 +246,7 @@ echo TestEnv ^ - Run a custom script before every test to set echo sequential - Run tests sequentially ^(no parallelism^). echo parallel ^ - Run tests with given level of parallelism: none, collections, assemblies, all. Default: collections. echo RunCrossgen2Tests - Runs ReadytoRun tests compiled with Crossgen2 +echo runlargeversionbubblecrossgen2tests - ^(Experimental^) Runs Crossgen2 tests with large version bubble enabled. echo synthesizepgo - Enabled synthesizing PGO data in CrossGen2 echo jitstress ^ - Runs the tests with DOTNET_JitStress=n echo jitstressregs ^ - Runs the tests with DOTNET_JitStressRegs=n From 9f41b7c0eefa1174b60edacbe810fc3714f25635 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 16:46:11 +0000 Subject: [PATCH 5/5] Add runlargeversionbubblecrossgen2tests to run.sh and composite mode to all scripts Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com> --- src/tests/run.cmd | 6 ++++++ src/tests/run.py | 10 ++++++++++ src/tests/run.sh | 19 +++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/src/tests/run.cmd b/src/tests/run.cmd index e232e2288c5bff..e86261b969234f 100644 --- a/src/tests/run.cmd +++ b/src/tests/run.cmd @@ -68,6 +68,7 @@ if /i "%1" == "printlastresultsonly" (set __PrintLastResultsO if /i "%1" == "logsdir" (set LogsDirArg=%2&shift&shift&goto Arg_Loop) if /i "%1" == "runcrossgen2tests" (set RunCrossGen2=1&shift&goto Arg_Loop) if /i "%1" == "runlargeversionbubblecrossgen2tests" (set RunCrossGen2=1&set CrossgenLargeVersionBubble=1&shift&goto Arg_Loop) +if /i "%1" == "composite" (set __CompositeBuildMode=1&shift&goto Arg_Loop) if /i "%1" == "synthesizepgo" (set CrossGen2SynthesizePgo=1&shift&goto Arg_Loop) if /i "%1" == "gcname" (set DOTNET_GCName=%2&shift&shift&goto Arg_Loop) if /i "%1" == "gcstresslevel" (set DOTNET_GCStress=%2&set __TestTimeout=1800000&shift&shift&goto Arg_Loop) @@ -170,6 +171,10 @@ if defined CrossgenLargeVersionBubble ( set __RuntestPyArgs=%__RuntestPyArgs% --large_version_bubble ) +if defined __CompositeBuildMode ( + set __RuntestPyArgs=%__RuntestPyArgs% --composite +) + if defined CrossGen2SynthesizePgo ( set __RuntestPyArgs=%__RuntestPyArgs% --synthesize_pgo ) @@ -247,6 +252,7 @@ echo sequential - Run tests sequentially ^(no parallelism^). echo parallel ^ - Run tests with given level of parallelism: none, collections, assemblies, all. Default: collections. echo RunCrossgen2Tests - Runs ReadytoRun tests compiled with Crossgen2 echo runlargeversionbubblecrossgen2tests - ^(Experimental^) Runs Crossgen2 tests with large version bubble enabled. +echo composite - ^(Experimental^) Use Crossgen2 composite mode for tests. echo synthesizepgo - Enabled synthesizing PGO data in CrossGen2 echo jitstress ^ - Runs the tests with DOTNET_JitStress=n echo jitstressregs ^ - Runs the tests with DOTNET_JitStressRegs=n diff --git a/src/tests/run.py b/src/tests/run.py index 21b2f47eb9bb20..240a19391510ad 100755 --- a/src/tests/run.py +++ b/src/tests/run.py @@ -103,6 +103,7 @@ parser.add_argument("--ilasmroundtrip", dest="ilasmroundtrip", action="store_true", default=False) parser.add_argument("--run_crossgen2_tests", dest="run_crossgen2_tests", action="store_true", default=False) parser.add_argument("--large_version_bubble", dest="large_version_bubble", action="store_true", default=False) +parser.add_argument("--composite", dest="composite", action="store_true", default=False) parser.add_argument("--synthesize_pgo", dest="synthesize_pgo", action="store_true", default=False) parser.add_argument("--sequential", dest="sequential", action="store_true", default=False) parser.add_argument("--interpreter", dest="interpreter", action="store_true", default=False) @@ -834,6 +835,10 @@ def run_tests(args, print("Large Version Bubble enabled") os.environ["LargeVersionBubble"] = "1" + if args.composite: + print("Composite Crossgen2 mode enabled") + os.environ["CompositeBuildMode"] = "1" + if args.synthesize_pgo: print("Synthesizing PGO") os.environ["CrossGen2SynthesizePgo"] = "1" @@ -979,6 +984,11 @@ def setup_args(args): lambda arg: True, "Error setting large_version_bubble") + coreclr_setup_args.verify(args, + "composite", + lambda arg: True, + "Error setting composite") + coreclr_setup_args.verify(args, "run_crossgen2_tests", lambda unused: True, diff --git a/src/tests/run.sh b/src/tests/run.sh index 017f97b7bc52c5..ce23324ca7dc35 100755 --- a/src/tests/run.sh +++ b/src/tests/run.sh @@ -22,6 +22,8 @@ function print_usage { echo ' --sequential : Run tests sequentially (default is to run in parallel).' echo ' --parallel= : Run tests in parallel (none, collections, assemblies, all) (default: collections).' echo ' --runcrossgen2tests : Runs the ReadyToRun tests compiled with Crossgen2' + echo ' --runlargeversionbubblecrossgen2tests : (Experimental) Runs Crossgen2 tests with large version bubble enabled' + echo ' --composite : (Experimental) Use Crossgen2 composite mode for tests' echo ' --synthesizepgo : Runs the tests allowing crossgen2 to synthesize PGO data' echo ' --jitstress= : Runs the tests with DOTNET_JitStress=n' echo ' --jitstressregs= : Runs the tests with DOTNET_JitStressRegs=n' @@ -75,6 +77,8 @@ parallelType= runincontext=0 tieringtest=0 nativeaottest=0 +largeversionbubble=0 +compositemode=0 for i in "$@" do @@ -155,6 +159,13 @@ do --runcrossgen2tests) export RunCrossGen2=1 ;; + --runlargeversionbubblecrossgen2tests) + export RunCrossGen2=1 + largeversionbubble=1 + ;; + --composite) + compositemode=1 + ;; --synthesizepgo) export CrossGen2SynthesizePgo=1 ;; @@ -292,6 +303,14 @@ if [[ -n "$RunCrossGen2" ]]; then runtestPyArguments+=("--run_crossgen2_tests") fi +if [[ "$largeversionbubble" -ne 0 ]]; then + runtestPyArguments+=("--large_version_bubble") +fi + +if [[ "$compositemode" -ne 0 ]]; then + runtestPyArguments+=("--composite") +fi + if [[ -n "$CrossGen2SynthesizePgo" ]]; then runtestPyArguments+=("--synthesize_pgo") fi